Skip to content

Conversation

nipunn1313
Copy link
Contributor

@nipunn1313 nipunn1313 commented Oct 1, 2021

Extract .cargo_vcs_info.json from the tarball and use it to determine the path in vcs.

Support for this was added to cargo with
rust-lang/cargo#9866

Fixes #3484
(note that support for this in admin::render_readmes not yet exists - would come with #4095)

Depends on #4097 (Because of community/community#4477 - github ends up rendering the diffs together. Go to the commits tab and just look at the most recent commits to review).

@nipunn1313
Copy link
Contributor Author

Confirmed things worked with a repo called testcrate and a pkg in a subdir called innercrate

image

Reproed with publishing innercrate via

~/src/cargo/target/debug/cargo publish --index file:///Users/nipunn/src/crates.io/tmp/index-bare --token=$TOKEN

and double checked the backfill as well with

cargo run --bin crates-admin -- render-readmes --crate innercrate

@nipunn1313
Copy link
Contributor Author

Going to remove any work around admin::render_readmes from this diff in favor of #4095.
Will try to do the bare minimum to get this working on the hot path. Updates upcoming.

@nipunn1313
Copy link
Contributor Author

Updated this one.
Split out the less controversial #4096 (power of 2!) and #4097 into separate diffs which this now depends on.

@bors

This comment has been minimized.

@bors

This comment has been minimized.

@bors

This comment has been minimized.

@Turbo87 Turbo87 added the C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works label Jan 3, 2022
Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

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

@nipunn1313 sorry for letting this wait for so long. I misunderstood that this was ready for review. 🙈

looks very good though. nice work! ❤️

@Turbo87
Copy link
Member

Turbo87 commented Jan 3, 2022

I've rebased and resolved the conflict, otherwise this is identical to the original commits :)

@bors r+

@bors
Copy link
Contributor

bors commented Jan 3, 2022

📌 Commit 86d852f has been approved by Turbo87

@bors
Copy link
Contributor

bors commented Jan 3, 2022

⌛ Testing commit 86d852f with merge 3f67acf...

@bors
Copy link
Contributor

bors commented Jan 3, 2022

☀️ Test successful - checks-actions
Approved by: Turbo87
Pushing 3f67acf to master...

@bors bors merged commit 3f67acf into rust-lang:master Jan 3, 2022
@nipunn1313
Copy link
Contributor Author

Hooray! Thanks @Turbo87

yvt added a commit to r3-os/r3 that referenced this pull request Mar 15, 2022
When rendering a readme file, <https://crates.io> [rewrites][3] image
URLs to point to GitHub raw URLs (e.g., [1]). However, this doesn't
work as intended if the referenced file is a symbolic link, for which
the raw URL will just return the link path instead of the referenced
file's contents. Consequently, `logo-large-bg.svg` fails to load on [the
`r3` package description][2].

This commit addresses this problem by converting `src/r3/doc/logo-large-
bg.svg` to a normal file. It's unavoidable to have two copies of this
file because `doc/logo-large-bg.svg` also has to be a real file for
`README.md` to render correctly [on GitHub][4].

[1]: https://github.com/r3-os/r3/raw/HEAD/src/r3/doc/logo-large-bg.svg
[2]: https://crates.io/crates/r3
[3]: rust-lang/crates.io#3973
[4]: https://github.com/r3-os/r3/blob/%F0%9F%A6%86/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative URLs in subdirectory readmes
3 participants