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

Support mdBook preprocessors for TRPL in rustbook #125408

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

chriskrycho
Copy link
Contributor

@chriskrycho chriskrycho commented May 22, 2024

rust-lang/book recently added two mdBook preprocessors. Enable rustbook to use those preprocessors for books where they are requested by the book.toml by adding the preprocessors as path dependencies, and ignoring them where they are not requested, i.e. by all the books other than TRPL at present.

Addresses rust-lang/book#3927

@rustbot
Copy link
Collaborator

rustbot commented May 22, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented May 22, 2024

⚠️ Warning ⚠️

  • These commits modify submodules.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 22, 2024
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented May 22, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@chriskrycho
Copy link
Contributor Author

@ehuss tidy check failed locally with this:

tidy check
tidy error: invalid license `CC0-1.0` in `registry+https://github.com/rust-lang/crates.io-index#notify@6.1.1`

However, I went spelunking a bit and:

  1. The notify dependency is completely unaltered by this change.
  2. It has had the CC0 license for quite a while—certainly since the last bump to the dep as rust-lang/rust consumes it, likely much earlier (I did not chase git blame further than that).

I did a git push --no-verify since that appeared to be the only issue, but am worried that may end up causing issues with this PR. If it does, I would love to know (a) why this only just started failing with this PR and (b) what I should do to fix it!

Also, should CC0 be allowed? I can chase that down in tidy and get a PR up for it if so.

@rust-log-analyzer

This comment has been minimized.

Cargo.lock Outdated Show resolved Hide resolved
@chriskrycho
Copy link
Contributor Author

I investigated further and see that no, CC0 should not be allowed!

@chriskrycho chriskrycho marked this pull request as draft May 22, 2024 23:00
`rust-lang/book` recently added two mdBook preprocessors. Enable
`rustbook` to use those preprocessors for books where they are requested
by the `book.toml` by adding the preprocessors as path dependencies, and
ignoring them where they are not requested, i.e. by all the books other
than TRPL at present.
@ehuss
Copy link
Contributor

ehuss commented May 31, 2024

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented May 31, 2024

📌 Commit 2c9fc62 has been approved by ehuss

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 31, 2024
@bors
Copy link
Contributor

bors commented May 31, 2024

⌛ Testing commit 2c9fc62 with merge 20be84a...

@bors
Copy link
Contributor

bors commented Jun 1, 2024

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 20be84a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 1, 2024
@bors bors merged commit 20be84a into rust-lang:master Jun 1, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone Jun 1, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (20be84a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.4% [0.9%, 3.4%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [0.9%, 3.4%] 3

Cycles

Results (primary -1.0%, secondary -1.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.0% [-1.2%, -0.9%] 5
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 1
All ❌✅ (primary) -1.0% [-1.2%, -0.9%] 5

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 672.771s -> 667.385s (-0.80%)
Artifact size: 318.83 MiB -> 318.81 MiB (-0.01%)

@Zalathar
Copy link
Contributor

Zalathar commented Jun 1, 2024

This change seems to have made bootstrap fail with an error when the submodule src/doc/book/ hasn't been checked out, even when not trying to build rustbook.

@GnomedDev
Copy link
Contributor

Yep, I'm running into that problem as well.

onur-ozkan added a commit to onur-ozkan/rust that referenced this pull request Jun 1, 2024
As of rust-lang#125408 PR,
rustbook now relies on dependencies from the "src/doc/book" submodule.

However, bootstrap does not automatically sync this submodule before reading
metadata informations. And if the submodule is not present, reading
metadata will fail because rustbook's dependencies will be missing.

This change makes "src/doc/book" to be fetched/synced automatically
before trying to read metadata.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
onur-ozkan added a commit to onur-ozkan/rust that referenced this pull request Jun 1, 2024
As of rust-lang#125408 PR,
rustbook now relies on dependencies from the "src/doc/book" submodule.

However, bootstrap does not automatically sync this submodule before reading
metadata informations. And if the submodule is not present, reading
metadata will fail because rustbook's dependencies will be missing.

This change makes "src/doc/book" to be fetched/synced automatically
before trying to read metadata.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 1, 2024
…fix, r=onur-ozkan

include missing submodule on bootstrap

As of rust-lang#125408 PR, rustbook now relies on dependencies from the "src/doc/book" submodule.

However, bootstrap does not automatically sync this submodule before reading metadata informations. And if the submodule is not present, reading metadata will fail because rustbook's dependencies will be missing.

This change makes "src/doc/book" to be fetched/synced automatically before trying to read metadata.

cc `@Zalathar`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 1, 2024
…fix, r=onur-ozkan

include missing submodule on bootstrap

As of rust-lang#125408 PR, rustbook now relies on dependencies from the "src/doc/book" submodule.

However, bootstrap does not automatically sync this submodule before reading metadata informations. And if the submodule is not present, reading metadata will fail because rustbook's dependencies will be missing.

This change makes "src/doc/book" to be fetched/synced automatically before trying to read metadata.

cc ``@Zalathar``
@Zalathar
Copy link
Contributor

Zalathar commented Jun 1, 2024

As a workaround until #125856 lands, this should get bootstrap working again:

git submodule update --init src/doc/book/

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 1, 2024
…fix, r=onur-ozkan

include missing submodule on bootstrap

As of rust-lang#125408 PR, rustbook now relies on dependencies from the "src/doc/book" submodule.

However, bootstrap does not automatically sync this submodule before reading metadata informations. And if the submodule is not present, reading metadata will fail because rustbook's dependencies will be missing.

This change makes "src/doc/book" to be fetched/synced automatically before trying to read metadata.

cc `@Zalathar`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 1, 2024
…x, r=onur-ozkan

include missing submodule on bootstrap

As of rust-lang#125408 PR, rustbook now relies on dependencies from the "src/doc/book" submodule.

However, bootstrap does not automatically sync this submodule before reading metadata informations. And if the submodule is not present, reading metadata will fail because rustbook's dependencies will be missing.

This change makes "src/doc/book" to be fetched/synced automatically before trying to read metadata.

cc `@Zalathar`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants