-
Notifications
You must be signed in to change notification settings - Fork 132
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
RFC: depend on the PureScript compiler #98
Comments
you wouldn't need to make some |
Why go to the extent of including the compiler itself? One solution to this problem could be to just specify which version of the compiler with which a package set is compatible and verify that the correct compiler version is being used when building the project. In short, I don't fully understand the tradeoffs here. What gains does one get through this approach and at what costs? |
@JordanMartinez good questions. In the end, my main goal here is the following:
Now, shortly after writing down this issue I realized that baking the compiler into Spago is not a good idea. Because this means tying the Spago version to a Purs version, and this implies some uncomfortable things like:
So, what we should really do is to make package-sets aware of the compiler version they should be run in. This happens already with purescript/package-sets, where the minimum compiler version is stated in the release name itself. I think this would be a good solution for Spacchetti. Then, we should check that we're running at least that compiler version in This would be already enough to have decent assurance and prevent you from running broken packages. Now, the Stack approach goes even further, as Stack will download the right compiler version for you. It'd be nice, but it would imply some amount of work that we can skip for now. |
I agree.
That sounds like a good long-term feature to implement eventually since it's not quite a pain point that needs to be addressed in this current context. |
Cool, since all of this makes sense I'll close it in favor of spacchetti/spacchetti#63 and #101 |
Following up from this Discourse thread, a big problem seems to be that when we have breaking changes in the compiler there are "ecosystem splits", and picking the right packages is hard (especially with bower) if the people just does
npm install purescript
(from personal experience, the 0.12 transition was indeed quite bad).Spago is currently not immune to this problem: we're wrapping whatever compiler the user has installed, so if we have a post-0.12 package set, it's not gonna work if the user has purs-0.11 installed. In general, the "compiler version the package-set is compatible with" is not checked against "compiler version currently installed", and this is not right! (as it's easy to diverge)
As usual, the "Stack solution" for this is really good:
The downside of this is that the tooling (read: editor integrations) will have to talk to spago instead of the compiler for things like
purs ide
.In our case we would not download a version of the compiler, but we could:
spago ide
instead ofpurs ide
The text was updated successfully, but these errors were encountered: