infinite recursion when using inputs #742
Labels
No labels
dependencies
difficulty::high
difficulty::low
difficulty::medium
good first issue
help wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
justin/makes#742
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mimimal reproduction flake:
https://github.com/nrdxp/repro
Infinite recursion occurs the moment one tries to access
inputsfrom "makes.nix" in any fashion. It happens with both stable and unstable interface. To reproduce simply enter the flake's devshell and runm ..Interesting, and also seems simple, I'm gonna drop here examples that work and ones that do not work so you see the pattern
Works:
Works:
Works:
Fails:
Fails:
Fails:
inputs depends on evaluating the section of the module system that defines the inputs
if for evaluating the inputs section of the module system you somehow need the inputs, it fails.
since
ais not part of the module system, then inputs can't be evaluated, and nixpkgs.lib.modules.evalModules tries to eval the inputs while displaying the error message, which depends on evaluating the module in the first placeI see, what we really wanted to do was pass a reference to the
selfinput to the nomad deployment task like so:there is not much we can do about the specific case you mention:
it fails even if you did not use inputs at all:
the infinite recursion is born after a failure in the first place,
so just remove the original failure (option foo does not exist) and it'll work as expected
Just a few ideas on where the failure may be:
nomadDeployNamespacesis an option?nomadDeployNamespaces?normally for testing I just replace makes-src with /path/to/my/local/dev/makes
This is probably a (camouflaged) variant of https://github.com/fluidattacks/makes/pull/575
Ah! Very interesting 🛩️
So
nomadDeployNamespacesshould exist and I am pulling the makes script directly from our WIP branch which contains all the needed bits from the Nomad PR as rebased on some of our own patches. So unless there is some typo somewhere, these the conditions for success should be met in this case, unless I am misunderstanding the situation?I just checked-in your branch and:
From what I see you added a module here:
github.com/input-output-hk/makes@d834344bd4and it only defines:
So you should not be configuring it like:
nomadDeployNamespaces = xxxbut more like this:
and then
m . /deployNomad/example$ just m . /deployNomad/example(this builds a devmand runs the thing)it now works! (fails because I used a fake directory for example purposes)
Ha! Who had thought a forgotten rebase of mine / wrong commit would lead to an inifinte recursion error. 😄
@kamadorueda thanks for the excellent hunting down!
sorry for false alarm, and thanks for the help! 🙏
This kind of things are gonna help with such debugging in future situations:
https://github.com/NixOS/nix/pull/5389