Skip to content

discussion: bzlmod, fineGrainedHashExternalRepos and external query #265

Open
@honnix

Description

@honnix

In a bzlmod setup, querying //external:all-targets doesn't make much sense anymore because we will miss everything managed by bzlmod, and there is no "repo-generation" targets that we use to compute "coarse grained" hash.

I think we might need to rethink the whole idea of fineGrainedHashExternalRepos. Do we really need it? Can we always do "fine-grained" hash generation?

I think fineGrainedHashExternalRepos serves two purposes today. For cquery, it is a filter to apply source hashing; and for query, besides the filter functionality, it is also a source where we query things. BTW, I think "coarse grained" hashing for query has long been broken ever since we stopped querying //external:all-targets.

It is probably straight forward to modify cquery path to always do "fine grained" hashing, but not for query unless we switch to querying deps(//...:all-targets) as well, which I'm not sure why we didn't do it in the first place.

I might be understanding things totally wrong as I'm not familiar with the code base and design. Please help me understand @tinder-maxwellelliott . Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions