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

Unable to round-trip a JavaInfo #11928

Closed
shs96c opened this issue Aug 12, 2020 · 4 comments
Closed

Unable to round-trip a JavaInfo #11928

shs96c opened this issue Aug 12, 2020 · 4 comments
Labels
area-java-Starlark_API java_common, JavaInfo and other Starlark Java modules P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-Rules-Java Issues for Java rules type: feature request

Comments

@shs96c
Copy link
Contributor

shs96c commented Aug 12, 2020

Description of the feature request:

Given an existing JavaInfo, it is impossible to create a copy that is semantically equivalent. This precludes one taking an existing JavaInfo and adding or removing additional information.

Feature requests: what underlying problem are you trying to solve with this feature?

I'd like to modify a single property of an existing JavaInfo.

What's the output of bazel info release?

3.4.1

@gregestren
Copy link
Contributor

For posterity, what's missing if you call the constructor?

@lberki lberki added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Oct 5, 2020
@lberki
Copy link
Contributor

lberki commented Oct 5, 2020

Is this a good idea? If we allow people to construct any JavaInfo instance, it's possible to construct inconsistent ones.

@comius comius added area-java-Starlark_API java_common, JavaInfo and other Starlark Java modules P2 We'll consider working on this in future. (Assignee optional) and removed P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Nov 21, 2020
bazel-io pushed a commit that referenced this issue Mar 22, 2021
JavaInfo constructor (class JavaInfoApi) is extended with parameters compile_jdeps, native_headers, generated_class_jar, generated_source_jar.

Class OutputJarApi exposes all the added data and additionally jdeps and manifest_file. Field ijar is renamed to compile_jar (old ijar getter is left in for compatibility).

Class JavaRuleOutptJarsProviderApi: outputs.jdeps and outputs.manifest_file is deprecated in favour of fields in JarOutputs.

Design document: https://docs.google.com/document/d/10isTEK5W9iCPp4BIyGBrLY5iti3Waaam6EeGVSjq3r8/edit#bookmark=id.vta5s12rfsxt
Related issue #11928

PiperOrigin-RevId: 364291642
bazel-io pushed a commit that referenced this issue Mar 25, 2021
JavaInfo constructor (class JavaInfoApi) is extended with parameters compile_jdeps, native_headers, generated_class_jar, generated_source_jar.

Class OutputJarApi exposes all the added data and additionally jdeps and manifest_file. Field ijar is renamed to compile_jar (old ijar getter is left in for compatibility).

Class JavaRuleOutptJarsProviderApi: outputs.jdeps and outputs.manifest_file is deprecated in favour of fields in JarOutputs.

Design document: https://docs.google.com/document/d/10isTEK5W9iCPp4BIyGBrLY5iti3Waaam6EeGVSjq3r8/edit#bookmark=id.vta5s12rfsxt
Related issue #11928

NEW: class JavaLibrary: making a call to createGeneratedExtensionRegistry before javaArtifactsBuilder is built, so that information added by former is not lost.

TESTED=[]
PiperOrigin-RevId: 365073000
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
… support.

    JavaInfo constructor (class JavaInfoApi) is extended with parameters compile_jdeps, native_headers, generated_class_jar, generated_source_jar.

    Class OutputJarApi exposes all the added data and additionally jdeps and manifest_file. Field ijar is renamed to compile_jar (old ijar getter is left in for compatibility).

    Class JavaRuleOutptJarsProviderApi: outputs.jdeps and outputs.manifest_file is deprecated in favour of fields in JarOutputs.

    Design document: https://docs.google.com/document/d/10isTEK5W9iCPp4BIyGBrLY5iti3Waaam6EeGVSjq3r8/edit#bookmark=id.vta5s12rfsxt
    Related issue bazelbuild/bazel#11928

    NEW: class JavaLibrary: making a call to createGeneratedExtensionRegistry before javaArtifactsBuilder is built, so that information added by former is not lost.

    TESTED=[]
    PiperOrigin-RevId: 365073000
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
    JavaInfo constructor (class JavaInfoApi) is extended with parameters compile_jdeps, native_headers, generated_class_jar, generated_source_jar.

    Class OutputJarApi exposes all the added data and additionally jdeps and manifest_file. Field ijar is renamed to compile_jar (old ijar getter is left in for compatibility).

    Class JavaRuleOutptJarsProviderApi: outputs.jdeps and outputs.manifest_file is deprecated in favour of fields in JarOutputs.

    Design document: https://docs.google.com/document/d/10isTEK5W9iCPp4BIyGBrLY5iti3Waaam6EeGVSjq3r8/edit#bookmark=id.vta5s12rfsxt
    Related issue bazelbuild/bazel#11928

    PiperOrigin-RevId: 364291642
@github-actions
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Apr 12, 2023
@github-actions
Copy link

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage). Thanks!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-java-Starlark_API java_common, JavaInfo and other Starlark Java modules P2 We'll consider working on this in future. (Assignee optional) stale Issues or PRs that are stale (no activity for 30 days) team-Rules-Java Issues for Java rules type: feature request
Projects
None yet
Development

No branches or pull requests

4 participants