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

Create simple dep-graph from Cargo metadata#441

Merged
nrc merged 1 commit intorust-lang:masterfrom
Xanewok:resolve-dep-graph
Aug 14, 2017
Merged

Create simple dep-graph from Cargo metadata#441
nrc merged 1 commit intorust-lang:masterfrom
Xanewok:resolve-dep-graph

Conversation

@Xanewok
Copy link
Copy Markdown
Contributor

@Xanewok Xanewok commented Aug 13, 2017

Incomplete build::plan::Plan is created, containing an inter-package dependency graph and targets/features of packages in the workspace scope, and stored when performing the Cargo build routine.
It's not currently used and specific data held will require further design and work.
For now copies some of the Cargo types, as some members are not yet publicly exposed.

Incomplete `build::plan::Plan` is created, containing an inter-package dependency graph and targets/features of packages in the workspace scope, and stored when performing the Cargo build routine. It's not currently used and specific data held will require further design and work.
For now copies some of the Cargo types, as it's not yet publicly exposed.
let build_plan = create_plan(&ws).unwrap();
compilation_cx_access.build_plan = Some(build_plan);
// Release the lock on the compilation_cx
mem::drop(compilation_cx_access);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we use a scope rather than mem::drop? Or better, drop the lock and pick it up again here?

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.

We definitely could lock twice if that's not a problem, I just tried to avoid that here. Using a scope would need to resurface ws and config, but unsure if the borrows permit that, I'll have to take a look.

@nrc nrc merged commit b92fc57 into rust-lang:master Aug 14, 2017
@Xanewok Xanewok deleted the resolve-dep-graph branch August 15, 2017 06:49
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