Skip to content

go_path rule does not support go_library using embedsrcs containing a directory #4400

@cmfcmf

Description

@cmfcmf

If you define a go_library that uses embedsrcs referring to a directory (i.e., by either containing the name of a local directory, or by referring to a label of a rule that creates a directory, like copy_to_directory), then a go_path rule (transitively) referring to that library fails to build with an error from the go_path.go binary complaining about not being able to copy a directory.
This is because the go_path.go binary wrongly assumes that all paths in the manifest are files, which is not the case when specifying a directory like described above.

I have a PR ready with a proposed fix, but I am not a Bazel expert, so I am unsure whether my fix is correct: #4401

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