-
Notifications
You must be signed in to change notification settings - Fork 9
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
reproduce infinite recursion with runNixOSTest #56
base: main
Are you sure you want to change the base?
reproduce infinite recursion with runNixOSTest #56
Conversation
Thank you very much for the reproducer! I don't think this is related to #50, as it's also reproducible if i drop that commit from my local branch. I'll look into it a bit further after lunch, but the issue looks like it be in our checks loader?
|
i'm curious which commit you dropped as i branched off of
this is a symptom of the bug that is supposedly fixed in #55. if you merge that branch into here then you'd get the infinite recursion. or, on this branch, you can reproduce it by building the check that is exposed via the package passthru:
|
very curious find in db234a5. the usage of |
|
08647c8
to
f071aaf
Compare
there may be missing arguments indeed because of that. however, to me that doesn't explain why the |
69b8e6c
to
1d5e323
Compare
This took me a while to understand, as I followed a few false leads, but I think in the end it's rather simple. Minimal example (in a repl with nixpkgs loaded)
Thinking about it, it makes sense to me as |
The problem in the new reproducer has a similar root-cause in how So the problem here is that you are trying to import a module from So in your example you could just remove flake from your module args and use rely on the flake arg you get from the top-level package function. If you need to refer from modules in other files, it might be easiest to use the wrapping-function around modules added in #50. If you need the flake as a module arg in all your modules, I think you would need an entrypoint for nixosTest which allows you to pass specialArgs, which doesn't have the same limitations as _module.args has w.r.t. to imports. |
f380ae5
to
6a0479c
Compare
6a0479c
to
e1f45e5
Compare
thank you for pointing out the right lead! i've got to a point where i got my use-case working, and i demonstrated it in this PR. i believe i did find a minor bug along the way:
this works for inline modules, however the composable solution is to be able to reuse modules in |
this reproduces the strange behavior uncovered by #55.
i think it's a bug.
cc @phaer