haltcase / glob

Pure Nim library for matching file paths against Unix style glob patterns.
https://glob.bolingen.me
MIT License
61 stars 5 forks source link

`nimble test` (+basic usage) causes: Error: 'expandGlob' can have side effects (due to recent change proc => func I guess) #21

Closed timotheecour closed 6 years ago

timotheecour commented 6 years ago

git rev-parse HEAD 74031bc07fd2b5fc8753e450e87cdbbdeb50ddd9

nimble test
  Executing task test in /Users/timothee/git_clone/nim/glob/glob.nimble
  Verifying dependencies for glob@0.7.0
      Info: Dependency on regex@>= 0.6.3 already satisfied
  Verifying dependencies for regex@0.7.1
      Info: Dependency on unicodedb@>= 0.5.1 already satisfied
  Verifying dependencies for unicodedb@0.5.1
      Info: Dependency on unicodeplus@>= 0.3.0 already satisfied
  Verifying dependencies for unicodeplus@0.3.2
      Info: Dependency on unicodedb@>= 0.4 already satisfied
  Verifying dependencies for unicodedb@0.5.1
  Compiling tests.nim (from package glob) using c backend
/Users/timothee/git_clone/nim/glob/tests.nim(1, 8) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated]
  import future
         ^
/Users/timothee/git_clone/nim/glob/src/glob.nim(142, 8) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated]
  import future
         ^
/Users/timothee/git_clone/nim/glob/src/glob.nim(301, 6) Error: 'expandGlob' can have side effects
  func expandGlob (pattern: string, ignoreCase: bool): string =
       ^
       Tip: 17 messages have been suppressed, use --verbose to show them.
     Error: Execution failed with exit code 256
        ... Command: "/Users/timothee/.nimble/bin/nim" c --noNimblePath --path:"/Users/timothee/.nimble/pkgs/regex-0.7.1" --path:"/Users/timothee/.nimble/pkgs/unicodedb-0.5.1" --path:"/Users/timothee/.nimble/pkgs/unicodeplus-0.3.2" --path:"/Users/timothee/.nimble/pkgs/unicodedb-0.5.1" "--hints:off" "--verbosity:0" "-r"  "tests.nim"
stack trace: (most recent call last)
Users/timothee/git_clone/nim/glob/glob.nimble(12) testTask
Users/timothee/git_clone/nim/Nim/lib/system/nimscript.nim(237) exec
/Users/timothee/git_clone/nim/Nim/lib/system/nimscript.nim(237, 7) Error: unhandled exception: FAILED: nimble c -y --hints:off --verbosity:0 -r tests.nim
haltcase commented 6 years ago

You must be using devel, stable Nim hasn't enforced the noSideEffect pragma on funcs yet. Fixed!

Also I just saw you made a PR, I jumped the gun a bit on that 😄 I'll comment there.