-
Notifications
You must be signed in to change notification settings - Fork 574
[email protected] #6087
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
[email protected] #6087
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| module( | ||
| name = "objectweb_asm", | ||
| version = "9.8", | ||
| bazel_compatibility = [">=7.2.1"], | ||
| compatibility_level = 1, | ||
| ) | ||
|
|
||
| bazel_dep(name = "rules_java", version = "8.16.1") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../MODULE.bazel |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| load("@rules_java//java:java_library.bzl", "java_library") | ||
|
|
||
| java_library( | ||
| name = "asm-analysis", | ||
| srcs = glob([ | ||
| "src/main/java/org/objectweb/asm/**/*.java", | ||
| ]), | ||
| visibility = ["//visibility:public"], | ||
| deps = [ | ||
| "//asm", | ||
| "//asm-tree", | ||
| ], | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| load("@rules_java//java:java_library.bzl", "java_library") | ||
|
|
||
| java_library( | ||
| name = "asm-commons", | ||
| srcs = glob([ | ||
| "src/main/java/org/objectweb/asm/**/*.java", | ||
| ]), | ||
jmillikin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| visibility = ["//visibility:public"], | ||
| deps = [ | ||
| "//asm", | ||
| "//asm-tree", | ||
| ], | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| load("@rules_java//java:java_library.bzl", "java_library") | ||
|
|
||
| java_library( | ||
| name = "asm-tree", | ||
| srcs = glob([ | ||
| "src/main/java/org/objectweb/asm/**/*.java", | ||
| ]), | ||
jmillikin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| visibility = ["//visibility:public"], | ||
| deps = ["//asm"], | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| load("@rules_java//java:java_library.bzl", "java_library") | ||
|
|
||
| java_library( | ||
| name = "asm-util", | ||
| srcs = glob([ | ||
| "src/main/java/org/objectweb/asm/**/*.java", | ||
| ]), | ||
jmillikin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| visibility = ["//visibility:public"], | ||
| deps = [ | ||
| "//asm", | ||
| "//asm-analysis", | ||
| "//asm-tree", | ||
| ], | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| load("@rules_java//java:java_library.bzl", "java_library") | ||
|
|
||
| java_library( | ||
| name = "asm", | ||
| srcs = glob([ | ||
| "src/main/java/org/objectweb/asm/**/*.java", | ||
| ]), | ||
| visibility = ["//visibility:public"], | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| matrix: | ||
| platform: | ||
| - debian11 | ||
| - ubuntu2204 | ||
| - macos | ||
| - macos_arm64 | ||
| - windows | ||
| bazel: | ||
| - 8.x | ||
| tasks: | ||
| verify_targets: | ||
| name: Verify build targets | ||
| platform: ${{ platform }} | ||
| bazel: ${{ bazel }} | ||
| build_targets: | ||
| - '@objectweb_asm//asm' | ||
| - '@objectweb_asm//asm-analysis' | ||
| - '@objectweb_asm//asm-commons' | ||
| - '@objectweb_asm//asm-tree' | ||
| - '@objectweb_asm//asm-util' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "url": "https://gitlab.ow2.org/asm/asm/-/archive/ASM_9_8/asm-ASM_9_8.tar.gz", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I remember the archives generated by gitlab's archive endpoint change regularly depending on which CDN node you hit, which makes them unsuitable as BCR sources. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does that also apply to non- If this URL won't work for BCR, and since mirroring it on the Bazel archive mirror also isn't allowed by BCR rules, how.would you recommend I proceed? Other options:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know. We've had reliability issues with ARM's instance, but no checksum issues as far as I remember. We are working on setting up an automated mirror which should make this much easier. You could also open a manual mirror request issue on the Bazel repo. We should probably also formulate a clear vision/policy for simple Java modules in the BCR. If we add just a few, we may be risking one version violations if folks also consume Maven artifacts, perhaps unknowingly as transitive deps. If we plan to add a significant portion of what's available on Maven, it would probably be better to start up a separate Java registry. In fact, such a registry could potentially be smart instead of static, fetching source archives from Maven, generating BUILD files based on the pom.xml on the fly and persistently caching the result so that it's guaranteed to be immutable. This could be a pretty efficient way to get Java source builds to work for real projects. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding is that the Bazel mirror can't be used for BCR source archives, see #2821 and the discussion it links to (cc @meteorcloudy). If we can assume that A project to automatically generate a BCR-compatible package registry from language-specific upstream hosting (e.g. Maven) sounds like it would have a lot of interesting work involved but I think I'd prefer a more conventional approach, even if the per-package toil is slightly higher. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Isn't that rules_jvm_external? @jmillikin Why do we need this dependency as a bazel module? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, let me add some context here: Bazel already depends on rules_jvm_external to pull in most of its java dependencies as prebuilt jars, this is the standard integration with Maven in Bazel. It offers two advantages: 1) No need to hand craft BUILD files 2) automatically resolve transitive dependencies (you don't need to worry about fetching asm when using chicory compiler). Of course, the con is that those are not built from sources, like @fmeum said, maybe we could work on rules_jvm_external to make that possible. But at this point, I don't want to add another way to introduce java dependencies in Bazel. Previously I thought a Bazel module for Chicory was fine because it had no other java dependencies. Now that we do need it, I don't think this is a rabbit hole we should go into (what if there are more in future, we already had to patch chicory). If we do this, 1) there are extra maintenance burden for the community, 2) Such dependencies could be duplicated (asm already introduced via rules_jvm_external) and end up in the Bazel Java server deploy java, and may cause issues if there are version confilcts. My suggestion is to use rules_jvm_external for all Java dependencies, and hopefully we could add build from source mode in rules_jvm_external and I would be more than happy to switch to it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is the PR bazelbuild/bazel#27186, you should be able to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll look into what it takes to add source build capabilities to RJE. Avoiding one version violations is the primary reason for having a single source of truth, which in the case of Java has undisputably become RJE. Since it resolves source jars alongside binary jars, it would even allow you to gradually migrate over. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for updating the Bazel build to match the new expectations around Java dependencies. Should I keep this PR open, or close it? If Bazel projects should use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that makes sense to me. |
||
| "strip_prefix": "asm-ASM_9_8", | ||
| "integrity": "sha256-42ahU83/PDhmLpxRsJkGxR+Gz1gcRpymp1MotmOIplM=", | ||
| "overlay": { | ||
| "MODULE.bazel": "sha256-r9d1lmdyyNclCTsseADV2UPXQdOGcBVVsS4y416Qmzk=", | ||
| "asm/BUILD.bazel": "sha256-Y62jUjFc6OYMATS0frNha2TSq9/3H/FPWD2GlnUacQE=", | ||
| "asm-analysis/BUILD.bazel": "sha256-E6J5qngotEWfQ1yLyhJ9NGO3Kv/NIT9L9ijjlr9Z8fs=", | ||
| "asm-commons/BUILD.bazel": "sha256-NKyeC98FHH6PWFRdTU1domk9oi4Huliy+VLA75iP6oU=", | ||
| "asm-tree/BUILD.bazel": "sha256-5Mn3RNCgl96Kn51CqGioPQqWooHfKxl35VCBKZUgO1I=", | ||
| "asm-util/BUILD.bazel": "sha256-B+3gZnwLPujb7WyvtgBbrlg7AZY/UHWlYS0GJ/YRczs=" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "homepage": "https://asm.ow2.io/", | ||
| "maintainers": [ | ||
| { | ||
| "email": "[email protected]", | ||
| "github": "jmillikin", | ||
| "github_user_id": 646128, | ||
| "name": "John Millikin" | ||
| } | ||
| ], | ||
| "repository": [ | ||
| "https://gitlab.ow2.org/asm/asm" | ||
| ], | ||
| "versions": [ | ||
| "9.8" | ||
| ], | ||
| "yanked_versions": {} | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.