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

Cache processes to execute for the workspace inter-target dep graph#453

Merged
nrc merged 2 commits intorust-lang:masterfrom
Xanewok:stage-2
Aug 22, 2017
Merged

Cache processes to execute for the workspace inter-target dep graph#453
nrc merged 2 commits intorust-lang:masterfrom
Xanewok:stage-2

Conversation

@Xanewok
Copy link
Copy Markdown
Contributor

@Xanewok Xanewok commented Aug 21, 2017

Followup to #449. This limits the inter-target dep graph to the targets in the workspace and caches appropriate rustc commands (after being modified by the RLS) for appropriate units to build.

This still needs implementing fetching dirty target dep graphs, sorting the nodes topologically and implementing a simple job queue. If this is too little to merge right now, I can push more changes to this branch so more work can be merged at once if needed.

let mut cx = self.compilation_cx.lock().unwrap();

let mut store_cmd = process_builder::process(&rustc_exe);
store_cmd.args(&args.iter().map(|s| OsString::from(s)).collect::<Vec<OsString>>());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can just use .map(OsString::from) here since it's a single parameter function. I believe you should also be able to independently have collect::<Vec<_>> too since the map always generates OsStrings.

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.

You're right, thanks!

@nrc nrc merged commit 69ae8a2 into rust-lang:master Aug 22, 2017
@Xanewok Xanewok deleted the stage-2 branch August 23, 2017 11:02
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