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 Kotlin Metadata unique_name value so that it is actually unique #539

Merged
merged 6 commits into from
Aug 30, 2024

Conversation

05nelsonm
Copy link
Owner

@05nelsonm 05nelsonm commented Aug 28, 2024

Closes #538

As can be seen from output for metadataCommonMainClasses gradle task, there are some source sets that were using a unique_name that was NOT actually unique.

$ ./gradlew metadataCommonMainClasses --no-build-cache

......

> Task :library:runtime-core:compileCommonMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime-core/build/classes/kotlin/metadata/commonMain/default/manifest
Changing from 'runtime-core_commonMain' to 'io.matthewnelson.kmp-tor\:runtime-core_commonMain'

> Task :library:runtime-core:compileNonNativeMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime-core/build/classes/kotlin/metadata/nonNativeMain/default/manifest
Changing from 'runtime-core_nonNativeMain' to 'io.matthewnelson.kmp-tor\:runtime-core_nonNativeMain'

> Task :library:runtime-core:compileNonJvmMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime-core/build/classes/kotlin/metadata/nonJvmMain/default/manifest
Changing from 'runtime-core_nonJvmMain' to 'io.matthewnelson.kmp-tor\:runtime-core_nonJvmMain'

> Task :library:runtime-core:compileNonJsMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime-core/build/classes/kotlin/metadata/nonJsMain/default/manifest
Changing from 'runtime-core_nonJsMain' to 'io.matthewnelson.kmp-tor\:runtime-core_nonJsMain'

> Task :library:runtime-ctrl:compileCommonMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime-ctrl/build/classes/kotlin/metadata/commonMain/default/manifest
Changing from 'runtime-ctrl_commonMain' to 'io.matthewnelson.kmp-tor\:runtime-ctrl_commonMain'

> Task :library:runtime-ctrl:compileNonJsMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime-ctrl/build/classes/kotlin/metadata/nonJsMain/default/manifest
Changing from 'runtime-ctrl_nonJsMain' to 'io.matthewnelson.kmp-tor\:runtime-ctrl_nonJsMain'

> Task :library:runtime:compileCommonMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime/build/classes/kotlin/metadata/commonMain/default/manifest
Changing from 'runtime_commonMain' to 'io.matthewnelson.kmp-tor\:runtime_commonMain'

> Task :library:runtime:compileNonJvmMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime/build/classes/kotlin/metadata/nonJvmMain/default/manifest
Changing from 'runtime_nonJvmMain' to 'io.matthewnelson.kmp-tor\:runtime_nonJvmMain'

> Task :library:runtime:compileNonJsMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime/build/classes/kotlin/metadata/nonJsMain/default/manifest
Changing from 'runtime_nonJsMain' to 'io.matthewnelson.kmp-tor\:runtime_nonJsMain'

> Task :library:runtime-service:compileCommonMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime-service/build/classes/kotlin/metadata/commonMain/default/manifest
Changing from 'runtime-service_commonMain' to 'io.matthewnelson.kmp-tor\:runtime-service_commonMain'

> Task :library:runtime-service-ui:compileCommonMainKotlinMetadata
Misconfigured unique_name metadata attribute
for /home/administrator/Projects/personal/kmp-tor/library/runtime-service-ui/build/classes/kotlin/metadata/commonMain/default/manifest
Changing from 'runtime-service-ui_commonMain' to 'io.matthewnelson.kmp-tor\:runtime-service-ui_commonMain'

BUILD SUCCESSFUL in 10s
72 actionable tasks: 62 executed, 10 up-to-date

@05nelsonm 05nelsonm self-assigned this Aug 28, 2024
@05nelsonm
Copy link
Owner Author

Confirmed to work, as a SNAPSHOT publication of this no longer shows up in the KLIB resolver warning as having duplicate unique_name=runtime_commonMain libraries.

Before

w: KLIB resolver: The same 'unique_name=runtime_commonMain' found in more than one library: /Users/admin/Projects/kmp-tor-samples/samples/compose/build/kotlinTransformedMetadataLibraries/commonMain/app.cash.sqldelight-runtime-2.0.2-commonMain-asQ-DQ.klib, /Users/admin/Projects/kmp-tor-samples/samples/compose/build/kotlinTransformedMetadataLibraries/commonMain/io.matthewnelson.kmp-tor-runtime-2.0.0-alpha01-SNAPSHOT-commonMain-akhp6A.klib, /Users/admin/Projects/kmp-tor-samples/samples/compose/build/kotlinTransformedMetadataLibraries/commonMain/org.jetbrains.compose.runtime-runtime-1.6.11-commonMain-CVJWAg.klib

After

w: KLIB resolver: The same 'unique_name=runtime_commonMain' found in more than one library: /Users/admin/Projects/kmp-tor-samples/samples/compose/build/kotlinTransformedMetadataLibraries/commonMain/app.cash.sqldelight-runtime-2.0.2-commonMain-asQ-DQ.klib, /Users/admin/Projects/kmp-tor-samples/samples/compose/build/kotlinTransformedMetadataLibraries/commonMain/org.jetbrains.compose.runtime-runtime-1.6.11-commonMain-CVJWAg.klib

Copy link
Owner Author

@05nelsonm 05nelsonm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@05nelsonm 05nelsonm merged commit 98874a2 into master Aug 30, 2024
9 checks passed
@05nelsonm 05nelsonm deleted the issue/538-unique_name branch August 30, 2024 08:39
@05nelsonm 05nelsonm linked an issue Aug 30, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix publication metadata unique_name attribute
1 participant