-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] fix https://github.com/nitely/nim-regex/issues/60 #13868
Conversation
Once again the root cause is Nimble with it's stupid $nimbleDir. |
Every package should be testable without installation. Especially important packages should have a cfg with |
That's not the root cause, and The root cause is what I described above or here timotheecour#167, and keeps breaking important_packages, as just happened again today with inim (inim-repl/INim#74), see my explanation here: inim-repl/INim#74 (comment)
the short term fix is simple:
that can't work if package note: testing head vs testing latest release tagIMO important_packages should only be concerned with testing packages at their latest release tag (eg 1.2.3), not at HEAD. That's what my proposed solution would enable.
I'm on the fence on this. should be discussed further. |
Ok, that is an acceptable design. However, this PR does nothing like that and stalled. |
and yet another instance of this: c-blake/cligen#142 |
[DO NOT REVIEW YET]
fix nitely/nim-regex#60
nim-regex (after an awesome performance update) is now using
import pkg/foo
instead ofimport foo
which broke nim CI because it was usingnim c src/regex
and for some reasonsrc
isn't in the path (maybe because the logic for important_packages doesn't install foo ?)EDIT: doesn't work yet... but i've now found the root cause and it's a bug in important_packages logic, not in regex package:
nimble install regex
installs the latest release tag (13.1), as it should (we should only test latest releases, HEAD would be too unstable)but then
git clone regex
clones HEAD (which is different from latest release tag), and it fails withimport pkg/foo
since that refers to the installed regex, not the cloned one.the fix
either use nimble develop after the clone (but that has the drawback of testing HEAD instead of latest release), or (preferred), after git clone we must
git reset --hard rev
where rev is the revision used in nimble installthere are other (preexisting) issues though:
if
nimble install bar
installs foo at a specific version, (say regex at 10.0) that is different from the one implied bynimble install foo
, it can cause issuesthe obvious short term workaround is to disable regex, but the underlying issue is still there and will keep popping up unless it is fixed
EDIT
upstream regex was updated to remove
import pkg/foo
so the bug disappeared but underlying issue is still there.if we're disallowing
import pkg/foo
(btw we should have a linter to issue warnings when this is detected), that means we're forced to useimport foo
which can cause ambiguities; maybe what we need is:import thispkg/foo
to refer to current nimble package (implementation is easy, built on top ofgetNimbleFile
from #13223). I will explain this in more details later.