Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

scala_proto_library contains code for all dependencies #218

@bjchambers

Description

@bjchambers

I originally noticed this when debugging why I was getting unexpected "indirect dependency" problems.

If you have two proto libraries, such that one depends on the other (eg., A <- B), then the scala library jar for B will contain all the code for the protos in A. I suspect this is because the proto_library rule produces a (concatenated) descriptor describing both the src proto and any protos in the dependency set, and the scala_proto_library then produces code for all the entries (not just those that were listed in the srcs).

See #217 for a test reproducing the issue and a proposed fix.

(I'm not sure if this is what is causing my indirect dependency error, but my theory was that even though I had a direct dependency on A, and wasn't directly using B, it was registered as "used" because it redefined the classes from A)

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