Fix circular dependency issues (fix #14) #15
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my attempt at resolving some issues with circular dependencies I experienced. I don't really see this PR as being perfect as I have very little idea of what I even did to resolve the issues, and honestly never figured out how the constituent system even worked.
One of the things I had to do was limit the name length of packages which is discomforting for a few reasons, but I don't know a better way to deal with.
I tweaked the constituent system until it looked "good" in a REPL (showing showing the previously missing dependencies under constituents, without erroring with infinite recursion), then I updated some of the scripts to handle namespaced packages properly, as it used to have issues linking multiple packages under the same namespace to the same Nix package.
This is probably better as a reference than an actual PR unless it looks all good to you.
I don't know how to test the results of this for accuracy well, but it was able to install Webpack and a bunch of my other dependencies, and work correctly (build system for an Elm project).