Closed Bug 1579902 Opened 3 months ago Closed 3 months ago

Drop mozrunner dependency on mozprofile by path

Categories

(Testing :: Mozbase Rust, enhancement, P1)

Version 3
enhancement

Tracking

(firefox71 fixed)

RESOLVED FIXED
mozilla71
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:

  1. 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;

  2. greater auditability by code review reflecting exactly what gets
    published on crates.io;

  3. 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: nobody → ato
Blocks: 1573798
Status: NEW → ASSIGNED
Priority: -- → P1

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.

Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7dd68c8c11f9
mozrunner: supply mozprofile version dependency; r=webdriver-reviewers,jgraham
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.