-
Notifications
You must be signed in to change notification settings - Fork 80
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
Reimplement spago to manifest code #673
Conversation
I'm guessing I need to add |
Thanks for taking this on, @JordanMartinez! I have a few comments, and @f-f should take a look, but on the whole I think it's a good direction. I already commented on some of this, but we should add tests to the |
Since I opened this PR before I read over #672, I'm actually thinking this is the wrong approach to take and my idea about storing The concerns I have here are:
I'd rather have the package managers consume their own config files and produce a |
I think this approach is by far the least disruptive, and my understanding is that we have reached a consensus that this is a good way to move forward. (see PR comments from Thomas anticipating having multiple config parsers explicitly) Re your concerns:
I'd rather not. As I tried to make clear in the whole #672 thread, I am of the opinion that passing data out-of-band is a terrible idea and a good way to dig a ditch similar to the one we're trying to climb out of with the Registry. |
Re this PR: it looks good so far, and I think it's good to go once Thomas' comments are addressed |
I think @JordanMartinez meant that we support Spago configs by relying on That said, the Spago config is simple enough that I prefer to decode it directly rather than use a CLI. (Not that this would be the case for all configs we can handle; we shell out to Dhall, for example, for spago.dhall files.)
As @f-f said, I don't consider this a problem. I can see an argument for making the registry library backend-independent, since it can be depended on directly by package managers, but the registry application explicitly runs on Node on Linux. We already bind to plenty of Node-specific libraries for that reason.
I agree with @f-f here that I'm not super worried about mismatches in the config parsing. If we can't parse the config then the package is rejected and it's up to the package manager to get a patch merged that fixes the config; they can always fall back to committing a purs.json file in the meantime. I'm struggling to envision a way our parsing would succeed, but the resulting manifest would be different from what the author intended. |
Ok, but I'll have to get to this another time. Likely not today. |
Sounds good, @JordanMartinez. I'm happy to pair on this to get it through quickly, if you'd like. |
Here's the tracking for adding |
cc: @JordanMartinez this is ready for a look if you'd like to verify it. |
@thomashoneyman Looks good to me! |
Fixes the first part of purescript/spago#1122 (comment):