Closed Bug 1579902 Opened 3 months ago Closed 3 months ago

Drop mozrunner dependency on mozprofile by path


(Testing :: Mozbase Rust, enhancement, P1)

Version 3


(firefox71 fixed)

Tracking Status
firefox71 --- fixed


(Reporter: ato, Assigned: ato)




(1 file)

mozrunner depends on mozprofile by relative path (../mozprofile).
This makes it hard to release mozrunner to 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 version;

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

  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
Priority: -- → P1

Depending on mozprofile by relative path makes it hard to publish
mozrunner to 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 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
mozrunner: supply mozprofile version dependency; r=webdriver-reviewers,jgraham
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.