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

[urgent] nim CI broken #41

Closed timotheecour closed 4 years ago

timotheecour commented 4 years ago

/cc @citycide

https://github.com/citycide/glob/pull/37 had green tests but looks like it might've broken nim CI (oups, my bad, but only partly ;-) ), eg see https://github.com/nim-lang/Nim/pull/11824/checks?check_run_id=396387525

Failure: reBuildFailed
package test failed
$ nimble test
  Executing task test in d:\a\1\s\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.13.0
      Info: Dependency on unicodedb@>= 0.7.2 already satisfied
  Verifying dependencies for unicodedb@0.7.2
      Info: Dependency on unicodeplus@>= 0.5.0 already satisfied
  Verifying dependencies for unicodeplus@0.5.1
      Info: Dependency on unicodedb@>= 0.7 already satisfied
  Verifying dependencies for unicodedb@0.7.2
  Compiling tests (from package glob) using c backend

[Suite] globToRegex

[Suite] procs accept both string & glob
    d:\a\1\s\pkgstemp\glob\tests.nim(59, 35): Check failed: "src/dir/foo.nim".matches(glob("src/**/*.nim", false))
  [FAILED] matches
    d:\a\1\s\pkgstemp\glob\tests.nim(77, 19): Check failed: seqsEqual(toSeq(walkGlob("temp/**/*.{jpg,nim}")), expected)
    d:\a\1\s\pkgstemp\glob\tests.nim(78, 19): Check failed: seqsEqual(toSeq(walkGlob(glob("temp/**/*.{jpg,nim}"))), expected)
  [FAILED] walkGlob, walkGlobKinds

[Suite] regex matching

[Suite] pattern walking / listing
    d:\a\1\s\pkgstemp\glob\tests.nim(319, 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"])
    d:\a\1\s\pkgstemp\glob\tests.nim(326, 21): Check failed: seqsEqual(toSeq(walkGlob("temp/*.nim")), @[p"temp/shallow.nim"])
    d:\a\1\s\pkgstemp\glob\tests.nim(330, 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
    d:\a\1\s\pkgstemp\glob\tests.nim(346, 21): Check failed: seqsEqual(toSeq(walkGlob("*/a.txt", "temp_leading_magic")),
          @[p"foo/a.txt", p"bar/a.txt", p"baz/a.txt"])
    d:\a\1\s\pkgstemp\glob\tests.nim(352, 21): Check failed: seqsEqual(toSeq(walkGlob("???/*/z1.txt", "temp_leading_magic")),
          @[p"lol/inner/z1.txt"])
    d:\a\1\s\pkgstemp\glob\tests.nim(356, 21): Check failed: seqsEqual(toSeq(walkGlob("*/?????/*/z1.txt", "temp_leading_magic")),
          @[p"lol/inner/two/z1.txt"])
    d:\a\1\s\pkgstemp\glob\tests.nim(360, 21): Check failed: seqsEqual(toSeq(walkGlob("*/*/?????/*/z1.txt", "temp_leading_magic")),
          @[p"lol/inner/three/four/z1.txt"])
  [FAILED] leading magic
    d:\a\1\s\pkgstemp\glob\tests.nim(368, 21): Check failed: seqsEqual(toSeq(walkGlob("temp/**", options = options)), @[p"temp/deep",
    p"temp/deep/dir", p"temp/deep/dir/file.nim", p"temp/not_as",
    p"temp/not_as/deep.jpg", p"temp/not_as/deep.nim", p"temp/shallow.nim"])
  [FAILED] `Directories` includes matching directories in the results
    d:\a\1\s\pkgstemp\glob\tests.nim(380, 21): Check failed: seqsEqual(toSeq(walkGlob("TEMP/**", options = o)), @[p"temp/deep/dir/file.nim",
    p"temp/not_as/deep.jpg", p"temp/not_as/deep.nim", p"temp/shallow.nim"])
  [FAILED] `IgnoreCase` enables case insensitive matching
    d:\a\1\s\pkgstemp\glob\tests.nim(416, 21): Check failed: seqsEqual(toSeq(walkGlob("temp/*.nim", options = options)),
          @[getCurrentDir() / p"temp/shallow.nim"])
  [FAILED] `Absolute` makes returned paths absolute

[Suite] utility procs
    d:\a\1\s\pkgstemp\glob\tests.nim(426, 20): Check failed: g.pattern == patternString
    g.pattern was src\**\*.nim
    patternString was src/**/*.nim
    d:\a\1\s\pkgstemp\glob\tests.nim(427, 17): Check failed: g.base == "src"
    g.base was 
    d:\a\1\s\pkgstemp\glob\tests.nim(428, 18): Check failed: g.magic == "**/*.nim"
    g.magic was src\**\*.nim
    d:\a\1\s\pkgstemp\glob\tests.nim(429, 21): Check failed: g.regexStr == r"^src/(?:[^\/]*(?:\/|$))*[^/]*\.nim$"
    g.regexStr was ^src\*[^/]*\*\.nim$
    d:\a\1\s\pkgstemp\glob\tests.nim(430, 32): Check failed: "src/foo.nim".contains(g.regex)
    d:\a\1\s\pkgstemp\glob\tests.nim(431, 36): Check failed: "src/dir/foo.nim".contains(g.regex)
    d:

this might due to your comment here: https://github.com/citycide/glob/pull/38#issuecomment-575849206

¹ seems AppVeyor has made VS projects the default mode within the last year, which broke the Windows tests. I should look into putting everything into GitHub actions at some point.

proposal 1 (temporary fix)

proposal 2 (better)

timotheecour commented 4 years ago