-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Make bazel download files #146
Comments
@aehlig, can you confirm? |
Confirm what? As far as I can see, there are two issues raised here.
Calling |
I have worked with all of the above mentioned approaches and using a single repository with many But I do still think downloading deps as independent repositories via And yeah as Klaus said one could still expose everything in one repository, I think even just an alias should do the trick. |
@jin @shs96c Just to see how far I could get in an hour to have an external repository per dependency I hacked something very quick and dirty together that is far from being complete, but already highlights some issue. I just focused on how we could get the list of dependencies and turn it into a list of It does create a The first issue is that the Secondly maven only exposes sha1 digests and bazel only allows sha256 (see bazelbuild/bazel#7323), so the only way I can see of getting this to work right now in pure starlark is by printing the sha of the downloaded file (which I believe bazel is now doing by default anyway) and then users can add the list of sha's manually to the |
I have this PR (#160) that creates a Re: SHA256, we can extend core Bazel to output the SHA as .bzl file that can be loaded / parsed. |
Ah great, I will have a look in the coming weeks. And if bazel could do something like that, that would be great. Actually just thinking about this, I wonder if something like that would already be possible if we where to write our own |
Another complication is authentication. Authentication for |
Work in progress PR to have Bazel download files, instead of Coursier: #169 |
Coursier optimistically downloads every single jar file required when starting a build. When the number of dependencies is large, this can cause a significant delay before anything starts being built, particularly since
jar
files are significantly larger thanpom
files (on the whole)If, instead,
maven_install
output anhttp_file
for each jar or source jar required, builds could start a lot sooner and we could ensure that all downloads happen through Bazel's own mechanisms.There doesn't appear to be a command line flag to make this happen automatically, but once we have resolved all the dependencies, the URLs to download from tend to be a simple transformation of the maven coordinates.
The text was updated successfully, but these errors were encountered: