Comments (15)
One benefit of a lock file not yet discussed here is that the artifacts are pre-resolved to an artifact URL and shasum. This can save a lot of time every time you would normally need to re-run the coursier resolver (several minutes in our repository). Doing the resolution once and storing that information to a lock file saves us a ton of time in our CI builds.
from rules_jvm_external.
I agree. This is something that I'll discuss with @aehlig, who implemented the Bazel-wide lock file for external repositories (--experimental_workspace_resolved_file
).
from rules_jvm_external.
Work in progress to support artifact checksum pinning in a file read and exported by maven_install
: #169
from rules_jvm_external.
I'm probably doing this incorrectly, but the --checksum
flag doesn't seem to be doing what I think it should do:
$ sha1sum /usr/local/google/home/jingwen/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.jar
88e3c593e9b3586e1c6177f89267da6fc6986f0c /usr/local/google/home/jingwen/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.jar
$ cat /usr/local/google/home/jingwen/.cache/coursier/v1/https/repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.jar.sha1
88e3c593e9b3586e1c6177f89267da6fc6986f0c
$ coursier fetch com.google.errorprone:error_prone_annotations:2.2.0 --checksum 88e3c593e9b3586e1c6177f89267da6fc6986f0c
mirrorConfFiles=List(MirrorConfFile(/usr/local/google/home/jingwen/.config/coursier/mirror.properties, true))
allMirrors0=List()
Resolution error: Error downloading com.google.errorprone:error_prone_annotations:2.2.0
not found: /usr/local/google/home/jingwen/.ivy2/local/com.google.errorprone/error_prone_annotations/2.2.0/ivys/ivy.xml
checksum not found:
from rules_jvm_external.
Looks like Coursier CLI doesn't support this yet, according to the referenced issue. We may have to do the checksum verification out of band, after downloading the jars and possibly while generating the BUILD targets.
from rules_jvm_external.
Would this issue also cover "locking" versions of all transitive dependencies? (Like Cargo.lock etc.)
from rules_jvm_external.
from rules_jvm_external.
@jin #107, does not seem to be about generating or using a .lock
file.
from rules_jvm_external.
My understanding is that locking and pinning are similar to each other. #107 talks about locking top level artifacts to specific versions, but doesn't cover transitive dependencies. Let's continue discussions there?
from rules_jvm_external.
@jin If I understand #107 it is about overriding/pinning specific transitive dependencies to some version, .lock file would be generated automatically, pinning all versions to the resolved ones
from rules_jvm_external.
Yes, and I imagine lock file generation will involve Bazel WORKSPACE resolve files to a large extent.
from rules_jvm_external.
@jin Maybe this issue should be renamed "Support artifact checksum pinning" or something to differentiate it from #134 which is more actually verification IMHO
from rules_jvm_external.
@jin any thought on the benefit of a lock file that @JaredNeil mentioned?
from rules_jvm_external.
@jin just a follow-up. Any update on the lock file?
from rules_jvm_external.
Sorry, no updates on this yet.
from rules_jvm_external.
Related Issues (20)
- Failure in 6.1 due to generated `http_file` with no `urls` set HOT 4
- coursier.bzl contains invalid reference
- Dependency resolution with large large of artifacts (500 or more) take 20+ minutes HOT 4
- Native exe classifier artifacts are not resolvable when using MODULE.bazel
- Documented (and test) minimum supported host Java version HOT 1
- the srcs attribute is updated with the OS-specific path separator HOT 1
- JDK warning about use of noverify option HOT 3
- Overriding the Starlark aar_import label doesn't seem to work HOT 2
- rules_jvm_external 6.1 seems to require artifacts or boms list HOT 2
- Maven lockfile generated with bzlmod enabled is missing deps in WORKSPACE mode HOT 1
- [Bazel CI] Build failed with errors: no native function or rule 'aar_import' HOT 1
- [Bazel CI] Error name 'aar_import' is not defined with Bazel@HEAD HOT 1
- Maven Resolver Fails with 'The entity "oslash" was referenced, but not declared' Error HOT 3
- Maven resolver creates redundant resolver folders, consuming excessive disk space HOT 2
- Maven Resolver Ignores BOM Ordering
- Snapshot artifacts are not resolved by the Maven resolver
- Add a bzlmod extension to override default repositories HOT 2
- Occasional NPE thrown with the Maven resolver HOT 4
- Maven resolver seems to be slower than the Coursier resolver HOT 2
- java_export generated pom.xml does not include <classifier> property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_jvm_external.