Skip to content

Considers crates of workspace projects #11270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

huntc
Copy link
Contributor

@huntc huntc commented Jan 13, 2022

Background info: #11268

This is presently yielding the following during discovery:

DISCOVERED: [ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/client/app/Cargo.toml") }, ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/client/embedded-app/Cargo.toml") }, ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/client/Cargo.toml") }]
DISCOVERED: [ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/network-protocol/Cargo.toml") }]
DISCOVERED: [ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/server/app/Cargo.toml") }, ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/server/embedded-app/Cargo.toml") }, ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/server/Cargo.toml") }]

...which looks right.

Then, later on, the targets appear to be resolved correctly:

cargo_config_build_target for ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/client/Cargo.toml") } yields a target of None
cargo_config_build_target for ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/client/app/Cargo.toml") } yields a target of None
cargo_config_build_target for ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/client/embedded-app/Cargo.toml") } yields a target of Some("thumbv7em-none-eabihf")
cargo_config_build_target for ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/network-protocol/Cargo.toml") } yields a target of None
cargo_config_build_target for ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/server/Cargo.toml") } yields a target of None
cargo_config_build_target for ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/server/app/Cargo.toml") } yields a target of None
cargo_config_build_target for ManifestPath { file: AbsPathBuf("/Users/huntc/Projects/titanclass/embassy-start/server/embedded-app/Cargo.toml") } yields a target of Some("thumbv7em-none-eabihf")
<snip - repeated a few times>

...however, when applying to my project I'm not seeing that interrupt::take! macro resolved correctly still. More digging required.

}
};
eprintln!("cargo_config_build_target for {:?} yields a target of {:?}", cargo_toml, r);
r
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove this line ultimately

None => bail!("no projects"),
Some(it) => it,
Some(it) => it.clone(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is now possible to have more than one project. However, we can now rely on the last project returned being the outermost one.

}
eprintln!("DISCOVERED: {:?}", manifests);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line will go.

@@ -137,7 +141,7 @@ impl ProjectManifest {
.collect::<FxHashSet<_>>()
.into_iter()
.collect::<Vec<_>>();
res.sort();
res.sort_by(|a, b| b.cmp(a));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Performs a reverse sort so that the inner most ones are returned first.

@huntc
Copy link
Contributor Author

huntc commented Jan 14, 2022

Closing given #11268 (comment)

@huntc huntc closed this Jan 14, 2022
@huntc huntc deleted the multi-config branch January 14, 2022 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant