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

jbang edit --open=idea Test.kt doesn't work with IntelliJ 2022.3.3 #84

Open
kenyee opened this issue Mar 26, 2023 · 5 comments
Open

jbang edit --open=idea Test.kt doesn't work with IntelliJ 2022.3.3 #84

kenyee opened this issue Mar 26, 2023 · 5 comments

Comments

@kenyee
Copy link

kenyee commented Mar 26, 2023

This doesn't open the file for editing in IntelliJ 2022.3.3

Has anyone been able to get this plugin to work w/ the latest IntelliJ?

The new project wizard also doesn't show JBang as an option...and creating a new JBang script doesn't seem to work.

@kenyee
Copy link
Author

kenyee commented Mar 26, 2023

Also doesn't work with Java files FYI

@maxandersen
Copy link
Contributor

No synchronize jbang action visible ?

@kenyee
Copy link
Author

kenyee commented Mar 26, 2023

Screenshot 2023-03-26 at 8 44 39 AM

That tool window is available in IntelliJ so the JBang plugin is installed (0.24.1 if that matters)

@kenyee
Copy link
Author

kenyee commented Mar 26, 2023

Tried InteliJ CE 2023.3.3 (in case my version of Ultimate is the issue), then 2022.1.4, 2021.2.4.

The new project template shows up in 2021.2.4 (JBang template in new project dialog) but doesn't in the other versions I tested. I'd guess the 2022 IDEA platform broke it.
Also "shows up" doesn't mean it worked as expected...it created an empty project and didn't put anything in it...(it also didn't ask me for a Jbang template to put in the project).
An error did show up though:
"Could not execute [/Users/keny/.jbang/bin/jbang, template, list] with environment {NO_COLOR=true}. Error=2, No such file or directory"
I used sdkman to install jbang so jbang is actually at:
% which jbang
/Users/keny/.sdkman/candidates/jbang/current/bin/jbang

Hmm..that might be why because that directory seems pretty empty:
% ls ~/.jbang
cache implicit-catalog.json

Maybe the plugin doesn't understand where sdkman installs jbang? It just needs to detekt that sdkman folder or a way for us to specify the jbang binary folder:
% ls /Users/keny/.sdkman/candidates/jbang/current/
bin version.txt
% ls /Users/keny/.sdkman/candidates/jbang/current/bin
jbang jbang.cmd jbang.jar jbang.ps1

@kenyee
Copy link
Author

kenyee commented Mar 26, 2023

I uninstalled jbang from sdkman and used homebrew instead and it's in a different location:

% which jbang
/opt/homebrew/bin/jbang
% ls ~/.jbang/
cache			implicit-catalog.json

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

2 participants