Comments (7)
I addressed this previously in #38 with the rationale that this rule is single purposed on resolving and fetching Maven artifacts, and adding Java annotation processing features will diverge from that and increase the API surface. However, placing this data in the artifact spec helper makes sense - I think the helper didn't exist when I made that comment in #38.
cc @aehlig thoughts?
from rules_jvm_external.
Let's move forward with this. Dagger, Auto-* and other annotation processors are core to many builds, and the API to integrate with them using the spec helper approach is a nice and simple design.
from rules_jvm_external.
@shs96c do you still have the patch for this?
from rules_jvm_external.
from rules_jvm_external.
Assigning you to this issue as well, but no hurry :)
from rules_jvm_external.
The issue with automatically specifying these directly is that some processors have separate annotations artifacts which would be attached with an exported_plugins, and some (like dagger) have the API that configures (e.g. the imported dep) be (a) the thing that should export the plugins, but also (b) consumed by the plugin implementation (e.g. dagger-compiler). This creates a cycle and it's a pain in the ass to work through.
The naive dagger bazel-workspace equivalent to the artifact relationship creates a cycle where com.google.dagger:dagger depends exports the plugin is defined by com.google.dagger:dagger-compiler which depends on com.google.dagger:dagger. I had to (in my build_snippets) introduce an indirection and THEN, account for that indirection within the package BUILD file for com.google.dagger, by having all local references point at the private copy.
It's possible that the indirection can be generalized so it works for auto-value as well, but thinking of a really good way to express that is what's delayed me from adding something like plugins = [plugin("processor.Class", "processor:artifact")]
(or whatever) to bazel_maven_repository.
I'd love to see it though. It's definitely sub-optimal to have to use build_snippets for this.
from rules_jvm_external.
With mabel
, I've went with downloading the jar
during the rules generation phase. mabel
will then look at the Processor
and extract the classes. Then I create java_plugin
for each of the processors and a library that exports all of them together.
I don't know if this method will work for rules_jvm_external
but it was good there.
from rules_jvm_external.
Related Issues (20)
- [Bazel CI] Bazel fails with `name 'android_ndk_repository' is not defined` HOT 2
- Single Maven Dependency Resolution (Exclude All Deps) HOT 1
- bzlmod: Not found error when using version from BOM HOT 2
- Feature Request - Allow file input for `manifest_entries` on `java_export`
- buildozer message incorrect with --incompatible_use_plus_in_repo_names
- "Accessing transitive dependencies list" not compatible with `strict_visibility`
- Feature Request: constraints support
- bzlmod: Not possible to add a dependency for test only and fetch the source code
- Maven resolver ignores BOM ordering for non-root modules
- FR: Expose maven_publish rule
- Release rules_jvm_external 6.3 HOT 6
- java_export got javadoc: error - Cannot find doclet class com.sun.tools.doclets.standard.Standard when build with java8 HOT 1
- `java_export` mistakenly including `neverlink` dependency in the `-srcs` jar and breaking docs generation HOT 1
- rules_jvm_external 6.3 breaks on some weird PackageInfo thing HOT 5
- bug: java_export doesn't set default javadocopts
- java.lang.ClassNotFoundException: edu.umd.cs.findbugs.LaunchAppropriateUI from spotbugs with rules_jvm_external release 6.3
- Credentials in additional_netrc_lines are not used for repin
- Transfer rules_jvm_external to bazel-contrib HOT 5
- Attempting to resolve `com.github.spotbugs:spotbugs:4.7.0` with the `coursier` resolver does not result in binaries being available HOT 3
- update to `rules_jvm_external` to 6.4 breaks build with `Failed to load Starlark extension '@@bazel_features//:features.bzl'` HOT 1
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.