Skip to content

yarn-berry_3: init at 3.8.7#398534

Merged
flokli merged 1 commit intoNixOS:masterfrom
yuyuyureka:berry3
Apr 15, 2025
Merged

yarn-berry_3: init at 3.8.7#398534
flokli merged 1 commit intoNixOS:masterfrom
yuyuyureka:berry3

Conversation

@yuyuyureka
Copy link
Contributor

@yuyuyureka yuyuyureka commented Apr 14, 2025

Things done

Split off from #355053
This is required to package things which have a yarn 3 lockfile.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@yuyuyureka yuyuyureka force-pushed the berry3 branch 6 times, most recently from 0257a76 to 8d4b677 Compare April 14, 2025 11:23
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 14, 2025
@yuyuyureka yuyuyureka changed the title yarn-berry_3: init at 3.8.6 yarn-berry_3: init at 3.8.7 Apr 14, 2025
@gador
Copy link
Member

gador commented Apr 15, 2025

As you know, I'm all for using the different yarn packaging tools to make things easier (as I stated in my original PR), but you raised an important point in this comment:

If we don't really understand what yarn is doing under the hood to arrive at this hash, it will explode in our faces sooner or later.

So how exactly is adding yarn berry 3 to nixpkgs helping your argument? Isn't it worth waiting for your own prototype to mitigate this problem and not rush to integrate yarn berry 3?

@yuyuyureka
Copy link
Contributor Author

yuyuyureka commented Apr 15, 2025

The yarn-berry-fetcher which I've been working on can reliably build a cache matching the hashes in the lockfile, erroring out if anything is not reproducible exactly to the content-addressed description in the lockfile (different from using yarn, which might silently generate different result).

But that still means for a yarn 3 lockfile it'll generate a yarn 3 cache in the fixed-output-derivation, and you'll need to run yarn 3 inside the normal/non-fixed-output derivation to produce a usable node_modules from the cache.

@flokli flokli merged commit ca3ff6a into NixOS:master Apr 15, 2025
34 of 35 checks passed
@yuyuyureka yuyuyureka deleted the berry3 branch April 15, 2025 13:15
@DimitarNestorov
Copy link
Member

Why was this merged with 0 approvals? The update script doesn't work.

@flokli
Copy link
Member

flokli commented Apr 17, 2025

Why was this merged with 0 approvals? The update script doesn't work.

Consider me hitting the merge button an approval. I initially tested an earlier version of the PR, where the attribute names were still different. Fixed in #399488 (and a bump in #399489)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants