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

Stop passing source jars in kt_jvm_import() to the DefaultInfo(files=) attribute. #221

Merged
merged 6 commits into from
Oct 28, 2019

Conversation

cgruber
Copy link
Collaborator

@cgruber cgruber commented Oct 25, 2019

DefaultInfo(files=) gets passed to various things that interpret it as regular outputs, such as production jars, so things like source jars should not go in it.

Fixes #208

@cgruber
Copy link
Collaborator Author

cgruber commented Oct 25, 2019

I removed the usual reviewers, since this isn't up for review/acceptance, but for comment.

@cgruber
Copy link
Collaborator Author

cgruber commented Oct 25, 2019

For the record, the example is a bit complex, to try to force a few scenarios - direct depending on a kt library, adding an intervening java target, etc. the //app:app case should (in theory) mirror the case given in #208, unless I'm missing something.

@cgruber
Copy link
Collaborator Author

cgruber commented Oct 25, 2019

Never mind, I found the bug, even though I can't replicate it.

@cgruber cgruber changed the title [WIP] Initial attempt to replicate #208 Stop passing source jars in kt_jvm_import() to the DefaultInfo(files=) attribute. Oct 26, 2019
@cgruber
Copy link
Collaborator Author

cgruber commented Oct 26, 2019

Ok, This should reproduce (and fix) the problem, and is suitable for review now.

@Kernald
Copy link
Contributor

Kernald commented Oct 26, 2019

Thanks for the fix! I confirm that it fixes #208 for me.

@cgruber cgruber force-pushed the fix_regression branch 2 times, most recently from 328d33d to 8149f92 Compare October 26, 2019 01:11
examples/android/WORKSPACE Outdated Show resolved Hide resolved
examples/android/WORKSPACE Outdated Show resolved Hide resolved
…which gets used in places to imply the compile deps, not all the files produced by the rule (such as source jars). This gets fed into the incremental dexing inputs in the android rules, resuling in bazelbuild#208 (which this commit should fix).
@cgruber cgruber merged commit 1a974a7 into bazelbuild:master Oct 28, 2019
@cgruber cgruber deleted the fix_regression branch October 28, 2019 23:43
cgruber added a commit to cgruber/rules_kotlin that referenced this pull request Oct 29, 2019
Also delete most of the readme.

* upstream/master:
  Add recent changes to changelog.
  Update README.md to account for 1.3.0-rc1 release.
  Stop passing source jars in kt_jvm_import() to the DefaultInfo(files=) attribute. (bazelbuild#221)
  Use a comma to separate friends-paths, as kotlinc extracts friends path elements using that separator, not the usual system path separator. (bazelbuild#222)
  Use regular expressions to match JS filenames in kt_js_import. (bazelbuild#223)
  Fix builder crashes (bazelbuild#217)
  Remove use of named parameter that has been disabled in starlark (only the positional usage is permitted now). (bazelbuild#215)
  Add a facility for inferring the test class from the test name, if no test_class is specified, similar to the java_test rule. (bazelbuild#209)
  Update readme URL (bazelbuild#207)
  Newline at end of file, per review comment.
  remove unused import.
  Remove script which (a) isn't needed given the CI matrix, and (b) has already been moved to another repo.
  Fixes to the readme, per code review.
  Update scripts/test_version_utils.kt
  Move a chunk of the new/log into the CHANGELOG.md, and trim.
  Add a changelog/newslog
  Fix contributing doc.
  A bit of formatting on the readme.
  Update readme in preparation for upstreaming.
jongerrish added a commit to jongerrish/rules_kotlin that referenced this pull request Apr 16, 2020
…) attribute. (bazelbuild#221)

* Don't include the source jar in the default info's files= attribute, which gets used in places to imply the compile deps, not all the files produced by the rule (such as source jars). This gets fed into the incremental dexing inputs in the android rules, resuling in bazelbuild#208 (which this commit should fix).

* Add in an android application example with a `build_test()` and a CI pipeline to build/test it.  Also normalize examples naming in CI.

* Use the preferred form for kt_jvm_import in the core bits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

android_binary is broken because it's not allowed to depend on .jar artifacts
3 participants