Skip to content

Conversation

@itsjunetime
Copy link
Contributor

When updating with cargo install-update, cargo tries to automatically update all dependencies to their latest 'compatible' versions (ignoring the lockfile). However, that means that the smithay dependency, since it's a git repo with no specified commit, will just get auto-updated to the latest revision, even if that's not compatible (since semver doesn't really apply to git revisions). So this just pins the version of smithay in Cargo.toml so that updating via cargo install-update doesn't automatically update smithay to an incompatible version from the git repo.

@YaLTeR
Copy link
Owner

YaLTeR commented Jul 6, 2024

I mean... That's what the lock file is for? Niri isn't the only project that would break if you ignore the lock file.

Besides, I'm not sure cargo install (and therefore install-update) is a very expected use case in the first place. You don't get any of the session files that way.

@dragonnn
Copy link

dragonnn commented Jul 7, 2024

cargo install does support --locked flag with does take into account the lock file. As far I know it is now consider using it without the --locked flag a bad idea and it not being the default is only due bad backward compatibility

@kchibisov
Copy link
Contributor

it not being the default is only due bad backward compatibility

It was default in the past, they flipped it.

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.

4 participants