Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sxyazi
Copy link
Owner

@sxyazi sxyazi commented Sep 24, 2025

Fixes #3197

@sxyazi sxyazi merged commit 9f39363 into main Sep 24, 2025
6 checks passed
@sxyazi sxyazi deleted the pr-66848a59 branch September 24, 2025 12:17
@philocalyst
Copy link

Wouldn't a write still be attempted? This stops the pin from being overwritten; but yazi will still attempt to write to the file even if the contents haven't been changed (Just tested on nightly).

My guess is that it would be trivial to derive equality or partial equality on the data structure you're using internally to represent the package file, and only write when it's different than the old. I could submit a PR for this.

This is useful mainly for dealing with setups (like those encouraged by nix) that are designed to be immutable. But also should make Yazi more reliable.

@sxyazi
Copy link
Owner Author

sxyazi commented Sep 24, 2025 via email

@philocalyst
Copy link

I suppose you're right, but as of right now, those fields don't exist, and yazi will fail on an immutable package.toml even if it has nothing to change. Is this really the desired behavior? Couldn't yazi just throw a WARN?
As in:
WARNING: Couldn't write to package.toml, updates may not be saved.

@sxyazi
Copy link
Owner Author

sxyazi commented Sep 24, 2025 via email

@philocalyst
Copy link

It's not worth the effort. (I didn't know about those on nixpkgs)

Thank you for the kind and informed responses.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin revision pinning is ignored upon install

3 participants