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

glob breaks nim CI #49

Closed timotheecour closed 3 years ago

timotheecour commented 4 years ago

I've pushed https://github.com/nim-lang/Nim/pull/15647 until this is fixed, please remember to revert https://github.com/nim-lang/Nim/pull/15647 after this is fixed

https://github.com/nim-lang/Nim/pull/15642/checks?check_run_id=1277836246


 PASS: Vindaar/ggplotnim C                       (24.69 sec)
  FAIL: citycide/glob C
  Test "citycide/glob" in category "nimble-packages-1"
  Failure: reBuildFailed
  package test failed
  $ nimble test
    Executing task test in /Users/runner/work/Nim/Nim/pkgstemp/glob/glob.nimble
    Verifying dependencies for glob@0.9.0
        Info: Dependency on regex@>= 0.7.4 already satisfied
    Verifying dependencies for regex@0.17.0
        Info: Dependency on unicodedb@>= 0.7.2 already satisfied
    Verifying dependencies for unicodedb@0.9.0
        Info: Dependency on unicodeplus@>= 0.5.0 already satisfied
    Verifying dependencies for unicodeplus@0.8.0
        Info: Dependency on unicodedb@>= 0.8 already satisfied
    Verifying dependencies for unicodedb@0.9.0
        Info: Dependency on segmentation@>= 0.1 already satisfied
    Verifying dependencies for segmentation@0.1.0
        Info: Dependency on unicodedb@>= 0.8.0 already satisfied
    Verifying dependencies for unicodedb@0.9.0
    Compiling tests (from package glob) using c backend
  /Users/runner/work/Nim/Nim/pkgstemp/glob/src/glob/regexer.nim(10, 25) Warning: inherit from a more precise exception type like ValueError, IOError or OSError. If these don't suit, inherit from CatchableError or Defect. [InheritFromException]
  /Users/runner/work/Nim/Nim/pkgstemp/glob/src/glob.nim(345, 49) Warning: Use `re` instead; toPattern is deprecated [Deprecated]
  /Users/runner/work/Nim/Nim/pkgstemp/glob/src/glob.nim(380, 16) Warning: Use `re` instead; toPattern is deprecated [Deprecated]

  [Suite] globToRegex

  [Suite] procs accept both string & glob
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(62, 35): Check failed: "src/dir/foo.nim".matches("src/**/*.nim", false)
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(63, 35): Check failed: "src/dir/foo.nim".matches(glob("src/**/*.nim", false))
    [FAILED] matches
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(81, 19): Check failed: seqsEqual(toSeq(walkGlob("temp/**/*.{jpg,nim}")), expected)
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(82, 19): Check failed: seqsEqual(toSeq(walkGlob(glob("temp/**/*.{jpg,nim}"))), expected)
    [FAILED] walkGlob, walkGlobKinds

  [Suite] regex matching
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(121, 21): Check failed: isMatchTest("src/**/*.nim", "src/foo.nim")
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(122, 21): Check failed: isMatchTest("src/**/*.nim", "src/foo/deep.nim")
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(123, 21): Check failed: isMatchTest("src/**/*.nim", "src/foo/deep/deeper/dir/file.nim")
    [FAILED] wildcards & globstars
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(244, 21): Check failed: isMatchTest(pattern, "src/file.nim")
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(245, 21): Check failed: isMatchTest(pattern, "src/file.js")
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(246, 21): Check failed: isMatchTest(pattern, "src/deep/file.nim")
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(247, 21): Check failed: isMatchTest(pattern, "src/deep/deeper/dir/file.nim")
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(248, 21): Check failed: isMatchTest(pattern, "src/deep/deeper/dir/file.js")
    [FAILED] medium complexity

  [Suite] pattern walking / listing
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(323, 21): Check failed: seqsEqual(toSeq(walkGlob("temp/**/*.{nim,jpg}")), @[p"temp/deep/dir/file.nim",
      p"temp/not_as/deep.jpg", p"temp/not_as/deep.nim", p"temp/shallow.nim"])
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(334, 21): Check failed: seqsEqual(toSeq(walkGlob("temp/**/*.nim")), @[p"temp/deep/dir/file.nim",
      p"temp/not_as/deep.nim", p"temp/shallow.nim"])
    [FAILED] basic

  [Suite] utility procs
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(436, 32): Check failed: "src/foo.nim".contains(g.regex)
      /Users/runner/work/Nim/Nim/pkgstemp/glob/tests.nim(437, 36): Check failed: "src/dir/foo.nim".contains(g.regex)
    [FAILED] glob
  Error: execution of an external program failed: '/Users/runner/work/Nim/Nim/pkgstemp/glob/tests '
         Tip: 13 messages have been suppressed, use --verbose to show them.
       Error: Execution failed with exit code 256
          ... Command: /Users/runner/work/Nim/Nim/bin/nim c --noNimblePath -d:NimblePkgVersion=0.9.0 --path:/Users/runner/.nimble/pkgs/regex-0.17.0 --path:/Users/runner/.nimble/pkgs/unicodedb-0.9.0 --path:/Users/runner/.nimble/pkgs/unicodeplus-0.8.0 --path:/Users/runner/.nimble/pkgs/unicodedb-0.9.0 --path:/Users/runner/.nimble/pkgs/segmentation-0.1.0 --path:/Users/runner/.nimble/pkgs/unicodedb-0.9.0 --hints:off --hints:off --verbosity:0 -r tests
  stack trace: (most recent call last)
  /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/nimblecache-946033505/nimscriptapi_435504397.nim(187, 16)
  /Users/runner/work/Nim/Nim/pkgstemp/glob/glob.nimble(13, 8) testTask
  /Users/runner/work/Nim/Nim/lib/system/nimscript.nim(260, 7) exec
  /Users/runner/work/Nim/Nim/lib/system/nimscript.nim(260, 7) Error: unhandled exception: FAILED: nimble c -y --hints:off --verbosity:0 -r tests.nim [OSError]
         Tip: 1 messages have been suppressed, use --verbose to show them.
       Error: Exception raised during nimble script execution

  PASS: dvolk/gnuplot.nim C                       ( 1.48 sec)
squattingmonk commented 4 years ago

The cause of this breakage is that glob does not work with regex 0.17.0. 0.16.2 works as expected.

haltcase commented 3 years ago

Thanks for the hint @squattingmonk — I've soft-pinned the regex package to < 0.17.0 for now. I'm not sure specifically what the breakage is caused by yet.