bootstrap on windows tells me to source .cargo/env even though that doesn't exist

RESOLVED FIXED in Firefox 53

Status

defect
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: benjamin, Assigned: rillian)

Tracking

(Depends on 1 bug)

unspecified
mozilla53
Dependency tree / graph

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

STR:
* Windows 10 build machine
* run ./mach bootstrap, option 2 for full desktop build env
* bootstrap installs rust and then prints a message that I should add the following to my .bash_profile:
  source c:\Users\benja\.cargo\env

Expected:
* that instruction should work

Actual:
~/.cargo/env does not exist on Windows (it does on *nix)
~/.cargo/bin does have the binaries, so if I add that to my PATH directly everything is fine
I suspect ~/.cargo/env doesn't exist on Windows because the MozillaBuildBootstrapper installs rustup with `--no-modify-path` and then pokes it into msys/etc/profile.d manually. I thought that meant you didn't need to add it directly yourself though.

If so, the bug is printing the path advice unnecessarily.
Depends on: 1318756
Won't that break if somebody reinstalls or upgrades mozillabuild?
Probably. `./mach bootstrap` tries to detect if rust is installed in `~/.cargo/bin` but not in path, and prints the same advice about updating the path.

Running the rustup installer manually on Windows doesn't seem to create `~/.cargo/env`. Perhaps it's considered unhelpful on Windows, where `sh` isn't necessarily present. I want to resolve this by checking if `~/.cargo/env` exists and just suggesting the user update PATH manually if it's not present.

See also bug 1320721.
Assignee: nobody → giles
Comment on attachment 8817665 [details]
Bug 1321292 - mozboot: Don't suggest non-existent .cargo.env.

https://reviewboard.mozilla.org/r/97882/#review98234
Attachment #8817665 - Flags: review?(gps) → review+
Pushed by gszorc@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2b1f8432c519
mozboot: Don't suggest non-existent .cargo.env. r=gps
https://hg.mozilla.org/mozilla-central/rev/2b1f8432c519
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.