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

Incorrect "no builds" badge shown for complex version string #395

Closed
repi opened this issue Aug 12, 2019 · 6 comments · Fixed by #677
Closed

Incorrect "no builds" badge shown for complex version string #395

repi opened this issue Aug 12, 2019 · 6 comments · Fixed by #677

Comments

@repi
Copy link

repi commented Aug 12, 2019

We have a crate that has a version string 0.1.0+4.1, when linking to the docs.rs badge for it it shows up as "no build" when using this string: https://docs.rs/physx-sys/badge.svg.

image

Although the actual link works and goes to the correct built documentation for that specific crate https://docs.rs/physx-sys/0.1.0+4.1/physx_sys/.

Looks like there may be some specific badge picture generation error for complex version strings, maybe it tries to find version just 0.1.0, which doesn't exist, in the picture selection instead of the full 0.1.0+4.1. While the page link itself uses the correct one.

Cargo itself when one references a crate with such a more complex version string does only use the first semver portion (MAJOR.MINOR.PATCH) and gives a warning if one specifies the rest (which it ignores).

@arirawr
Copy link

arirawr commented Sep 26, 2019

Just poking around a bit on this one - could it be related to the + symbol being incorrectly encoded around here?

@jyn514
Copy link
Member

jyn514 commented Jan 10, 2020

Reproducible crate: https://docs.rs/zstd/0.5.1+zstd.1.4.4/zstd/

BTW @repi the build failure for your 2.0 versions is because cmake is trying to write to the source directory, we added more sandboxing in #407. If you write to the target directory instead (cargo sets OUT_DIR), it should work.

@jyn514
Copy link
Member

jyn514 commented Jan 10, 2020

A secondary problem: if any version is not a valid semver range, all versions are marked as being invalid: https://github.com/rust-lang/docs.rs/blob/master/src/web/mod.rs#L267

@jyn514
Copy link
Member

jyn514 commented Jan 14, 2020

@arirawr it turns out this isn't a problem in match_version, surprisingly. Somehow, when you go to /zstd/badge.svg?version=0.5.1+zstd.1.4.4 the version that gets passed to match_version is 0.5.1 zstd.1.4.4 (with a space).

@jyn514
Copy link
Member

jyn514 commented Jan 14, 2020

I think it might be a bug in params? I'm giving up for now.

@jyn514
Copy link
Member

jyn514 commented Jan 14, 2020

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.

3 participants