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

Use FIR to dump ZiplineService declarations #1049

Merged
merged 3 commits into from
Jun 21, 2023

Conversation

swankjesse
Copy link
Contributor

I considered using KSP but it's awkard to generate artifacts from KSP during compile that the compile task doesn't itself need.

Working towards #1047

I considered using KSP but it's awkard to generate artifacts
from KSP during compile that the compile task doesn't itself need.

Working towards #1047
* Type information that instances of `ZiplineServiceAdapter` instances need at construction time.
* Use [BridgedInterface.adapterConstructorArguments] to create an instance.
*/
class AdapterConstructorArguments(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a weird diff; I removed an unused file

private val FirFunction.isNonInterfaceFunction: Boolean
get() = symbol.name.identifier in NON_INTERFACE_FUNCTION_NAMES

private fun FirFunction.asDeclaredZiplineFunction(): DeclaredZiplineFunction {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There’s annoying duplication between this and the compiler plugin. The compiler plugin is IR, this is FIR, and we can’t have nice things.

Comment on lines +80 to +82
// TODO Figure out how to add the JDK modules to the classpath. Currently importing the stdlib
// allows a typealias to resolve to a JDK type which doesn't exist and thus breaks analysis.
configuration.addJvmClasspathRoots(dependencies.filter { "kotlin-stdlib-" !in it.path })
Copy link
Member

Choose a reason for hiding this comment

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

Feel free to figure this out so I can steal the fix!

@swankjesse swankjesse merged commit fd33c34 into trunk Jun 21, 2023
6 checks passed
@swankjesse swankjesse deleted the jwilson.0619.api_dump_fir branch June 21, 2023 20:09
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