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

Create and cache inter-target dep graph during Cargo build routine#449

Merged
nrc merged 1 commit intorust-lang:masterfrom
Xanewok:stage-1-cargo
Aug 21, 2017
Merged

Create and cache inter-target dep graph during Cargo build routine#449
nrc merged 1 commit intorust-lang:masterfrom
Xanewok:stage-1-cargo

Conversation

@Xanewok
Copy link
Copy Markdown
Contributor

@Xanewok Xanewok commented Aug 20, 2017

Depends on #448. Since it seems this PR also pulls this automatically, I'm not sure if it's possible to merge one and the other with proper history, so I can update this PR if #448 will be merged to include only the last commit.

Also depends on rust-lang/cargo#4416, so until that's merged, I'm using the https://github.com/Xanewok/cargo/tree/more-executor-params branch with the changes.
By exposing &Unit in Executor::init() we can create a target dependency graph with ease, without having to explicitly copy over any Cargo code. This only currently fetches the dep graph after each cargo build routine, an example output (done for the rls itself) can be found here: https://pastebin.com/iSz4pcuK.

Next stage should be to cache exact ProcessBuilders for executed units of work and create our own JobQueue (or maybe it'll be possible to reuse more Cargo API, since we'll have pseudo-Units at our disposal).

@Xanewok Xanewok changed the title Stage 1 cargo Create and cache inter-target dep graph during Cargo build routine Aug 20, 2017
// TODO: Support more crate target types
&[], false, &[], false, &[], false),
&[], false, &[], false, &[], false,
false),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a new all_targets option, added in the newer versions of Cargo (using Cargo PR branch meant also using newest Cargo master).

@nrc
Copy link
Copy Markdown
Member

nrc commented Aug 20, 2017

#448 and the Cargo PR are both merged now, so you should be able to rebase this PR and change the Cargo.toml back to Cargo master.

@nrc
Copy link
Copy Markdown
Member

nrc commented Aug 20, 2017

Looks good!

Needs updated cargo for the additional information in `Executor` callbacks.
@Xanewok
Copy link
Copy Markdown
Contributor Author

Xanewok commented Aug 20, 2017

#448 and the Cargo PR are both merged now, so you should be able to rebase this PR and change the Cargo.toml back to Cargo master.

Done!

@nrc nrc merged commit 6996868 into rust-lang:master Aug 21, 2017
@Xanewok Xanewok deleted the stage-1-cargo branch August 21, 2017 05:17
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.

2 participants