-
Notifications
You must be signed in to change notification settings - Fork 209
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
kt_jvm_import ignores embedded ProGuards? #697
Comments
Thanks @cpsauer for looking into all this! It shouldn't be too hard for us to mirror this behavior once those tools are in Bazel core. We can finally look into flipping the
What's blocking us from building proper Kotlin support into ijar so that Kotlin metadata isn't being stripped out anymore? This would also let |
You're very welcome. Thanks for looking at it, too, @Bencodes! Lots of text back, but trying to do a good job addressing what you wrote :) Re ijar supporting Kotlin:Not sure what's hung up the fix to bazelbuild/bazel#4549 for 4+ years beyond what's in that thread. I, too, would like to see ijar fixed for Kotlin if someone has a good handle on how, and, all else being equal, certainly like that fix more than my own! @kevin1e100 was pulled in originally to see if it might merit a higher priority. But it seems like it requires enough Kotlin/JVM expertise that someone else would have comparative advantage over me there. bazelbuild/bazel#14967 is just an 80/20 fix to try to get things unbroken, unblocked, and hopefully defragmented in the meantime, until ijar gets fixed. When I encountered bazelbuild/bazel#4549, I happened to have the java_import implementation warm in my mental cache from having just fixed the ProGuard issue, so I figured I'd toss up the quick fix. I'm not a particularly heavy Kotlin user or anything, but I figured I'd do my part to leave things better than I found them. I'd be happy to abandon the PR if folks (or you?) want to do the full fix to ijar right away, but otherwise, with More generally than Re
|
A status update, after some discussion:
|
Heads that the fix that would enable reusing ijar (or java_import more broadly) seems likely to land in 5.2: bazelbuild/bazel#15355 |
Hi wonderful Bazel folks,
I'd noticed that Bazel core was ignoring ProGuard files embedded in JARs, rather than bubbling them up in ProguardSpecProvider, so I'd pulled together a PR to fix it in bazelbuild/bazel#14966.
I know rules_kotlin won't automatically get that fix because it don't currently draw on java_import in the implementation of kt_jvm_import, presumably because java_import was broken for Kotlin (bazelbuild/bazel#4549). So I'm also working to land a quick fix to java_import in bazelbuild/bazel#14967 that should make it usable for Kotlin, if you'd like it, say, in the implementation of kt_jvm_import.
Anyway I figured I should give a friendly heads that this ProGuard issue is out there in rules_java and its Kotlin-supporting brethren.
And that (hopefully) you'll soon be able to get the fix on the cheap by leaning on java_import for implementation. Or by sharing code one layer deeper and drawing on the extractor tool in the PR (once it lands) and the Bazel proguard spec validator (already available).
Thanks for reading and considering,
Chris
(ex-Googler)
P.S. cc'ing @kevin1e100, just because we'd been discussing these PRs and the state of ijar stuff.
The text was updated successfully, but these errors were encountered: