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

Add --check_third_party_targets_have_licenses. #7262

Closed
wants to merge 1 commit into from

Conversation

gregestren
Copy link
Contributor

When on, all rules and files declared with exports_file() under //third_party must declare licenses().

This is the flag's default, and also status quo semantics. The point of this flag is to let users turn off that
checking when they don't want to treat //third_party as special.

Fixes #3639

When on, all rules and files declared with exports_file()
under //third_party must declare licenses().

This is the flag's default, and also status quo semantics.
The point of this flag is to let users turn off that
checking when they don't want to treat //third_party as
special.

Fixes bazelbuild#3639
@gregestren
Copy link
Contributor Author

I think this should be the start of removing licence checking (as it now stands) completely from Bazel. We're waiting on a new, fresh implementation.

This change is backwards-compatible (since the flag defaults to current semantics). So I'm not presenting it as an --incompatible_ flag.

I suggest submitting this change, then introducing an --incompatible_ flag that universally disables license declaration checking, and continuing that process as it goes. But I do consider this change distinct from that process and see no reason to delay its benefit waiting on that. For example, we haven't confirmed yet that we can do that process.

@gregestren
Copy link
Contributor Author

Also, putting the flag in SkylarkSemanticsOptions is partially a convenience. But it also seems justified on exports_file, which is a calling point for this check, going through the Syklark evaluation pipeline and having its semantics affected.

@gregestren
Copy link
Contributor Author

@ittaiz - sorry for the long delay on figuring out an approach for this. It was dicier than I expected for such a simple-looking change.

@gregestren gregestren added the team-Configurability platforms, toolchains, cquery, select(), config transitions label Jan 25, 2019
@irengrig irengrig removed WIP labels Jan 26, 2019
@gregestren
Copy link
Contributor Author

Ping particularly @aiuto .

@bazel-io bazel-io closed this in 37cd5c4 Jan 30, 2019
weixiao-huang pushed a commit to weixiao-huang/bazel that referenced this pull request Jan 31, 2019
When on, all rules and files declared with exports_file() under //third_party must declare licenses().

This is the flag's default, and also status quo semantics. The point of this flag is to let users turn off that
checking when they don't want to treat //third_party as special.

Fixes bazelbuild#3639

Closes bazelbuild#7262.

PiperOrigin-RevId: 231645495
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-Configurability platforms, toolchains, cquery, select(), config transitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants