Skip to content

tools/build_rules/prelude_bazel cannot load Skylark rules from the same workspace #1612

Closed

Description

@ahyangyi

I could put my Skylark rules in a separate repo and give it a name, say, foo_workspace, then I can load it for every BUILD file by add the following line in tools/build_rules/prelude_bazel:

load("@foo_workspace//:bar.bzl", "baz")

However, if I move bar.bzl to the main code workspace, I cannot load it from prelude_bazel:

load("//:bar.bzl", "baz")
does not work. Bazel will complain
"Unable to load package for '@bazel_tools//bar.bzl': BUILD file not found on package path."

Activity

  1. ahyangyi commented on Aug 8, 2016

    @ahyangyi
    Author

    Oops, "@//:bar.bzl" works. Kind of unexpected, but it's working regardless. I guess I can close this issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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