Skip to content

Conversation

f-f
Copy link
Member

@f-f f-f commented Jun 9, 2025

I forgot why we need to be stuck on Spago 0.93.19, so here's a PR to see what CI thinks of it.

We changed the way test dependencies are included, so I had to separate the test utilities into their own package. Otherwise it should be a pretty boring patch.

@thomashoneyman
Copy link
Member

If I remember correctly it’s because of the lock file format changing. It may be a bigger patch than you expect to update Spago 😄 I was thinking we could switch to jeslie’s Spago builder going forward.

@f-f
Copy link
Member Author

f-f commented Jun 11, 2025

@thomashoneyman I did switch to jeslie0's build machinery and it works (things are good on my machine and CI seems happy)

There is only one gotcha, which is that it does something to the foreign.js files and that means that purs-backend-es doesn't see them so we have a manual copy step.
The files are in the output folder when it gets passed to the optimiser, but it just can't see them, and I couldn't find exactly what the bug is. If you have ideas about what it could be I'm happy to fix it but I'm also happy to leave as is since it works.

@f-f f-f changed the title Update to spago 0.93.44 Update to spago 0.93.44 and Nixpkgs 25.5 Jun 11, 2025
@f-f f-f requested a review from thomashoneyman June 11, 2025 20:56
@thomashoneyman
Copy link
Member

@toastal curious if you have any thoughts here. I can try and get a review in over the next day or so, but I’m traveling so if you want to merge I am OK with it as-is.

# I suspect this is because of a quirky interaction between Nix and `copyFile`,
# but I'm not sure how to fix it so we work around it by copying the foreign
# modules by hand.
for dir in output/*/; do
Copy link
Contributor

@toastal toastal Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not something like find output -type d -maxdepth 1 -print0 | xargs -0 -P$NIX_BUILD_CORES -I{} …? Could be a bit quicker to run this in parallel.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't parse that command - do you have a more precise suggestion? I'm happy with the for loop because it's very readable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah you did edit in a runnable command, I must have seen an outdated version. That works just as well, but I'd still prefer the for loop

@toastal
Copy link
Contributor

toastal commented Jun 12, 2025

Other than the side quest of possibly removing either flake-utils or the dependence on Nixpkgs+Flakes1, the general Nix code seems just fine.

@thomashoneyman Tho ever since the PureScript community moved to Discord, I haven’t actively been following the project in my recreational time (nor have I had any work in it in recent years) so I don’t really know what has been going on with any of the tooling. If there were some PS work, I would probably be more aware of what is happening & trying to pitch in.

Footnotes

  1. the use case for flake-utils is providing a Flake for a project but either not using Nixpkgs at all or not using Flakes to managing Nixpkgs version pinning (using npins, niv, or other alternatives), in which case you would not have lib in your Flake—otherwise lib already has everything you need to ‘loop’ over architectures without incurring an extra dependency.

@thomashoneyman
Copy link
Member

The tooling development still happens on the registry-dev and spago repositories so it's in the open (very little is discussed on Discord). No worries about following along — just thought you might have some Nix ideas to contribute, as you had done a nice rework of the package a little while ago! Alas, I no longer work professionally in PureScript myself.

@f-f f-f merged commit 825d02b into master Jun 13, 2025
17 checks passed
@f-f f-f deleted the update-to-latest-spago branch June 13, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants