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

Please install rustfmt to the docs.rs doc build environment #357

Closed
Lokathor opened this issue May 20, 2019 · 12 comments · Fixed by #913
Closed

Please install rustfmt to the docs.rs doc build environment #357

Lokathor opened this issue May 20, 2019 · 12 comments · Fixed by #913

Comments

@Lokathor
Copy link

My crate builds bindings, and the bindings output comes out as all one line without rustfmt available.

@jyn514
Copy link
Member

jyn514 commented Dec 7, 2019

@Lokathor It looks like this is fixed in new versions of fermium, probably because of #407. Can you take a look at https://docs.rs/fermium/0.1.4/src/fermium/SDL2-v2.0.8-x86_64-pc-windows-msvc.rs.html#4692-4695 and make sure it looks about right?

@Lokathor
Copy link
Author

Lokathor commented Dec 7, 2019

Well, that's correct, but probably because I have since stopped using bindgen on docs.rs. The file you linked is just permanently in the repo: https://github.com/Lokathor/fermium/blob/master/src/SDL2-v2.0.8-x86_64-pc-windows-msvc.rs

but i guess we can close this and someone else will report if it's still a problem later.

@Lokathor Lokathor closed this as completed Dec 7, 2019
@jyn514
Copy link
Member

jyn514 commented Dec 7, 2019

I'd actually rather keep it open until I know it's fixed, sorry we took so long you found a workaround instead.

@jyn514
Copy link
Member

jyn514 commented Mar 23, 2020

Mentoring instructions:

If you have any questions, feel free to reach out here or on Discord.

@elmurci
Copy link

elmurci commented Mar 23, 2020

add_component requires two parameters:

self.toolchain.add_component(&self.workspace, "rustfmt")?;

@elmurci
Copy link

elmurci commented Mar 24, 2020

@jyn514 the solution above didn't work...

@jyn514
Copy link
Member

jyn514 commented Mar 24, 2020

What do you mean by didn't work? Can you put up a draft branch?

@elmurci
Copy link

elmurci commented Mar 24, 2020

adding the command:

self.toolchain.add_component(&self.workspace, "rustfmt")?;

to update_toolchain

@jyn514
Copy link
Member

jyn514 commented Mar 24, 2020

@elmurci can you join the discord so I can help you debug without spamming notifications for people watching the issue? https://discord.gg/f7mTXPW

@elmurci
Copy link

elmurci commented Mar 24, 2020

I managed to fix it. Putting it here as it may help others.
The problem was due to a dependency (tonic-build) having rustfmt in its features section in cargo.toml:

...
[features]
default = ["transport", "rustfmt", "prost"]
...

I solved it by disabling tonic-build's rustfmt dependency in my project's cargo.toml:

...
[build-dependencies]
tonic-build = { version = "0.1.1", default-features = false, features = ["transport"] }
...

After doing this it built correctly.

@jyn514
Copy link
Member

jyn514 commented Mar 30, 2020

@pietroalbini if rustfmt isn't available on the latest nightly, should we refuse to update the toolchain or instead remove the rustfmt component? I lean towards not updating but I could be convinced otherwise.

@pietroalbini
Copy link
Member

I'd prefer not updating as well.

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

Successfully merging a pull request may close this issue.

4 participants