Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Help wanted #2

Open
Foso opened this issue Sep 3, 2019 · 2 comments
Open

Help wanted #2

Foso opened this issue Sep 3, 2019 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Foso
Copy link
Owner

Foso commented Sep 3, 2019

Hi there are some things i need help with:

  1. I need a better way to detect when the last class of a module/platform was read and the processing is finished, right now i'm relying on fact that the classes NativeIrGenerationExtension, DebugLogClassGenerationInterceptor and JsSyntheticTranslateExtensionExt are called after the SyntheticResolveExtensionImpl class. I would like to find to have solution that doesn't need these extra classes.

  2. I would like to have a solution where you don't have to manually register every extension classes and just pass the instance of MpAptProject in only one class and this class will register all needed extension classes.

Maybe something like this:

val processor = MpAptTestProcessor(configuration)
val mpapt = MpAptProject(processor)
Mpapt.init(mpapt)

My problem is that i need the project file for the "Register"-classes (I don't know what's the correct name for this classes "IrGenerationExtension.registerExtension()" ) and the kotlin-compiler is using com.intellij.mock.MockProject but the kotlin-compiler-embeddable is using org.jetbrains.kotlin.com.intellij.mock.MockProject and they both have the "Register"-classes with the same name but they need the different project objects. Right now i'm using only the kotlin-compiler-embeddable as dependency in MpApt

  1. Testing
    I don't know what's the best way to write tests for this library
@Foso Foso added the help wanted Extra attention is needed label Sep 3, 2019
@ATizik
Copy link

ATizik commented Sep 5, 2019

  1. Testing
    There are compile testing libraries out there, for example:
    https://github.com/tschuchortdev/kotlin-compile-testing

That test annotation processors by invoking compilation through K2JVMCompiler class, and it accepts plugin options.
So it should be possible to use a simple unit test that checks JS/JVM through the usual code path

@tschuchortdev
Copy link

If you have questions regarding the compile testing library, feel free to contact me. I'm also working on a library somewhat similar to this one, but it will fill a different role since I'm targeting the JVM only.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants