bazelbuild / rules_license

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `additional_info` attribute to `license` rule.

adam-azarchs opened this issue · comments

Expected Behavior

As the design doc says,

additional_info: a map of strings to strings. This is a catch-all bucket for users to add custom metadata about this license instance. For example, if this is a paid license, it might indicate if it is site-wide or limited to a number of simultaneous instances. Nothing in this document refers to additional_info again.

Actual Behavior

No such attribute on the rule.

commented

I haven't figured out if this is a good idea yet. It may be that the additional information is in the kind rather than the license.
For example, the mention of tagging that the license is paid does not really belong here. It would be wrong to say something is simple notice and paid too.

Do you have a compelling use case in mind?

Our main use cases are tagging the source (e.g. GitHub repo, pypi package, rust crate, etc.) and version information. We also usually add in whatever other package metadata is convenient to add, e.g. project homepage, for linking in our compliance reports.

I do think that no matter how comprehensive a fixed set of attributes you come up with, companies are going to have their own idiosyncratic use cases which aren't covered. Having additional_info is a means by which their internal fork of rules_license can remain sufficiently compatible with upstream that they can open-source code which declares licenses without needing to either make the open source version slightly different (troublesome for merging unless you go to the trouble of setting up something like copybara) without also open-sourcing their fork of rules_license. Maybe those attributes will be useless to other users, but at least it won't prevent things from building.