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

Fix regression introduced in #271 for legacy use of "jars" in kt_jvm_import #276

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

cgruber
Copy link
Collaborator

@cgruber cgruber commented Feb 10, 2020

Only propagate srcjar if it isn't the default empty jar added in ae70089 to fix bazelbuild/intellij#1616

This fixes a regression introduced in #271, which fixes a bug in intellij by adding a default srcjar if there isn't one. This broke legacy handling of the jars= attribute in kt_jvm_import, when the imported jars= attribute had a -sources.jar in the resulting files. By not using srcjar you get the default, plus you get the extra -sources.jar, which blows up the "only one source jar" assertion. This just only propagates srcjar into the legacy handling IF it isn't the default value.

Also remove a print statement that leaked in, and fix a bad type issue in the fail() of the above-mentioned assertion code, which was surfaced when this mode came into existence.

This only occurs when using kt_jvm_import(jars=), which is already legacy and slated for removal. We may just rip out the facility, but for now, we support it.

@cgruber cgruber added type: bug Something isn't working component: jvm P1 labels Feb 10, 2020
@cgruber cgruber self-assigned this Feb 10, 2020
kotlin/internal/jvm/impl.bzl Show resolved Hide resolved
@cgruber cgruber merged commit 5e58b4b into bazelbuild:master Feb 18, 2020
cromwellian pushed a commit to cromwellian/rules_kotlin that referenced this pull request Mar 7, 2020
cgruber added a commit to cgruber/rules_kotlin that referenced this pull request Apr 14, 2020
* upstream/master:
  Fix non-reproducible archives (bazelbuild#304)
  Adds a kt_plugin rule (bazelbuild#308)
  Ensure that KotlionBuilder workers use a clean directory for each compilation. (bazelbuild#298)
  Apply autoformatting to all files. (bazelbuild#302)
  Optional outputs (bazelbuild#291)
  Change plugins to use depsets, as opposed to lists. (bazelbuild#292)
  Add Corbin to the codeowners. (bazelbuild#293)
  Update Protobuf to 3.11.3 (bazelbuild#286)
  Remove tree artifacts (bazelbuild#287)
  Cleanup src tree (bazelbuild#288)
  Update README.md (bazelbuild#285)
  Filter non-kotlin code out of generated sources (bazelbuild#263)
  Update readme so the dev instructions highlight using a local clone (bazelbuild#283)
  Remove third_party checked in jars, and properly pull maven dependencies. (bazelbuild#279)
  Only propagate srcjar if it isn't the default empty jar added in ae70089 to fix bazelbuild/intellij#1616 (bazelbuild#276)
  Allow resources to be in a kotlin directory (bazelbuild#268)
jongerrish added a commit to jongerrish/rules_kotlin that referenced this pull request Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: jvm P1 type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aspect fails consuming JavaInfo without srcjar.
2 participants