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

bootstrap: fully rely on RUSTC_WRAPPER #127682

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jul 13, 2024

With rust-lang/cargo#13659, cargo now respects RUSTC_WRAPPER for all rustc invocations. That means we can finally remove the hack where we set our wrapper as both RUSTC and RUSTC_WRAPPER.

There could still be build scripts that fail to respect RUSTC_WRAPPER, but then we should fix those before they become a rustc dependency.

Fixes #128383

@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2024

r? @Kobzol

rustbot has assigned @Kobzol.
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 Jul 13, 2024
@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

RalfJung commented Jul 13, 2024

Turns out even our own libc crate doesn't properly wrap its rustc invocations.^^ I guess I did not hit this locally as the build script was already cached.
Blocked on rust-lang/libc#3772.

@Kobzol
Copy link
Contributor

Kobzol commented Jul 13, 2024

@rustbot blocked

@rustbot rustbot added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 13, 2024
@RalfJung

This comment was marked as outdated.

@RalfJung RalfJung closed this Jul 30, 2024
@RalfJung RalfJung deleted the bootstrap-rustc-wrapper branch July 30, 2024 10:26
@RalfJung RalfJung restored the bootstrap-rustc-wrapper branch August 28, 2024 10:10
@RalfJung RalfJung reopened this Aug 28, 2024
@RalfJung
Copy link
Member Author

Locally a check-build passes now, let's see what CI says...

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

I guess I still had cached build script results somewhere.

The next offender is: field-offset. It uses rustc_version, so hopefully we just need to pull in the just-released version 0.4.1.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 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.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2024

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Aug 28, 2024

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

Blocked on stepancheg/rust-protobuf#735.

@RalfJung
Copy link
Member Author

RalfJung commented Oct 13, 2024

@rust-lang/rust-analyzer not sure if you have some sort of direction relationship with your dependencies, but if you, do, it'd be good if you could take a look at this. I am trying to do a cleanup in bootstrap, and the very last holdout (well, it seems to be the last holdout, it's tricky to be sure) is a problem with one indirect dependency of rust-analyzer: the protobuf crate, which is a dependency of scip. The PR to fix this (stepancheg/rust-protobuf#737) has seen no maintainer reaction whatsoever in over a month.

@davidbarsky
Copy link
Contributor

@RalfJung Ah, I might be able to make a few things happen. Lemme ask around.

@lnicola
Copy link
Member

lnicola commented Oct 16, 2024

protobuf 3.7.1 is out, but scip still depends on 3.2.

@RalfJung
Copy link
Member Author

That should be fine though since it's a semver-compatible update.

@RalfJung
Copy link
Member Author

Oh wtf they use a =3.2.0 dependency. Yeah then this is another blocker :(

@lnicola
Copy link
Member

lnicola commented Oct 16, 2024

I suspect it's in the public API, so it would be a breaking change. Nvm, maybe not.

@RalfJung
Copy link
Member Author

RalfJung commented Oct 16, 2024

It's not a breaking change to do a semver-compatible update of public API types, is it?

Next blocker: sourcegraph/scip#284

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#16 2.921 Building wheels for collected packages: reuse
#16 2.922   Building wheel for reuse (pyproject.toml): started
#16 3.173   Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 3.175   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132720 sha256=026f3bb0f1aa8090b861fd0a0939cb1a782396d84c8aab7875096557d637a0f6
#16 3.175   Stored in directory: /tmp/pip-ephem-wheel-cache-ogqd96no/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#16 3.178 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#16 3.581 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#16 3.581 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 DONE 3.7s
---

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/release/build/protobuf-36e7809420578a1e/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/protobuf-3.2.0/build.rs:28:10:
  spawn rustc: Os { code: 2, kind: NotFound, message: "No such file or directory" }
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:05:03
  local time: Wed Oct 16 13:29:18 UTC 2024
  network time: Wed, 16 Oct 2024 13:29:19 GMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. 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.

bootstrap should be able to fully rely on RUSTC_WRAPPER
6 participants