facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.19k stars 3k forks source link

Stop relying on cargo_vendor.sh #9224

Closed Atry closed 2 years ago

Atry commented 2 years ago

Summary:

  1. Stop generating Cargo.toml We want to use autocargo to generate our Cargo.lock - to do that we need to have a checked-in Cargo.toml for it to work with.

  2. Move Cargo.toml Because we already had Cargo.toml as a gitignored file in hphp/hack adding a non-ignored version it caused problems for any dev who rebased across that checkin (mercurial complained about the file with a non-obvious error) - so had to move the main Cargo.toml for hack to hphp/hack/src.

  3. Tell autocargo to start generating Cargo.lock Use the new feature from D38836138 to generate the Cargo.lock in hphp/hack/src.

  4. Since Cargo.toml moved .cargo/config also needed to move to be under hphp/hack/src.

  5. Set .cargo/config to point at using fbsource/third-party/rust/vendor This used to be done as the first part of cargo_vendor.sh (when sourcing the vendor files) but now we want to leave as the standard.

  6. Add a script to rewrite .cargo/config to use absolute paths. The ubuntu and dune tests move the hphp/hack directory to a temporary location - so for those tests we need to rewrite .cargo/config to use absolute paths instead of the fbsource-relative paths that they normally contain.

Reviewed By: shayne-fletcher

Differential Revision: D39732535

facebook-github-bot commented 2 years ago

This pull request was exported from Phabricator. Differential Revision: D39732535

facebook-github-bot commented 2 years ago

This pull request was exported from Phabricator. Differential Revision: D39732535

facebook-github-bot commented 2 years ago

This pull request was exported from Phabricator. Differential Revision: D39732535