Recommend Semver Compatible Versioning over ~> in Docs
Pi-Cla opened this issue · comments
Since we are trying to encourage people to move away from shorthands such as ~>
, this then brings up the question of what should be "recommended" as an alternative instead. Right now the docs about gleam.toml still use ~>
in all of their examples so that should be changed to something else.
I think we could encourage the usage of semver compatible versioning like so:
Old
# The Hex packages the project needs to compile and run (optional)
# Uses the Hex version requirement format
# https://hexdocs.pm/elixir/Version.html#module-requirements
[dependencies]
gleam_stdlib = "~> 0.18"
gleam_erlang = "~> 0.2"
gleam_http = "~> 2.1"
# Local dependencies can be specified with a path
my_other_project = { path = "../my_other_project" }
# The Hex packages the project needs for the tests (optional)
# These will not be included if the package is published to Hex.
# This table cannot include any packages that are already found in the
# `dependencies` table.
[dev-dependencies]
gleeunit = "~> 0.3"
gleam_bitwise = "~> 0.3"
New
# The Hex packages the project needs to compile and run (optional)
# Uses the Hex version requirement format
# https://hexdocs.pm/elixir/Version.html#module-requirements
[dependencies]
gleam_stdlib = ">= 0.18 and < 0.19"
gleam_erlang = ">= 0.2 and < 0.3"
gleam_http = ">= 2.1 and < 3"
# Local dependencies can be specified with a path
my_other_project = { path = "../my_other_project" }
# The Hex packages the project needs for the tests (optional)
# These will not be included if the package is published to Hex.
# This table cannot include any packages that are already found in the
# `dependencies` table.
[dev-dependencies]
gleeunit = ">= 0.3 and < 0.4"
gleam_bitwise = ">= 0.3 and < 0.4"