This repository was archived by the owner on Dec 29, 2022. It is now read-only.
Implement external build plan #1070
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From the commit description:
This adds a
BuildGraph
trait which aims to abstract away the API fora build plan and it implements it for the in-process Cargo build plan
as well as the new, external one (for
cargo build --build-plan
format).
In addition to that, since save-analysis (since rls-data 0.18.1)
includes the invocation used to compile a given crate, we try to
recreate the external build plan from the passed save-analysis files
via
build_command
config option.This is squashed into a single commit not to miss anything during the rebase and because my branch diverged from head a bit and kept going back and forth; hopefully this will be legible.
TL;DR:
plan.rs
->cargo_plan.rs
cargo build --build-plan
)BuildGraph
trait for both plansbuild_command
case)r? @nrc