Skip to content
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

How to add JavaInfo to deps #35

Closed
abiezev opened this issue Apr 14, 2022 · 1 comment
Closed

How to add JavaInfo to deps #35

abiezev opened this issue Apr 14, 2022 · 1 comment

Comments

@abiezev
Copy link

abiezev commented Apr 14, 2022

When trying to import a generated kotlin sdk into a service, I am getting an error that the generated openapi sdk does not have mandatory providers: 'JavaInfo'

Error:(3, 15) in deps attribute of kt_jvm_library rule //services/path/... :   '//openapi:com.company.sdk.service' does not have mandatory providers: 'JavaInfo'.

I see in the code that I can add a dep for JavaInfo: https://github.com/OpenAPITools/openapi-generator-bazel/blob/master/internal/openapi_generator.bzl#L131:L137

When I set deps = ["JavaInfo"] I get an error that: rule '//openapi:JavaInfo' does not exist.

Any idea how I should apply JavaInfo to deps? My understanding is that JavaInfo is a provider not a rule.

Just as a note, it seems Kotlin like Scala requires JavaInfo: https://docs.aspect.build/bazelbuild/rules_kotlin/v1.5.0-beta-2/kotlin.html#kt_jvm_library

@AndrewGuenther
Copy link

Pretty sure this is a duplicate of #22

Effectively, the output of this rule cannot be depended on by any other rule. I have yet to see a project using this package successfully. As far as I can tell, it will get you the output into bazel-bin, but if you actually want to use that from another bazel target, you cannot.

@abiezev abiezev closed this as completed Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants