niri icon indicating copy to clipboard operation
niri copied to clipboard

Pin `smithay` version to prevent auto-updates from causing compilation errors

Open itsjunetime opened this issue 1 year ago • 3 comments

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.

itsjunetime avatar Jul 06 '24 15:07 itsjunetime

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.

YaLTeR avatar Jul 06 '24 15:07 YaLTeR

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

dragonnn avatar Jul 07 '24 16:07 dragonnn

it not being the default is only due bad backward compatibility

It was default in the past, they flipped it.

kchibisov avatar Jul 09 '24 21:07 kchibisov