This PR allows buffrs install to make changes to the lockfile when proto dependency versions were upgraded in the manifest.
This code change is sufficient now because buffrs only support pinned versions in the manifest, so we can rely on the manifest always having the desired version. However, whenever we start supporting semantic version upgrades this logic might need to change.
How I validated that my change works
[x] check that an upgrade worked by bumping my-protos@0.0.1 to my-protos@0.0.2 succeeded on buffrs install
[x] check that an sub-dependencies were upgraded by bumping my-protos-with-deps@0.0.1 to my-protos-with-deps@0.0.2 succeeded on buffrs install
[x] automated testing
Open Item
I wasn't able to load contents from cache in case we are ignoring the locked dependency and downloading a new version because Cache receives a FileRequirement which can be created from LockedPackage but can't be created from Package. I assume this could be fixed with impl From<Package> for FileRequirement { ... }.
This PR allows
buffrs install
to make changes to the lockfile when proto dependency versions were upgraded in the manifest.This code change is sufficient now because
buffrs
only support pinned versions in the manifest, so we can rely on the manifest always having the desired version. However, whenever we start supporting semantic version upgrades this logic might need to change.How I validated that my change works
my-protos@0.0.1
tomy-protos@0.0.2
succeeded onbuffrs install
my-protos-with-deps@0.0.1
tomy-protos-with-deps@0.0.2
succeeded onbuffrs install
Open Item
I wasn't able to load contents from cache in case we are ignoring the locked dependency and downloading a new version because
Cache
receives aFileRequirement
which can be created fromLockedPackage
but can't be created fromPackage
. I assume this could be fixed withimpl From<Package> for FileRequirement { ... }
.