Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cargo-make support #4191

Merged
merged 10 commits into from
May 22, 2020
Merged

Add cargo-make support #4191

merged 10 commits into from
May 22, 2020

Conversation

topecongiro
Copy link
Contributor

This PR adds support for cargo-make to ease the development of rustfmt. Also, I removed .cargo/config file as it was not working as intended when we run cargo command in subdirectories.

@calebcartwright
Copy link
Member

calebcartwright commented May 20, 2020

Good catch on the relative paths in the old cargo config 🤦‍♂️

It's surprising to see the Windows jobs failing, and I don't see anything in the cargo make config that explains it

@@ -39,13 +39,15 @@ jobs:
override: true
profile: minimal
default: true

- name: cargo-make
run: cargo install --force cargo-make
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth trying the GitHub Actions (https://github.com/sagiegurari/cargo-make#usage-ci-github-actions or https://github.com/marketplace/actions/rust-cargo-make) approach for grabbing cargo-make to see if that speeds things up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the advice! I have added rustc-cargo-make action.

Copy link
Contributor Author

@topecongiro topecongiro May 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, unfortunately, it looks like the rustc-cargo-make does not pick up the latest cargo-make even when told to do so 🤔 I will just use cargo install approach for now.

[tasks.test-subproject]
condition = { env_set = ["RUSTFMT_MAKE_MANIFEST_PATH"] }
script = [
"cargo test --manifest-path ${RUSTFMT_MAKE_MANIFEST_PATH}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems the Windows jobs aren't substituting here though seems right to me based on a cursory reading of the cargo make docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need to change script_runner on windows: sagiegurari/cargo-make#62.

@topecongiro
Copy link
Contributor Author

Great, finally it's green 🥺

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@topecongiro topecongiro merged commit e36ee52 into rust-lang:master May 22, 2020
@topecongiro topecongiro deleted the cargo-make branch May 22, 2020 01:48
bradleypmartin pushed a commit to bradleypmartin/rustfmt that referenced this pull request May 25, 2020
@karyon
Copy link
Contributor

karyon commented Oct 27, 2021

backport not needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants