openshift / jenkins-plugin

Apache License 2.0
81 stars 50 forks source link

Resulting GDSL is Broken #163

Closed sherl0cks closed 6 years ago

sherl0cks commented 6 years ago

If you follow the steps to create groovy syntax support for Jenkinsfile, the description from the OpenShift plugin breaks the syntax support, as seen bellow. Sources of the errors are the below methods:

method(name: 'openshiftDeleteResourceByJsonYaml', type: 'Object', params: [jsonyaml:'java.lang.String'], doc: 'Delete OpenShift Resource(s) from JSON\/YAML')

method(name: 'openshiftDeleteResourceByJsonYaml', type: 'Object', namedParams: [parameter(name: 'jsonyaml', type: 'java.lang.String'), parameter(name: 'apiURL', type: 'java.lang.String'), parameter(name: 'authToken', type: 'java.lang.String'), parameter(name: 'namespace', type: 'java.lang.String'), parameter(name: 'verbose', type: 'java.lang.String'), ], doc: 'Delete OpenShift Resource(s) from JSON\/YAML')

I'm using: IntelliJ IDEA 2017.2.5 Build #IC-172.4343.14, built on September 26, 2017 JRE: 1.8.0_152-release-915-b12 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.14.11-300.fc27.x86_64

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Jenkinsfilegdsl: 109: unexpected char: '\' @ line 109, column 158.
   penShift Resource(s) from JSON\/YAML')
                                 ^

1 error

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
    at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:150)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:120)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:132)
    at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:360)
    at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:140)
    at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:111)
    at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:237)
    at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:167)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
    at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:736)
    at org.jetbrains.plugins.groovy.dsl.GroovyDslExecutor.createAndRunExecutor(GroovyDslExecutor.groovy:81)
    at org.jetbrains.plugins.groovy.dsl.GroovyDslFileIndex.createExecutor(GroovyDslFileIndex.java:475)
    at org.jetbrains.plugins.groovy.dsl.GroovyDslFileIndex.lambda$scheduleParsing$3(GroovyDslFileIndex.java:437)
    at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
gabemontero commented 6 years ago

heh ... never heard of that feature ... thanks for the heads up @sherl0cks

sherl0cks commented 6 years ago

It's useful but has its limitations. Better than nothing