Skip to content

bindeps: Enhance download_accessible to download all potential dependencies #12554

Closed
@ehuss

Description

@ehuss

#12421 has made some enhancements to support bindeps in a registry. However, this trips a problem with the implementation of download_accessible. That function is responsible for downloading all packages before feature resolution. However, the current implementation does not handle the target dependency field causing some dependencies to not get downloaded. This in turn can cause a panic within the feature resolver.

I think it would be good to try to enhance download_accessible to be aware of the target field so that it can ensure that everything gets downloaded. I think that would involve having collect_used_deps check if a dependency is for a specific target to call itself with that different target (using a different value for requested_kinds). I think the used set might also need to be target-aware, since a dependency used for one target might have different dependencies than a dependency used for another target. There might also need to be some logic to handle target="target", such as keeping track of what "target" means at the start.

#12421 has added the test proc_macro_in_artifact_dep for this that needs to be enabled. It might be good to try to think of other tests that might reveal issues in download_accessible (like the target="target" example).

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewZ-bindepsNightly: binary artifact dependencies

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions