-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
pnpm.fetchDeps: error if lockfile version has a mismatch #317739
pnpm.fetchDeps: error if lockfile version has a mismatch #317739
Conversation
4b6584c
to
a202382
Compare
# Don't force us to use an older version of pnpm. A newer version probably generates another FOD though. | ||
jq --sort-keys "del(.. | .packageManager?)" package.json | sponge package.json | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a similar vein as Python relaxDepsHook
, this should probably be a flag that's off by default.
a202382
to
e376b03
Compare
27583fd
to
8aa3b07
Compare
I've removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit besides the comment below: The first commit message should start with pnpm.fetchDeps
,
]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
|
||
lockfileVersion="$(yq -r .lockfileVersion pnpm-lock.yaml)" | ||
if [[ ''${lockfileVersion:0:1} -gt ${lib.versions.major pnpm.version} ]]; then | ||
echo "ERROR: lockfileVersion in pnpm-lock.yaml is to new for the provided pnpm version ${lib.versions.major pnpm.version}!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started with some corrections and improvements, and continued with a suggested way to overcome this check.
echo "ERROR: lockfileVersion in pnpm-lock.yaml is to new for the provided pnpm version ${lib.versions.major pnpm.version}!" | |
echo "ERROR: lockfileVersion $lockfileVersion in pnpm-lock.yaml is" \ | |
"too new for the provided pnpm version" \ | |
"${lib.versions.major pnpm.version}! Set" \ | |
"pnpmDontCheckLockfileVersion=true to avoid this error if you're" \ | |
"sure it won't cause other issues" >&2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't do anything, as pnpm will fail with a rather cryptic error message anyway.
Can you share more details about the issue that made you remove it? |
It needed to be in mkDerivation and inside fetchDeps and got more complicated the more deeply I tested it. |
8aa3b07
to
7a1cd1f
Compare
Description of changes
Tested while updating youtube-music
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.