Drop mozrunner dependency on mozprofile by path
Categories
(Testing :: Mozbase Rust, enhancement, P1)
Tracking
(firefox71 fixed)
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
References
Details
Attachments
(1 file)
mozrunner
depends on mozprofile
by relative path (../mozprofile
).
This makes it hard to release mozrunner
to crates.io because cargo
is unable to figure out which version it should depend on. I believe
the relative path dependency is largely a historic artifact from
before Rust code in central was part of the same cargo workspace.
Within the workspace, cargo seems able to resolve that mozprofile
lives under testing/mozbase/rust/mozprofile/ rather than
third_party/rust/. If we made mozrunner
rely on an explicit version
of mozprofile
this would have a number of advantages:
-
it would make it easier to publish the crate as one atomic
operation, as we currently have to pass--allow-dirty
with a local
edit to the right crates.io version; -
greater auditability by code review reflecting exactly what gets
published on crates.io; -
and we would be warned of possible API breakage when a dependent
crate goes beyond the semantic version range defined by its Cargo.toml.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Depending on mozprofile by relative path makes it hard to publish
mozrunner to crates.io because cargo is unable to work out the
version range the crate needs.
By specifying both a path and a semver range we ensure mozrunner
uses the in-tree version of mozprofile when building locally,
and the upstream crates.io version when published and used elsewhere.
This means this version number must be bumped every time a new
(backwards incompatible) mozversion is released.
It is debatable whether the version range should be exact, i.e. "0.6.0",
but I opted to go with "0.6" which is how I would normally define
a crate dependency. As long as mozprofile continues to follow the
principles of semantic versioning this should be fine.
Comment 3•5 years ago
|
||
bugherder |
Description
•