-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
WIP: License lookup - a better version #692
base: master
Are you sure you want to change the base?
Conversation
cc: @danielmachlab I like this one better than the other PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmm, yes, delicious! This definitely works. As you pointed out it is cumbersome, but it is backwards compatible. Sorry for the delayed review, I was OOO most of last week.
For a new user, what they need to do is:
- define a new repo with
lookup_license
- add the
patch_cmd
to thehttp_archive
orgit_repository
call
This is not too bad, but could be a little complex to onboard some. Thats okay.
http_archive( | ||
name = "rules_jvm_external", | ||
# path = "..", | ||
urls = ["file:///tmp/rje.tar"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you generate this .tar
? I ended up just using git_repository()
workspace rule pointing at this branch as a work-around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tar from the command line. This is just to get something to demo, not what we would really do.
This is a backwards compatible approach. It is so ugly it is delicious.
We start with a fallback license_lookup, implemented in rules_jvm_external. If you do nothing else you get that, so no license information is added.
If you want to override that with your own method:
Note that the patch command is actually implemented in rules_jvm_external, so you don't have to write your own.