It would be really helpful if gleam add could take a version specifier along with a package name and use that to limit what it installs.
My initial syntax proposal would be gleam add gleam_json@1.0.1. This would be a non-breaking change since you could just not specify a version and things would work as before - it is a purely additive change.
What I propose this should do is replace the version that gleam determines. eg, the current latest version of gleam_json is 2.0.0. Instead of selecting the latest version, gleam would instead select the version specified. The initial version written into manifest.toml would be the version specified, and the version guard written into gleam.toml would be the same derived version used currently, but based on the specified version instead of the latest version, eg. >= 1.0.1 and < 2.0.0.
It would be really helpful if
gleam add
could take a version specifier along with a package name and use that to limit what it installs.My initial syntax proposal would be
gleam add gleam_json@1.0.1
. This would be a non-breaking change since you could just not specify a version and things would work as before - it is a purely additive change.What I propose this should do is replace the version that gleam determines. eg, the current latest version of
gleam_json
is2.0.0
. Instead of selecting the latest version, gleam would instead select the version specified. The initial version written intomanifest.toml
would be the version specified, and the version guard written intogleam.toml
would be the same derived version used currently, but based on the specified version instead of the latest version, eg.>= 1.0.1 and < 2.0.0
.