Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Fix breakage due to upstream rustc changes #1775

Merged
merged 3 commits into from
May 17, 2022

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented May 16, 2022

This inlines the upstream racer dependency as a subdirectory (no fancy submodule or subtree business, just a simple git clone and rm -rf racer/.git), and fixes the relevant bugs there which are blocking upstreaming.

In general this is expected to get us much closer to being able to self-fix breakage from rustc changes in this repository rather than needing to wait for a merge and crates.io publish of racer. Since the code isn't really changing upstream this doesn't come at any significant burden in terms of syncing changes.

A separate commit will be necessary to bump racer, which is also currently
broken, but this at least gets us part of the way there.
@Mark-Simulacrum Mark-Simulacrum changed the title Fix RLS-internal breakage Fix breakage due to upstream rustc changes May 17, 2022
Copy link
Member

@pietroalbini pietroalbini left a comment

Choose a reason for hiding this comment

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

Code changes look good. I'm assuming this compiles with the correct nightly version.

This deletes a bunch of the irrelevant test infrastructure to minimize the added
size, and is overall a relatively small addition. It'll make it much easier for
us to bump RLS going forward in rust-lang/rust as we fully own the bits that
break due to rustc changes now.

In practice neither racer nor RLS are really under active maintenance so this
doesn't come at a significant ongoing cost.
@calebcartwright
Copy link
Member

Looks like some conflicts stemming from the rustfmt version. I can land a subtree push in r-l/rustfmt later today if our current master is too far behind/contradicting with the latest internal rustc_* apis

@Mark-Simulacrum
Copy link
Member Author

I'm not going to block on fixing CI here, it should be fine in rust-lang/rust I believe (based on locally checking with a relative path dep).

@Mark-Simulacrum Mark-Simulacrum merged commit 1acff66 into rust-lang:master May 17, 2022
@Mark-Simulacrum Mark-Simulacrum deleted the fix-rls branch May 17, 2022 14:58
@calebcartwright
Copy link
Member

I thought the tool builds in CI were still using the same dep specification as they are in the tool repo which is why I thought the PR checks in r-l/rust would fail with the same rustfmt errors when building rls, but either way, lmk if anything is needed on the rustfmt side of the equation

@Mark-Simulacrum
Copy link
Member Author

No, we override rustfmt, cargo, and clippy to point at the in-tree versions when building in rust-lang/rust. There's not a great way to get that from outside the repository (I guess we could clone rust-lang/rust and add patches here....)

@calebcartwright
Copy link
Member

What you describe definitely lines up with my understanding and recollection for the internal mod consumption, but I also recall times in the not too distant past where RLS was still consuming rustfmt via the crate from crates.io (and now the git repo reference) in those builds which was part of the complexity of in our update dances.

I must be remembering incorrectly however so no worries.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants