Skip to content

Ensure html_root_url is kept in sync #754

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

Closed
wants to merge 1 commit into from

Conversation

mgeisler
Copy link
Contributor

@mgeisler mgeisler commented Nov 1, 2017

This adds two new unit tests: one that checks that the html_root_url
attribute always uses the current crate version number, and one that
checks that the TOML code blocks in the README use the correct version
number.

This is implemented by my version-sync crate -- I hope it's useful!

Fixes #613.

@mgeisler
Copy link
Contributor Author

mgeisler commented Nov 3, 2017

This might be more complicated than I hoped since version-sync doesn't support Rust 1.14 (version 1.15 is the oldest it can be compiled on).

This adds two new unit tests: one that checks that the html_root_url
attribute always uses the current crate version number, and one that
checks that the TOML code blocks in the README use the correct version
number.

This is implemented by my version-sync crate -- I hope it's useful!

Fixes tokio-rs#613.
@mgeisler
Copy link
Contributor Author

mgeisler commented Nov 3, 2017

Please let me know if there's any interest in the general approach — then I can see about removing the version-sync dependency on versions and targets where it doesn't work (remove with sed in the Travis build).

@carllerche
Copy link
Member

Thanks for the PR.

I'd rather not add another dependency and instead deal with this by having a RELEASE doc and wait for this to get fixed up stream. But, again, thanks for the attempt :).

@carllerche carllerche closed this Nov 7, 2017
@twmb
Copy link

twmb commented Nov 8, 2017

As an alternative, I've used

before_install: |
  version=$(grep "^version =" Cargo.toml | sed -r  's/^[^0-9]*([0-9]+.[0-9]+.[0-9]+).*/\1/') &&
  docs_version=$(grep -R 'docs\.rs' src | head -n 1 | sed -r 's/^[^0-9]*([0-9]+.[0-9]+.[0-9]+).*/\1/') &&
  test "$version" == "$docs_version"

in my .travis.yml in the past. This only catches the first mismatch, but it could be cleaned up to catch all mismatches. But, waiting for upstream fixes is 👍 as well.

@mgeisler
Copy link
Contributor Author

@carllerche Sure, no problem. Note that it's only a new dev-dependency, so only people who run the MIO tests are affected by this.

I'll see about making another PR that at least fixes the outdated version number :-)

@carllerche
Copy link
Member

@twmb I think a smoke test like that would be good.

@mgeisler Sure re: PR that fixes the version :)

@mgeisler
Copy link
Contributor Author

I've submitted #760 to fix the version number.

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 this pull request may close these issues.

3 participants