Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Exception when using Kotlin EAP #321

Closed
NikkyAI opened this issue Dec 21, 2018 · 8 comments
Closed

Exception when using Kotlin EAP #321

NikkyAI opened this issue Dec 21, 2018 · 8 comments

Comments

@NikkyAI
Copy link

NikkyAI commented Dec 21, 2018

using Kotlin 1.3.20 EAP 2 or 1.3.20-eap-52 it fails like this

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':fuel:lintKotlinMain'.
> LONG_STRING_TEMPLATE_ENTRY

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':fuel:lintKotlinMain'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
	at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
	at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.NoSuchFieldError: LONG_STRING_TEMPLATE_ENTRY
	at com.github.shyiko.ktlint.ruleset.standard.StringTemplateRule.visit(StringTemplateRule.kt:29)
	at com.github.shyiko.ktlint.core.KtLint$lint$1.invoke(KtLint.kt:156)
	at com.github.shyiko.ktlint.core.KtLint$lint$1.invoke(KtLint.kt:36)
	at com.github.shyiko.ktlint.core.KtLint$visitor$2$1.invoke(KtLint.kt:201)
	at com.github.shyiko.ktlint.core.KtLint$visitor$2$1.invoke(KtLint.kt:36)
	at com.github.shyiko.ktlint.core.KtLint.visit(KtLint.kt:502)
	at com.github.shyiko.ktlint.core.KtLint.access$visit(KtLint.kt:36)
	at com.github.shyiko.ktlint.core.KtLint$visitor$2.invoke(KtLint.kt:199)
	at com.github.shyiko.ktlint.core.KtLint$visitor$2.invoke(KtLint.kt:36)
	at com.github.shyiko.ktlint.core.KtLint.lint(KtLint.kt:151)
	at com.github.shyiko.ktlint.core.KtLint.lint(KtLint.kt:106)
	at org.jmailen.gradle.kotlinter.tasks.LintTask.lintKt(LintTask.kt:88)
	at org.jmailen.gradle.kotlinter.tasks.LintTask.access$lintKt(LintTask.kt:24)
	at org.jmailen.gradle.kotlinter.tasks.LintTask$run$2$lintFunc$1.invoke(LintTask.kt:61)
	at org.jmailen.gradle.kotlinter.tasks.LintTask$run$2$lintFunc$1.invoke(LintTask.kt:24)
	at org.jmailen.gradle.kotlinter.tasks.LintTask.run(LintTask.kt:69)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:801)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:768)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
	... 31 more

also reported here: jeremymailen/kotlinter-gradle#80

@michaelbull
Copy link

Kotlin 1.3.20 is now released and this issue is still present.

@tasomaniac
Copy link
Contributor

Any possible workaround for this? I don't really understand what's going on here. 😊

@autonomousapps
Copy link

@tasomaniac stop linting? :D

@NikkyAI
Copy link
Author

NikkyAI commented Jan 31, 2019

fixed in 2fa9b74, thanks

@NikkyAI NikkyAI closed this as completed Jan 31, 2019
@scottkennedy
Copy link

Everything was working fine for me with ktlint 0.29.0 and Kotlin 1.3.20, but now that I've updated to 0.30.0, I'm seeing this exception.

@tasomaniac
Copy link
Contributor

tasomaniac commented Feb 4, 2019

Don't think it is fixed. Here is a reproducible branch:

Branch with KtLint 0.30.0 and Kotlin 1.3.20: tasomaniac/OpenLinkWith@4e67a03
Build console: https://travis-ci.org/tasomaniac/OpenLinkWith/builds/488672843#L692

@autonomousapps
Copy link

The update works for me (I use this via Kotlinter).

@tasomaniac
Copy link
Contributor

tasomaniac commented Feb 4, 2019

I use ktlint-gradle. For some reason putting version = '0.30.0' just like in the docs didn't work :( I resolved it via resolutionStrategy in root build.gradle. All working fine now.

subprojects {
    configurations.all {
        resolutionStrategy.force 'com.github.shyiko:ktlint:0.30.0'
    }
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants