Open disruptek opened 3 years ago
Not much we can do about this in Nimble AFAIK.
I think this is actually a Nim bug. The findExe
in Nimscript should find .cmd, the os.findExe proc has a parameter to influence this: https://nim-lang.org/docs/os.html#findExe%2Cstring%2Cbool%2CopenArray%5Bstring%5D. I'll move it to the Nim repo.
Annoyingly, nimble check complains that I need the skipDirs statement even when I include this.
Have you tried installNim = ["testes.nim"]
?
This is what I get when I add installNim = ["testes.nim"]
to my testes.nimble
:
Error: Could not validate package:
... Could not read package info file in /home/adavidoff/git/testes/testes.nimble;
... Reading as ini file failed with:
... Invalid section: .
... Evaluating as NimScript file failed with:
... /home/adavidoff/git/testes/testes.nimble(14, 1) Error: undeclared identifier: 'installNim'
... printPkgInfo() failed.
nimble v0.12.0 compiled at 2021-01-10 00:52:13
git hash: couldn't determine git hash
Despite the error message, this is the nightly release build of Nimble from the following nightly release:
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-01-10
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: dbff2cd938b326279de0f3f97b2dd8c54a90468a
active boot switches: -d:release
Sorry, I meant installFiles
.
Error: Package 'testes' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'testespkg', but file 'testicles.nim' is in a directory named 'tests' instead. This will be an error in the future.
Hint: If 'tests' contains source files for building 'testes', rename it to 'testespkg'. Otherwise, prevent its installation by adding `skipDirs = @["tests"]` to the .nimble file.
Failure: Validation failed
this seems related: https://github.com/nim-lang/Nim/issues/16447
also relevant: https://github.com/nim-lang/Nim/issues/14292
The findExe in Nimscript should find .cmd, the os.findExe proc has a parameter to influence this
it should indeed find .cmd by default given these definitions:
proc findExe(exe: string; followSymlinks: bool = true; extensions: openArray[string] = ExeExts): string
ExeExts = ["exe", "cmd", "bat"]
Per title, I want the following in my
skiplists.nimble
:but instead I need to use
because it seems that on Windows (such as found in GitHub Actions CI) Nimble doesn't install the
testes
binary in such a way thatfindExe
can invoke it.Perhaps relevant bits from https://github.com/disruptek/testes
.nimble
:Annoyingly,
nimble check
complains that I need theskipDirs
statement even when I include this.