dontshavetheyak / groovy-guru Goto Github PK
View Code? Open in Web Editor NEWGroovy Intellisense for Visual Studio Code
Home Page: https://moonshine-ide.com/
License: Apache License 2.0
Groovy Intellisense for Visual Studio Code
Home Page: https://moonshine-ide.com/
License: Apache License 2.0
VSCode version: 1.64.1
Groovy-Guru version: v0.6.0
Issue:
IntelliSense errors due to second Jenkinsfile (in a differrent folder) in workspace.
Description:
I am working on two projects at the same time and it's convenient for me to keep them in one workspace (VSCode window), but extension cannot correctly recognize two folders inside workspace root as two separate subprojects, so I have the error above.
Example:
workspace/project1/Jenkinsfile
workspace/project2/Jenkinsfile
The error will be in the second Jenkinsfile, so Intellisense will not work.
Expect:
Some settings or solution so that the extension divides the IntelliSense into subprojects or namespaces.
I just downloaded this extension for VSCode and it fails to start.
My VSCode version:
Version: 1.58.2 (user setup)
Commit: c3f126316369cd610563c75b1b1725e0679adfb3
Date: 2021-07-14T22:10:15.214Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19041
The error that appeared in Output: Log (Window) sanitized
[2021-07-23 11:41:45.436] [renderer1] [error] Illegal argument: line must be non-negative: Error: Illegal argument: line must be non-negative
at Object.P [as illegalArgument] (c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:5:1232)
at new b (c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:77:15809)
at new b (c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:77:15222)
at R (c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:177776)
at C (c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:177849)
at K (c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:182143)
at c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:187550
at Array.map (<anonymous>)
at Object.asSymbolInformations (c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:187542)
at c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:113599
[2021-07-23 11:41:46.457] [renderer1] [error] Illegal argument: line must be non-negative: Error: Illegal argument: line must be non-negative
at Object.P [as illegalArgument] (c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:5:1232)
at new b (c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:77:15809)
at new b (c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:77:15222)
at R (c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:177776)
at C (c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:177849)
at K (c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:182143)
at c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:187550
at Array.map (<anonymous>)
at Object.asSymbolInformations (c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:187542)
at c:\Users\User\.vscode\extensions\dontshavetheyak.groovy-guru-0.1.2\build\extension.js:1:113599
I'm not really sure what else to include. Let me know if you need any other information.
I often have to restart the extension and when I do, I don't know if the extension is working again on not. It would be nice if the extension had a status bar like a lot of other extensions do.
Hello,
Curious if this extension is supported on a Mac M1. No matter what JDK path I put in "groovy.java.home" param of the settings file, I get the error: "The groovy.java.home setting does not point to a valid JDK".
Thanks in advance
Just a suggestion. I do this with the ShellCheck extension, and by doing so you would be able to remove the dependency on the file downloader and further interactions with the user about downloading the language server.
Awesome initiative btw!
VSCode Version: 1.71
Groovy-Guru Version: 0.6.0
Issue:
Additional * in tooltip comment
Text on new line is not reflected in the comment
Expect:
The comments beginning * should not be present in the tooltip comment
Text that is separated by a new line should be on a new line in the tooltip comment
Example Code:
class MyClass {
/**
* Test
* Newline
* @author test
*/
void test(String test) {
println('test' + test)
}
}
Replication:
I can replicate this issue 100% of the time after version 0.5.0
This issue doesn't seem to be present in 0.4.0 although the comments dont seem quite right in that version either since everything is in a nested bullet point list
I use Gradle in my project, and because of that, gradle generates some build output in a folder called bin
. The extension wrongly sees my source files as being defined there as well:
Invalid duplicate class definition of class com.company.internal.river.jenkinssharedlibrary.MBReportJobStart : The sources /local/home/user/repos/jenkins-shared-library/src/com/company/internal/river/jenkinssharedlibrary/MBReportJobStart.groovy and /local/home/user/repos/jenkins-shared-library/bin/main/com/company/internal/river/jenkinssharedlibrary/MBReportJobStart.groovy each contain a class with the name com.company.internal.river.jenkinssharedlibrary.MBReportJobStart.
@ line 11, column 1.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | vsce |
|
npm | vscode-test |
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)mocha
, @types/mocha
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
glob
, @types/glob
).devcontainer/Dockerfile
mcr.microsoft.com/vscode/devcontainers/typescript-node 0-16-bullseye
.devcontainer/base.Dockerfile
mcr.microsoft.com/vscode/devcontainers/javascript-node 0-16-bullseye
.github/workflows/pr_label.yml
jesusvasquez333/verify-pr-label-action v1.4.0
jesusvasquez333/verify-pr-label-action v1.4.0
.github/workflows/release.yml
actions/checkout v2.4.2
actions/setup-python v2.3.2
WyriHaximus/github-action-get-previous-tag v1
richardsimko/update-tag v1
release-drafter/release-drafter v5.15.0
release-drafter/release-drafter v5.15.0
actions/checkout v2.4.2
actions/setup-java v2
actions/setup-node v2
svenstaro/upload-release-action v2
svenstaro/upload-release-action v2
.github/workflows/test.yml
actions/checkout v2.4.2
actions/setup-java v2
actions/setup-node v2
package.json
vscode-languageclient 7.0.0
@types/glob 7.1.4
@types/mocha 8.2.3
@types/node 14.18.26
@types/vscode 1.59.0
@typescript-eslint/eslint-plugin 4.29.1
@typescript-eslint/parser 4.29.1
eslint 7.32.0
glob 7.1.7
mocha 8.4.0
ovsx 0.3.0
pre-commit 1.2.2
ts-loader 9.2.5
typescript 4.3.5
vsce 1.96.1
vscode-test 1.6.1
webpack 5.49.0
webpack-cli 4.7.2
vscode ^1.59.0
.scripts/requirements.txt
requests ==2.25.1
semver ==2.13.0
Good work so far, this extension looks promising.
But, I have a maven Groovy project (Jenkins shared library) and there are around 14000 files in the maven repo cache with direct and indirect dependencies of various versions of Jenkins and their plugins. It would be nice if adding every JAR file would not be required and the extension would detect maven and use its repo cache and searched it for the required JARs.
Right now I am facing many java.lang.NoClassDefFoundError or squiggly lines everywhere. All in all I think it's around 10-50 JARs, but it's cumbersome to adjust the list in extension settings as soon as a dependency tree changes versions.
When selecting Go to Definition
on a @Field
definition for a Jenkinsfile
it fails with:
Cannot read properties of undefined (reading 'with')
This should be a minimal example, if you select MYFIELD
use.
import groovy.transform.Field
@Field final MYFIELD = 'SomeValue'
def variable = 'otherValue'
if (variable == MYFIELD) {
echo 'Value matches.'
}
At startup, the server does not move from the message "Groovy-guru is starting".
No intellisense works on the groovy code source.
I cannot get the language server to start. The message I get is simply "Internal Error" The Output from Language Server is empty, the thumb is down, and I cannot get any other information.
I'm in a bit of a different scenario with my environment - I run VSCode on a windows-based desktop, but I use remoteSSH to an Ubuntu 20.08 Server host that is on my network, which is where I do all of my work.
Java is installed on both host and guest, and I've tried the path for both Windows and Ubuntu installs, and I get the same result.
What really gets me is that, despite adding the logging: verbose option that I saw in another issue thread, the output is still completely blank.
Anything else I could be missing?
I just noticed every time the language server starts, the extension is re-downloaded. We should check if the binary exists locally and if it does reuse it.
When using this extension with FileSystemAPI/-Provider workspaces IntelliSense is not working.
This can be reproduced f. e. by using the WSL Extension by Microsoft and creating and opening a groovy file inside of this workspace.
Could this be fixed or is this similar to Issue #16 ?
Might there be workarounds?
Hi can you push your extension to https://open-vsx.org/ in addition to VSCode Market Place so people using the FLOSS version could install it too?
I wrote an article on the subject.
Example of Github Action: https://github.com/HaaLeo/publish-vscode-extension
Groovy LSP starts correctly on Windows.
The extension successfully downloads groovy-language-server-X.X.X-all.jar
(in my case at C:\Users\Admin\AppData\Roaming\Code\User\globalStorage\dontshavetheyak.groovy-guru\file-downloader-downloads\groovy-language-server-0.1.1-all.jar
). However, it does not find it:
Groovy Language Server output:
Error: Unable to access jarfile /c:/Users/Admin/AppData/Roaming/Code/User/globalStorage/dontshavetheyak.groovy-guru/file-downloader-downloads/groovy-language-server-0.1.1-all.jar
[Info - 22:20:45] Connection to server got closed. Server will restart.
[Error - 22:20:45] Connection to server is erroring. Shutting down server.
Error: Unable to access jarfile /c:/Users/Admin/AppData/Roaming/Code/User/globalStorage/dontshavetheyak.groovy-guru/file-downloader-downloads/groovy-language-server-0.1.1-all.jar
.groovy
file on WindowsThere is an extra /
at the begining of the path being resolved: /c:/Users/Admin/AppData/Roaming/Code/User/globalStorage/dontshavetheyak.groovy-guru/file-downloader-downloads/groovy-language-server-0.1.1-all.jar
.
In Groovy Language Server Output I see error. Which openjdk version I should install on my machine?
Jul 02, 2024 4:59:31 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleNotification
WARNING: Notification threw an exception: {
"jsonrpc": "2.0",
"method": "workspace/didChangeConfiguration",
"params": {
"settings": {
"groovy": {
"java": {}
}
}
}
}
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:194)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
... 11 more
Caused by: java.lang.IllegalArgumentException: Property must not be null: start
at org.eclipse.lsp4j.util.Preconditions.checkNotNull(Preconditions.java:29)
at org.eclipse.lsp4j.Range.<init>(Range.java:41)
at net.prominic.groovyls.util.GroovyLanguageServerUtils.syntaxExceptionToRange(GroovyLanguageServerUtils.java:69)
at net.prominic.groovyls.GroovyServices.lambda$handleErrorCollector$4(GroovyServices.java:491)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485)
at net.prominic.groovyls.GroovyServices.handleErrorCollector(GroovyServices.java:488)
at net.prominic.groovyls.GroovyServices.compile(GroovyServices.java:478)
at net.prominic.groovyls.GroovyServices.updateClasspath(GroovyServices.java:205)
at net.prominic.groovyls.GroovyServices.didChangeConfiguration(GroovyServices.java:185)
... 16 more
Jul 02, 2024 4:59:48 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 3
Hi,
I tried many times but the code suggestion didn't appear when I type.
I tried exactly the same as your demo on the main page, but it doesn't work.
The language server run and took over 800MB of RAM.
I download and set the lib path to groovy SDK lib, but it still doesn't work.
Did I miss something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.