-
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
Publish rebuilds with another version #1110
Comments
The As you noted in the screenshot, the version bounds in the configuration allow for the version that is being used in the rebuild. I believe the logic we are using for inferring the bounds is correct (assuming that all the patch version in a minor release are not going to introduce breakage), and I believe the SemVer of that package is not correct since it introduced breakage. You should edit your configuration to restrict the bounds from using the breaking version. |
I also think that is correct. But the rebuild is failing. To rebuild version 0.4.2 should be downloaded. Possibly we should even consider to rebuild in a temporary directory not to mess with the main cache
Which package? arrays-extra or foldable-traversable-extra ?
This is not the problem because in the new version that function is also there https://pursuit.purescript.org/packages/purescript-arrays-extra/0.4.2/docs/Data.Array.Extra.First#v:modifyOrSnoc the problem is is that the source file is not available for the compiler |
Ah, I misread the error in the screenshot - indeed everything else is correct, except that Spago is not installing the missing packages. We should be fetching them before issuing a rebuild. |
Probably? That would be the first thing I would try. Then I would add a test and see how it goes. (tip for tests: use |
|
Yes, Spago carries a lot of local state through its Reader instance. I think it's fine to call it from other places as long as we pass the right flags in. The way we pass in a "package name" to select is via the |
To run fetch with a different env than public i was thinking to use this function https://github.com/purescript/spago/blob/master/core/src/Prelude.purs#L73 That function takes an env, main makes such an env with this function https://github.com/purescript/spago/blob/master/bin/src/Main.purs#L933 That function would have to be moved somewhere else if the publish command is to make use of it. |
These "env creation" functions are to be considered "expensive" (in term of running time), and are best run only at the beginning of the program, which is why they are sitting in the Once you have your hands on a "big enough" environment, you can restrict it to a smaller one - e.g. in the publishing flow we already get a spago/src/Spago/Command/Publish.purs Lines 363 to 378 in b450892
|
that's a good idea |
normal
npx spago build
works fineThe text was updated successfully, but these errors were encountered: