Hey there! It's been a little while since I've wor...
# compiler
a
Hey there! It's been a little while since I've worked with the compiler (a little over a year) and downloaded it again after nuking my computer. Tried running some of the FIR testing for the compose compiler plugin and I'm getting
java.lang.illegalstateexception: system property "compose.compiler.hosted.jar.path" is not found
- how should I get past this error?
d
What exactly do you run?
a
@dmitriy.novozhilov Okay, I think I figured it out. I had originally built the whole project before clicking on the test run but running just
./gradlew clean build :compiler
does allow the tests to run... even if the build itself seems to fail
Copy code
➜ ./gradlew build :compiler
...
> Configure project :plugins:compose-compiler-plugin:compiler-hosted:integration-tests
w: ⚠️ The Default Kotlin Hierarchy Template was not applied to 'project ':plugins:compose-compiler-plugin:compiler-hosted:integration-tests'':
Explicit .dependsOn() edges were configured for the following source sets:
[jvmTest]

Consider removing dependsOn-calls or disabling the default template by adding
    'kotlin.mpp.applyDefaultHierarchyTemplate=false'
to your gradle.properties

Learn more about hierarchy templates: <https://kotl.in/hierarchy-template>

[Incubating] Problems report is available at: file:///Users/amandahinchman-dominguez/Documents/repositories/kotlin/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Cannot locate tasks that match ':compiler' as task 'compiler' is ambiguous in root project 'kotlin'. Candidates are: 'compilerPluginTest', 'compilerTest'.
d
Don't use
build
task for building the project, use
dist
. For running tests it's better to call the
:test
task of the specific module (
:plugins:compose-compiler-plugin:compiler-hosted:integration-tests:jvmTest
in your case). But the recommended way it to run test from the IDE, it will automatically pick the needed task for you.
🙏 1
a
Thanks! Will do, I'll use
dist
from now on. It's so nice to see how portable the compiler is now 🙂
d
WDYM?
a
~2 years ago, I could only run the Kotlin code for testing on an older mac system and couldn't run it on Sierra. I'll have to dig into my notes remember what the issue was with compatibility
I believe more setup was required back then to get tests running too - but now I just download fresh from github, run build and hit IDE test and it's good to go
d
Ah, got it Yeah, all dependent JDKs downloading was automated and probably some macos-specific stuff too
💯 1
a
It's awesome! The user experience difference is huge. It's cool that the Compose compiler plugin got moved to the kotlin repository too.
👌 1
Thanks again, I'll spend some time poking around and sure I'll come back with additional questions
👍 1