-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
IR backend #126
Comments
Hi @robertfmurdock can you please share more details on what exactly do you mean? |
Oh sure. Kotlin 1.4 adds a new compiler backend called IR, and to support the new backend libs can be built in “both” mode to allow users to compile in whatever mode they choose. More info is available on the kotlin 1.4 update page
…Sent from my iPhone
On Aug 18, 2020, at 6:55 PM, Ohad Shai ***@***.***> wrote:
Hi @robertfmurdock can you please share more details on what exactly do you mean?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I should be more specific - I’m talking about the JS IR. The JVM IR has no ‘both’ mode AFAIK, and thus isn’t great for libs as of now.
… On Aug 18, 2020, at 6:55 PM, Ohad Shai ***@***.***> wrote:
Hi @robertfmurdock <https://github.com/robertfmurdock> can you please share more details on what exactly do you mean?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#126 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABPNPUU6MN5NALQO7EEA3NLSBMBHJANCNFSM4QEHAPOA>.
|
I've currently hit the same problem. We are migrating libraries to Kotlin 1.4 and it is impossible to use kotlin-logging because it does not export IR artifacts. In order to make it work, you should update kotlin to 1.4 and select |
@oshai Looks like things are merged... but a new release has yet to be published! 😨 |
Yes, I encountered some issues while publishing. See #130 for status and details. |
Ah, makes sense. I just looked and discovered I put in the bintray workaround in my own projects last year (to support the new Gradle metadata regarding Multiplatform projects), so I never saw this problem. 😅
… On Sep 8, 2020, at 12:34 AM, Ohad Shai ***@***.***> wrote:
Yes, I encountered some issues while publishing. See #130 <#130> for status and details.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#126 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABPNPUWMLIUZGIDSZ4AXLQLSEWX47ANCNFSM4QEHAPOA>.
|
If you can point to a similar example where it works it will be great. |
https://github.com/robertfmurdock/testmints/blob/2b45f7c52ecb9b530467ca0eadced338a61795c4/build.gradle.kts#L109 <https://github.com/robertfmurdock/testmints/blob/2b45f7c52ecb9b530467ca0eadced338a61795c4/build.gradle.kts#L109>
This is the relevant section in my own libs. The migration docs for library authors include a specific workaround:
bintray/gradle-bintray-plugin#229 (comment) <bintray/gradle-bintray-plugin#229 (comment)>
Hope that helps
… On Sep 8, 2020, at 5:22 PM, Ohad Shai ***@***.***> wrote:
If you can point to a similar example where it works it will be great.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#126 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABPNPUR2KTWDFKUHE45KTPDSE2OC5ANCNFSM4QEHAPOA>.
|
I don't know what's missing, but I still can't use I'll investigate and report here, but maybe this issue should be reopened as I don't think the PR fixed this. |
The current build file does not use IR: https://github.com/MicroUtils/kotlin-logging/blob/800d89c93c0e7061d897ff09b71a2a65fc3fc4e4/build.gradle.kts#L59. It uses default legacy. |
I am not sure it is a correct way to do that. Anyway, gradle metadata modules are missing from the distribution so standard kotlin multiplatform techniques won't work. My fork is working fine though. |
I'm sure the Both ways are fine. So you're saying it's the publishing that has problems? Can you upstream the changes you made on your fork? |
I can't upstream is since it breaks artifact naming (brings it in line with the current MPP scheme) and @oshai does not want to do that. I've also dropped the bugged bintray plugin in favor of maven-publish. You can see the build source here: https://github.com/altavir/kotlin-logging/blob/master/build.gradle.kts |
Yeah, I was thinking about that too, the naming scheme is currently non-conventional and forces us to add multiple dependencies instead of just depending on it once in the @oshai, would you be willing to break backwards compatibility and release a version 2.0 with the current MPP naming scheme, functional JS-IR, and the partial fix for #45? I think this would be best in the long term; currently this project is not following MPP best practices and since MPP is still in alpha, I feel like it will only get worse over time whenever new changes to Kotlin MPP are introduced. |
Generally, I am willing to break backwards compatibility. But when doing that we should consider few things:
I think you're welcome to create a PR, we can even test it with a snapshot, and then we can get smarter decisions. |
This is true, but at least in terms of naming packages, I don't think it'll break again.
Yes, because MPP now has a "standard" for package names, I think it would be in the best interest of this project to follow it, I'm sure in the long term users will be expecting it, and anything other than the standard will feel odd. I'm not sure if this comes just from the naming, but in the latest Kotlin MPP I should only depend on
I think as long as we add a short paragraph in the
Currently everyone using
How would you like to proceed in terms of publishing? Stop using Bintray and go with @altavir, since you already have a working build, would you now be willing to push a PR with the changes? |
It is possible to provide a single mpp dependency without changing the naming scheme. If one has gradle metadata, it does not matter what are actual names. It is also possible to provide aliases (never tried it though). Keeping the naming scheme requires some work though. I can create a PR that adheres to the new naming scheme rules (all I need is to copy relevant parts from my publishing plugin). And answering @oshai question. artifact names have nothing to do with package names. |
Yeah, thanks for the explanation. I assumed this was the case.
Even if this was simple, imho I still think the naming scheme should be changed to adhere to MPP best practices. But, of course, this is up to @oshai to decide. :) Thanks @altavir, I'll await your PR. |
@nunocastromartins I just noticed you tried 1.11.0. Can you please also try 1.11.3 in case you haven't? |
No luck. Project won't build even without IR, was the same with 1.11.0 iirc. |
Fixed in #145 |
1.4.0 is out! Time to compile this in BOTH mode.
The text was updated successfully, but these errors were encountered: