diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-05-06 20:07:42 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-05-06 20:07:42 +0200 |
commit | 79ec95a9b57a857b511fb049678778b6945a544b (patch) | |
tree | 0d54ae7469faaa010440945309982adca3d8e779 /compiler | |
parent | b13296533012426d386e986322009363af8a51bd (diff) | |
download | Nim-79ec95a9b57a857b511fb049678778b6945a544b.tar.gz |
remove hardly used TimeMachine feature
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/commands.nim | 3 | ||||
-rw-r--r-- | compiler/options.nim | 25 |
2 files changed, 1 insertions, 27 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index d8d8ae4b7..204baaa16 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -31,7 +31,6 @@ import # but some have deps to imported modules. Yay. bootSwitch(usedTinyC, hasTinyCBackend, "-d:tinyc") -bootSwitch(usedAvoidTimeMachine, noTimeMachine, "-d:avoidTimeMachine") bootSwitch(usedNativeStacktrace, defined(nativeStackTrace) and nativeStackTraceSupported, "-d:nativeStackTrace") @@ -106,7 +105,7 @@ proc writeVersionInfo(pass: TCmdLinePass) = when gitHash.len == 40: msgWriteln("git hash: " & gitHash, {msgStdout}) - msgWriteln("active boot switches:" & usedRelease & usedAvoidTimeMachine & + msgWriteln("active boot switches:" & usedRelease & usedTinyC & usedGnuReadline & usedNativeStacktrace & usedNoCaas & usedFFI & usedBoehm & usedMarkAndSweep & usedGenerational & usedGoGC & usedNoGC, {msgStdout}) diff --git a/compiler/options.nim b/compiler/options.nim index f8cb735ae..fe8be5e0c 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -17,7 +17,6 @@ const hasFFI* = defined(useFFI) newScopeForIf* = true useCaas* = not defined(noCaas) - noTimeMachine* = defined(avoidTimeMachine) and defined(macosx) copyrightYear* = "2018" type # please make sure we have under 32 options @@ -329,28 +328,6 @@ proc toGeneratedFile*(path, ext: string): string = result = joinPath([getNimcacheDir(), changeFileExt(tail, ext)]) #echo "toGeneratedFile(", path, ", ", ext, ") = ", result -when noTimeMachine: - var alreadyExcludedDirs = initSet[string]() - proc excludeDirFromTimeMachine(dir: string) {.raises: [].} = - ## Calls a macosx command on the directory to exclude it from backups. - ## - ## The macosx tmutil command is invoked to mark the specified path as an - ## item to be excluded from time machine backups. If a path already exists - ## with files before excluding it, newer files won't be added to the - ## directory, but previous files won't be removed from the backup until the - ## user deletes that directory. - ## - ## The whole proc is optional and will ignore all kinds of errors. The only - ## way to be sure that it works is to call ``tmutil isexcluded path``. - if alreadyExcludedDirs.contains(dir): return - alreadyExcludedDirs.incl(dir) - try: - var p = startProcess("/usr/bin/tmutil", args = ["addexclusion", dir]) - discard p.waitForExit - p.close - except Exception: - discard - proc completeGeneratedFilePath*(f: string, createSubDir: bool = true): string = var (head, tail) = splitPath(f) #if len(head) > 0: head = removeTrailingDirSep(shortenDir(head & dirSep)) @@ -358,8 +335,6 @@ proc completeGeneratedFilePath*(f: string, createSubDir: bool = true): string = if createSubDir: try: createDir(subdir) - when noTimeMachine: - excludeDirFromTimeMachine(subdir) except OSError: writeLine(stdout, "cannot create directory: " & subdir) quit(1) |