mirror of
https://github.com/rust-lang/cargo
synced 2024-10-14 03:32:39 +00:00
bc83efe323
Preprobe info for known crate type Previously, we've calculated the set of crate types to learn about by recursively walking the graph of units. However, to actually know dependencies of a unit exactly, we must know target specific info, and we don't know it at this moment (in fact, we are trying calculating it). Note that crate-type calculation is already lazy, we don't have to calc all crate-types upfront. So, let's just scrape this info once for well-known crate types, and fill whatever is left lazily. @alexcrichton would this approach work at all? I think it would, if `KNOWN_CRATE_TYPES` are all available for all target-tripples we support. Is it a valid assumption? The larger picture is that I am trying to make unit dependency resolution eager and move it into the separate file. I even got something working, but I have to run dependency resolution three times, because it is not exactly idempotent for various reasons, including this target-info stuff :) ``` cx.prepare()?; cx.build_unit_map(units.clone())?; // resolve dependencies cx.probe_target_info(&units)?; cx.build_unit_map(units.clone())?; // resolve again cx.build_used_in_plugin_map(&units)?; custom_build::build_map(&mut cx, &units)?; cx.build_unit_map(units.clone())?; // and resolve one final time :) ``` |
||
---|---|---|
.. | ||
cargotest | ||
alt_registry.rs | ||
bad_config.rs | ||
bad_manifest_path.rs | ||
bench.rs | ||
build.rs | ||
build_auth.rs | ||
build_lib.rs | ||
build_script.rs | ||
build_script_env.rs | ||
cargo_alias_config.rs | ||
cargo_command.rs | ||
cargo_features.rs | ||
cfg.rs | ||
check-style.sh | ||
check.rs | ||
clean.rs | ||
concurrent.rs | ||
config.rs | ||
corrupt_git.rs | ||
cross_compile.rs | ||
cross_publish.rs | ||
death.rs | ||
dep_info.rs | ||
directory.rs | ||
doc.rs | ||
features.rs | ||
fetch.rs | ||
freshness.rs | ||
generate_lockfile.rs | ||
git.rs | ||
hamcrest.rs | ||
init.rs | ||
install.rs | ||
jobserver.rs | ||
local_registry.rs | ||
lockfile_compat.rs | ||
login.rs | ||
main.rs | ||
metadata.rs | ||
net_config.rs | ||
new.rs | ||
overrides.rs | ||
package.rs | ||
patch.rs | ||
path.rs | ||
plugins.rs | ||
proc_macro.rs | ||
profiles.rs | ||
publish.rs | ||
read_manifest.rs | ||
registry.rs | ||
rename_deps.rs | ||
required_features.rs | ||
resolve.rs | ||
run.rs | ||
rustc.rs | ||
rustdoc.rs | ||
rustdocflags.rs | ||
rustflags.rs | ||
search.rs | ||
small_fd_limits.rs | ||
test.rs | ||
tool_paths.rs | ||
update.rs | ||
verify_project.rs | ||
version.rs | ||
warn_on_failure.rs | ||
workspaces.rs |