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

Provide a way to interpolate crate version in html_root_url #42300

Open
dtolnay opened this Issue May 29, 2017 · 2 comments

Comments

Projects
None yet
5 participants
@dtolnay
Copy link
Member

dtolnay commented May 29, 2017

In Serde we work around this by having a reminder in Cargo.toml to update the html_root_url when releasing a new version. serde-rs/serde@dc7ab26

[package]
version = "1.0.8" # remember to update html_root_url
#![doc(html_root_url = "https://docs.rs/serde/1.0.8")]

This is annoying and easily falls out of sync. For example mio 0.6.8 docs point to version 0.6.1: carllerche/mio#613.

There should be a way to keep these synchronized automatically.

@durka

This comment has been minimized.

Copy link
Contributor

durka commented May 30, 2017

Macros in attributes would neatly solve this, just sayin'.

@onur

This comment has been minimized.

Copy link
Member

onur commented May 31, 2017

I recently implemented --extern-version argument to rustdoc and cargo for this purpose. I don't think this patches should be in rust or cargo but I am planning to solve all external crate links in docs.rs with this patches. Docs.rs is not using this compiler yet, building rustc for all tier one platforms requires a lot of effort.

Hopefully docs.rs will set html_root_url automatically for all crates soon and it will help maintainers to not care about html_root_url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.