Skip to content
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

Is this extension supported on Mac? #34

Open
blackbirdmango opened this issue Aug 23, 2022 · 10 comments
Open

Is this extension supported on Mac? #34

blackbirdmango opened this issue Aug 23, 2022 · 10 comments

Comments

@blackbirdmango
Copy link

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

@shadycuz
Copy link
Member

I will eventually need to update the extension, but the groovy.java.home doesn't work how you would expect it to.

The other confusing this is groovy.java.home is not asking for the path to the java binary 👎, it actually adds /bin/java to what ever groovy.java.home is pointing to. So if my java is /usr/bin/java and it was after installing with apt install default-jre. Then I need to set groovy.java.home: "/usr" to get it to work right 🙄 .

Have you tried not setting the groovy.java.home value? The auto-detection usually works.

@blackbirdmango
Copy link
Author

Hey, thanks for the quick reply, much appreciated. if I drop /bin the error goes away, and I get the thumbs up, but the intellisense is not kicking in. I restarted vs, but no luck.

@shadycuz
Copy link
Member

@blackbirdmango Have you saved the file? It has to be saved first =/

@blackbirdmango
Copy link
Author

Hi, yes I saved it.. Doesn't work

@shadycuz
Copy link
Member

Anything in the extension logs?

@shadycuz
Copy link
Member

@blackbirdmango Can you try the new version 0.6.0? Your extension should automatically update. The new version has better logging.

image

@blackbirdmango
Copy link
Author

Looks healthy, but still doesn't appear to work..
image

@shadycuz
Copy link
Member

shadycuz commented Sep 7, 2022

So what happens when you create a file like test.groovy (make sure to save it).

Then put this content in it:

  /**
   * Formats a bash script by adding the shebang,
   * setting the verbose level and sourcing bashrc.
   * @param userScript The bash script you want to run.
   * @param consoleOutput If you want the script results
   *                      to be printed out to console.
   * @param failFast If you want the script to stop on first
   *                 non zero exit code.
   * @return The userScript formatted for bash.
   */
  String formatScript(String userScript, Boolean consoleOutput=true, Boolean failFast=true) {
      return 'test'
  }

formatScript('testing')
    

make sure to save again. What happens when you hover your mouse over formatScript('testing')? Can you send a screenshot? Can you paste whats in the groovy language server logs?

@davnerson-dn
Copy link

davnerson-dn commented Dec 1, 2022

hi, im working on mac also and the intellisense does not work for me at all.
But the groovy lint works.
Screen Shot 2022-12-01 at 14 23 52

groovy language server console:

Dec 01, 2022 2:02:29 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTrace
Dec 01, 2022 2:02:29 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTrace
Dec 01, 2022 2:02:30 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTrace
Dec 01, 2022 2:02:30 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTrace
Dec 01, 2022 2:10:42 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 4
Dec 01, 2022 2:10:47 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 5
Dec 01, 2022 2:10:57 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 7
Dec 01, 2022 2:11:01 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 8
Dec 01, 2022 2:11:01 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 6
Dec 01, 2022 2:11:01 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 9
Dec 01, 2022 2:11:02 PM org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint notify
INFO: Unsupported notification method: $/setTrace
Dec 01, 2022 2:18:37 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 13
Dec 01, 2022 2:19:13 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 30
Dec 01, 2022 2:19:20 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 34
Dec 01, 2022 2:19:26 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 36
Dec 01, 2022 2:19:28 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 37
Dec 01, 2022 2:19:28 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 39
Dec 01, 2022 2:19:28 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 40
Dec 01, 2022 2:19:28 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 41
Dec 01, 2022 2:19:28 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 38
Dec 01, 2022 2:22:36 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 68
Dec 01, 2022 2:22:36 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 69

groovy-lint logs:

Start analyzing file:///Users/davnerson/repos/sandbox/test.groovy
Completed analyzing file:///Users/davnerson/repos/sandbox/test.groovy in 142 ms

@shadycuz
Copy link
Member

This is really strange and I'm not sure what the problem is. I will have to borrow a mac to debug.

In the function that starts the groovy language server it should print several debug lines. One of them is when it starts the language server.

progress.report({ message: INITIALIZING_MESSAGE });

The strange thing, is that message is not being printed, but the message at the end of the function is? The "extension is running" is some how being printed but not the other one.

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

No branches or pull requests

3 participants