Bazel: Docs do not mention third_party requirements for a license

Created on 23 Nov 2015  Â·  8Comments  Â·  Source: bazelbuild/bazel

I added a directory in my toplevel called third_party, and when building a rule within it I got an error:

ERROR: /Users/endobson/tmp/grpc-bazel/third_party/openssl/BUILD:78:1: third-party rule '//third_party/openssl:libssl-deb' lacks a license declaration with one of the following types: notice, reciprocal, permissive, restricted, unencumbered, by_exception_only.

Searching for third_party in the bazel docs does not turn up anything about this restriction: http://bazel.io/search.html?q=third_party

P2 documentation (cleanup)

Most helpful comment

To work around this, you can add a licenses(["notice"]) line to your BUILD files in the third_party directory.

All 8 comments

To work around this, you can add a licenses(["notice"]) line to your BUILD files in the third_party directory.

Is this restriction going to be relaxed? It seems a bit inconsistent to enforce this for third_party but not for things like new_http_archive.

Yes AFAICT it should be relaxed and replaced by the constraint mechanism.

On Fri, Nov 27, 2015, 8:52 PM Kamal Marhubi [email protected]
wrote:

Is this restriction going to be relaxed? It seems a bit inconsistent to
enforce this for third_party but not for things like new_http_archive.

—
Reply to this email directly or view it on GitHub
https://github.com/bazelbuild/bazel/issues/642#issuecomment-160196079.

+1. I ran into this today and was not able to find any documentation about which licenses are available or what the license() command does.

Here is the documentation on licenses: http://bazel.io/docs/be/functions.html#licenses. I agree that the documentation should be fleshed out a bit more since it doesn't really mention which license-type strings are available.

I added some documentation here: https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java#L722-L741, which I incorrectly thought would be included in the generated docs. We should move it somewhere else so it will show up in the documentation.

Eventually... it needs to be moved to a different file.

The existing documentation describes what, but not why.

From some digging, it appears that licenses somehow interacts with the --check_licenses command-line flag. Is there any documentation describing this flag? It would be good if the documentation for licenses linked to that documentation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mdzoba picture mdzoba  Â·  3Comments

davidzchen picture davidzchen  Â·  3Comments

ajaysaini-sgvu picture ajaysaini-sgvu  Â·  3Comments

f1recracker picture f1recracker  Â·  3Comments

kastiglione picture kastiglione  Â·  3Comments