You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.
Sometimes, instead of installing a package's exact version, you only care about something "compatible" with that version. It'd be nice if we can run wapm install Michael-F-Bryan/hello-world@^0.2 to get a version of Michael-F-Bryan/hello-world that satisfies the semver constraint, ^0.2.0 (i.e. 0.2.5, but not 0.3.0).
For a more concrete example, on the WAPM backend @ayys and I want to be able to automatically pick up bugfixes to wit-pack as they are released while preventing breaking changes from being installed like you would get from a naive wapm install Michael-F-Bryan/hello-world.
Proposed solution
In theory, this should just be a case of updating AddedPackages::extract_name_and_version() to return a VersionReq here
One alternative would be to allow people to use a VersionReq with wapm search to find the version compatible with a particular requirement, which would then let you run wapm install package@specific_version like normal. I don't think splitting the operation into two steps would help much, though.
The text was updated successfully, but these errors were encountered:
Motivation
Sometimes, instead of installing a package's exact version, you only care about something "compatible" with that version. It'd be nice if we can run
wapm install Michael-F-Bryan/hello-world@^0.2
to get a version ofMichael-F-Bryan/hello-world
that satisfies the semver constraint,^0.2.0
(i.e.0.2.5
, but not0.3.0
).For a more concrete example, on the WAPM backend @ayys and I want to be able to automatically pick up bugfixes to
wit-pack
as they are released while preventing breaking changes from being installed like you would get from a naivewapm install Michael-F-Bryan/hello-world
.Proposed solution
In theory, this should just be a case of updating
AddedPackages::extract_name_and_version()
to return aVersionReq
herewapm-cli/src/dataflow/added_packages.rs
Lines 57 to 61 in 6b7d7f1
Then, this line would call
PackageKey::new_registry_package_range(n, v)
instead ofPackageKey::new_registry_package(n, v)
.wapm-cli/src/dataflow/added_packages.rs
Line 28 in 6b7d7f1
Alternatives
One alternative would be to allow people to use a
VersionReq
withwapm search
to find the version compatible with a particular requirement, which would then let you runwapm install package@specific_version
like normal. I don't think splitting the operation into two steps would help much, though.The text was updated successfully, but these errors were encountered: