Skip to content

Conversation

@aviroop-123
Copy link
Contributor

@aviroop-123 aviroop-123 requested review from a team as code owners December 19, 2025 18:11
@aviroop-123 aviroop-123 force-pushed the klib-metadata-module-descriptor-removal branch from 0e09981 to c5215d8 Compare December 19, 2025 18:31
@ddolovov
Copy link
Contributor

It would be helpful to add some test to make sure that the result of

    val usedLibraries = librariesDescriptors.zip(resolvedLibraries).filter { (module, _) ->
        usedPackages.any { !module.packageFragmentProviderForModuleContentWithoutDependencies.isEmpty(it) }
    }.map { it.second }.toSet()

is the same as the result of

    val usedLibraries = resolvedLibraries.filter { resolvedLibrary ->
        val header = parseModuleHeader(resolvedLibrary.library.metadata.moduleHeaderData)

        val nonEmptyPackageNames = buildSet {
            addAll(header.packageFragmentNameList)
            removeAll(header.emptyPackageList)
        }

        usedPackages.any { it.asString() in nonEmptyPackageNames }
    }.toSet()

@aviroop-123 aviroop-123 force-pushed the klib-metadata-module-descriptor-removal branch from c5215d8 to 833d4c0 Compare January 6, 2026 01:56
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.

2 participants