Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use common repository prefix everywhere #38

Merged
merged 1 commit into from
May 12, 2020
Merged

Use common repository prefix everywhere #38

merged 1 commit into from
May 12, 2020

Conversation

cblichmann
Copy link
Member

Build macros in earlier versions of Bazel (pre-1.0) needed to specify
targets in a different format, depending from where they were
included/expanded at build time.

For example, a sapi_library() macro invocation in one of the directories
under examples, always needed to depend on the SAPI main library as
//sandboxed_api:sapi. When using SAPI from another Bazel project, the
same macro would have needed to depend on
@com_google_sandboxed_api//sandboxed_api:sapi. The sapi_library()
macro was thus checking the repository name and conditionally changed
the dependencies. This approach is brittle and as of Bazel 3.1.0 no
longer works.

This CL simple removes the conditional prefix and unconditionally uses
@com_google_sandboxed_api.

Tested on Bazel 1.2.1, 2.2.0 and 3.1.0

Build macros in earlier versions of Bazel (pre-1.0) needed to specify
targets in a different format, depending from where they were
included/expanded at build time.

For example, a `sapi_library()` macro invocation in one of the directories
under `examples`, always needed to depend on the SAPI main library as
`//sandboxed_api:sapi`. When using SAPI from another Bazel project, the
same macro would have needed to depend on
`@com_google_sandboxed_api//sandboxed_api:sapi`. The `sapi_library()`
macro was thus checking the repository name and conditionally changed
the dependencies. This approach is brittle and as of Bazel 3.1.0 no
longer works.

This CL simple removes the conditional prefix and unconditionally uses
`@com_google_sandboxed_api`.

Tested on Bazel 1.2.1, 2.2.0 and 3.1.0
@googlebot googlebot added the cla: yes CLA accepted label May 11, 2020
@cblichmann cblichmann merged commit 144a441 into google:master May 12, 2020
happyCoder92 pushed a commit that referenced this pull request May 4, 2022
PiperOrigin-RevId: 311079031
Change-Id: I25b2b9081bd12602853b8b078d715153673c2b8e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants