-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Kotlinc not found #233
Comments
Hi @vchernyshov thanks for this issue! |
@gianluz here my install script:
Next I'm installing the plugin:
And running danger:
And here the output:
|
The command Other thing you can do to see more logs that might help us to catch the problem is to add the debug flag like that:
|
@gianluz I have tried |
from your logs i can also see you are exporting the kotlin path but not kotlinc path |
@gianluz I have changed the command and got this: |
@gianluz I have manage to force danger and got this results:
|
seems like the problem is whiles running the step cannot find you may want to try by adding the kotlinc path similarly to what you are doing with the kotlin home:
or install kotlinc explicitly before danger-kotlin? |
@gianluz will try, but not sure that it could help. Have you tried to run danger kotlin with plugins on Ubuntu 20.04? |
@gianluz is it possible to add plugin to docker image that you have for danger kotlin and run all under the docker? or the issues will be the same? |
Is worth a try I think, you should be able to pull the working docker image and run danger from there, if works is also better than installing every time and should be faster as well |
Yes but on bitrise and i haven't seen any issues.. Teamcity I've never tried before |
I have the same issue on GitHub Actions. My Dangerfile.df.kts import systems.danger.kotlin.danger
import systems.danger.kotlin.onGitHub
import systems.danger.kotlin.pullRequest
import systems.danger.kotlin.warn
danger(args) {
onGitHub {
// Big PR Check
if ((pullRequest.additions ?: 0) - (pullRequest.deletions ?: 0) > 300) {
warn("Big PR, try to keep changes smaller if you can")
}
}
} My ci.yaml danger:
name: Danger
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- uses: fwilhe2/setup-kotlin@main
- name: Danger
uses: danger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} And the error I get is: | Executing $(which danger) ci --process danger-kotlin --passURLForDSL - pid 1
| Executing kotlinc -script-templates systems.danger.kts.DangerFileScript -cp /usr/local/lib/danger/danger-kotlin.jar -script Dangerfile.df.kts /tmp/danger-dsl.json danger_out.json - pid 23
|
| Uncaught Kotlin exception: kotlin.Exception: Command kotlinc -script-templates systems.danger.kts.DangerFileScript -cp /usr/local/lib/danger/danger-kotlin.jar -script Dangerfile.df.kts /tmp/danger-dsl.json danger_out.json exited with code 32512
| at 0 danger-kotlin 0x418785 kfun:systems.danger.cmd.Cmd.exec#internal + 1221
| at 1 danger-kotlin 0x4191e5 kfun:systems.danger.cmd.dangerfile.DangerFile#execute(kotlin.String;kotlin.String){} + 1189
| at 2 danger-kotlin 0x417ef4 kfun:systems.danger.DangerKotlin#run(){} + 2068
| at 3 danger-kotlin 0x41748c kfun:#main(kotlin.Array<kotlin.String>){} + 2700
| at 4 danger-kotlin 0x4231a3 Init_and_run_start + 1811
| at 5 danger-kotlin 0x4232da main + 10
| at 6 libc.so.6 0x7fd68c288d8f 0x0 + 140559451196815
| at 7 libc.so.6 0x7fd68c288e3f __libc_start_main + 127
| at 8 danger-kotlin 0x405080 0x0 + 4214912
|
| sh: 1: kotlinc: not found
|
| Error: Error: Got no results back from the Dangerfile evaluation, this is likely an issue with a custom sub-process exiting early.
| at Executor.<anonymous> (/usr/lib/node_modules/danger/distribution/runner/Executor.js:152:35)
| at step (/usr/lib/node_modules/danger/distribution/runner/Executor.js:33:23)
| at Object.next (/usr/lib/node_modules/danger/distribution/runner/Executor.js:14:53)
| at /usr/lib/node_modules/danger/distribution/runner/Executor.js:8:71
| at new Promise (<anonymous>)
| at __awaiter (/usr/lib/node_modules/danger/distribution/runner/Executor.js:4:12)
| at Executor.handleResults (/usr/lib/node_modules/danger/distribution/runner/Executor.js:146:16)
| at /usr/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:172:47
| at step (/usr/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:44:23)
| at Object.next (/usr/lib/node_modules/danger/distribution/commands/utils/runDangerSubprocess.js:25:53)
| Uncaught Kotlin exception: kotlin.Exception: Command $(which danger) ci --process danger-kotlin --passURLForDSL exited with code 256
| at 0 danger-kotlin 0x418785 kfun:systems.danger.cmd.Cmd.exec#internal + 1221
| at 1 danger-kotlin 0x419fd8 kfun:systems.danger.cmd.dangerjs.DangerJS#process(systems.danger.cmd.Command;kotlin.String;kotlin.collections.List<kotlin.String>){} + 1336
| at 2 danger-kotlin 0x4170c6 kfun:#main(kotlin.Array<kotlin.String>){} + 1734
| at 3 danger-kotlin 0x4231a3 Init_and_run_start + 1811
| at 4 danger-kotlin 0x4232da main + 10
| at 5 libc.so.6 0x7ff1924dbd8f 0x0 + 140675518414223
| at 6 libc.so.6 0x7ff1924dbe3f __libc_start_main + 127
| at 7 danger-kotlin 0x405080 0x0 + 4214912 Any guidance would be greatly appreciated 😊 |
@dunyakirkali did you have any chance to resolve this issue? Have pretty much the same
CI: Teamcity |
definitely something is not going right with the dependencies, please try to install manually the kotlin compiler before installing danger kotlin in your CI
|
Hi, getting the error when running Danger Kotlin on TeamCity CI:
sh: 1: kotlinc: not found
But kotlinc is installed at:
/usr/local/kotlinc/bin/kotlinc
Do you happen to know how to solve this?
The text was updated successfully, but these errors were encountered: