Skip to content

Loading copybara into another bazel WORKSPACE #73

@menny

Description

@menny

I'm trying to load Copybara into my internal Bazel WORKSPACE.
I added a http_archive statement to my WORKSPACE file:

http_archive(
    name = "copybara",
    url = "https://github.com/google/copybara/archive/4f8904964283a405beb9612eb30a5ef693d3f4f3.zip",
    type = "zip",
    sha256 = "b5f321ebc4932ed9b5673b80ea88fcccfad93dce68c76c81ce306c1ebf2b6b34",
    strip_prefix = "copybara-4f8904964283a405beb9612eb30a5ef693d3f4f3"
)

and then trying to build copybara: bazel build @copybara//java/com/google/copybara:copybara. At which point I get an error:

ERROR: Analysis of target ‘@copybara//java/com/google/copybara:copybara’ failed; build aborted: no such package ‘@flogger//jar’: The repository could not be resolved
INFO: Elapsed time: 0.194s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

I know this is not the main use-case of Copybara, but by having copybara part of my repo (as in, defined and pinned in my WORKSPACE file), I will be able to more easily create run targets that use Copybara.

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