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

include missing submodule on bootstrap #125856

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

onur-ozkan
Copy link
Member

As of #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

@rustbot
Copy link
Collaborator

rustbot commented Jun 1, 2024

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
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 rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels 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
Copy link
Member Author

This is very simple change and it fixes a contribution roadblock (there are workarounds exist, but people have to put some effort to find them).

So, @bors r+ p=1

@bors
Copy link
Contributor

bors commented Jun 1, 2024

📌 Commit 5cdec65 has been approved by onur-ozkan

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 Jun 1, 2024
@Zalathar
Copy link
Contributor

Zalathar commented Jun 1, 2024

Yeah, this seems worth rushing a trivial fix for.

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``
@ehuss
Copy link
Contributor

ehuss commented Jun 1, 2024

Thanks for the fix!

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
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#124294 (Unroll first iteration of checked_ilog loop)
 - rust-lang#125562 (Weekly `cargo update`)
 - rust-lang#125822 (Refactor `--print=check-cfg` test)
 - rust-lang#125856 (include missing submodule on bootstrap)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Jun 1, 2024

⌛ Testing commit 5cdec65 with merge a94483a...

@bors
Copy link
Contributor

bors commented Jun 1, 2024

☀️ Test successful - checks-actions
Approved by: onur-ozkan
Pushing a94483a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 1, 2024
@bors bors merged commit a94483a into rust-lang:master Jun 1, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone Jun 1, 2024
@onur-ozkan onur-ozkan deleted the bootstrap-submodule-hotfix branch June 1, 2024 19:09
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a94483a): 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)

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

Cycles

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

Binary size

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

Bootstrap: 668.781s -> 668.545s (-0.04%)
Artifact size: 318.82 MiB -> 318.79 MiB (-0.01%)

@RalfJung
Copy link
Member

RalfJung commented Jun 2, 2024

So it is expected that I now have to check out the books to build rustc? That's unfortunate, I was quite happy I could avoid those submodule updates so far...

Also see Zulip.

@onur-ozkan
Copy link
Member Author

As long as "book" is a submodule and rust sources using it as a dependency (which is the case right now), this change is mandatory.

@RalfJung
Copy link
Member

RalfJung commented Jun 2, 2024

Yes, indeed. The question is whether it's okay for a rust source crate to depend on code inside src/doc -- my expectation was that that's for docs only, so code should be independent of it.

@chriskrycho
Copy link
Contributor

chriskrycho commented Jun 2, 2024

Aggghhh. Messy. I am happy to back out the change and publish those crates instead of using path deps if that is a better approach that avoids ongoing issues here (had no idea this would be an issue, and alas, @ehuss missed it too).

@Zalathar
Copy link
Contributor

Zalathar commented Jun 3, 2024

Yeah, checking out src/doc/book was a quick-fix to unbreak bootstrap, but if we can revert #125408 and achieve the same result in a different way then I think that would be better long-term.

@RalfJung
Copy link
Member

RalfJung commented Jun 3, 2024

I'd say discuss this with t-compiler -- if they say it's okay to have such dependencies I'll live with it. But IMO it's worth discussing at least.

@chriskrycho
Copy link
Contributor

Started a Zulip discussion on this with t-compiler!

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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants