Closed enthus1ast closed 5 days ago
I think this was fixed in nimble[0], however the latest release is older than the fix. That said, I cannot reproduce the error.
you have stylecheck:error in your config, probably
mmh the stylecheck checking every dependency, even Nim itself instead of the project/app/lib being built is a PITA.
cc @alaviss @dom96
This is breaking nimble-packages testing. Any reason why this isn't being fixed? Simplest fix is to remove the styleCheck until this change becomes old enough.
What if we rename srcdir
to srcDir
in regex.nimble? I can't reproduce this, so no idea whether that fixes it.
Simplest fix is to remove the styleCheck until this change becomes old enough.
I guess that should fix nimble-package CI, but it won't help those using the style checker.
Agreed - best to change regex.nimble to srcDir
since that's the correct fix anyway.
I just did that. Let me know if it's fixed now.
I did this:
when (NimMajor, NimMinor) >= (1, 1):
srcDir = "src"
else:
srcdir = "src"
Now it fails for me with Error: 'srcDir' should be: 'srcdir'
. I guess the reason is I'm using choosenim (Nim 1.1 with an old nimble version?).
Koch pulls a specific Nimble commit - https://github.com/nim-lang/Nim/blob/devel/koch.nim#L137. Only if run with --latest, does it pull latest Nimble.
Seems like you need to turn off the style check as well.
@genotrance Why does Nimble care about this anyway? Nim is style insensitive, why isn't Nimble?
@dom96: His config makes Nim care.
https://github.com/nitely/nim-regex/blob/master/config.nims#L4
Seems like you need to turn off the style check as well.
That won't quite work. Users import nim-regex and then compile their programs with the stylecheck on, and AFAIK nim-regex gets stylechecked as well. That'll fail depending on the Nim version, and I'll receive complains.
I didn't try this, though, may be it won't fail? I'll try it later.
Most people aren't keeping styleCheck:error
by default. That is not the Nim default. It is breaking both in Nim package testing as well as during install time since the setting is in your root.
See https://github.com/nitely/nim-regex/pull/40. I guess I should remove that config, and just reject PRs fixing style...
@kaushalmodi - what's your take on this?
@dom96 - changing srcdir
to srcDir
is causing more heartburn than expected. What do you suggest to get this resolved?
@genotrance Unless the packages (like regex) pass the stylechecks, the users cannot use styleCheck:error
for their own packages depending on them.
I like consistencies and enforce styleCheck:error in my config. If the nimble and other popular packages cannot play well with styleCheck:error, they may be that feature should be removed.
My take would be to do whatever is needed to make styleCheck:error work. How can I help there?
I appreciate your point of view and that packages like nim-regex could conform so that users can use the flag. That being said, the whole point of Nim's style insensitivity is to allow users and packages the flexibility that they prefer and not impose it on others. Regardless, I don't want to make it a big discussion around this feature. @Araq can share his thoughts on this in general.
The specific question here is that Nimble recently changed srcdir
to srcDir
. and nim-regex used srcdir
and it is causing complaints with newer Nimble versions. nimterop on the other hand always used srcDir
but I never got complaints that I had it wrong in my config all this time. It isn't as popular as regex though.
Not sure how to proceed here. Ideas appreciated.
Not sure how to proceed here. Ideas appreciated.
It looks like removing styleCheck:error
from nim-regex config.nims is the only way forward.
@nitely I apologize for my PR causing all this trouble.
I've removed the config for the time being https://github.com/nitely/nim-regex/commit/4360c267af5390221f285561195b1166b3fec1c9
So use --styleCheck:hint
.