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
Refresh for compat with IJ 2020+ #15
Conversation
for both openjdk11 and openjdk14
O.o this is a big update. Unfortunately, I'm not qualified to give a good PR review :( |
That's fine, note that 99% of the changes is deleting files under if you run it locally, with the old files in there, you will see that they are pretty much the same, except the Jetbrain plugin now generates stub implementation classes for each Interface generated. No worries anyway, the review can wait for someone to have a bit of time 👍 |
90a9126
to
ea2c5c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Also I never build a intellij plugin myself (mostly android stuff).
cc @mrVanDalo for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to have a nix plugin for jetbrains
no testing, and probably won't have time to do a proper review til after 20.09 is released
Hi, this seems very cool! I wanted to try it out on NixOS, but the
The issue seems to be quite trivial: the Gradle task downloaded a JRE that doesn't work on NixOS because it isn't patched, e.g., the interpreter is set to I came up with a very brittle solution that seems to work (IDEA launches successfuly): # Remove the downloaded JRE directory
$ rm -rf /home/julius/.gradle/caches/modules-2/files-2.1/com.jetbrains/jbre/jbr-11_0_6-linux-x64-b765.25
# Symlink the same directory to a patched JetBrains JDK from nixpkgs
$ ln -s $(nix-build '<nixpkgs>' -A jetbrains.jdk)/lib/openjdk /home/julius/.gradle/caches/modules-2/files-2.1/com.jetbrains/jbre/jbr-11_0_6-linux-x64-b765.25
# Run the previously failing task
$ ./gradlew runIde Perhaps this could be improved so that people running NixOS would have better experience contributing to the project. Maybe it's possible to bypass downloading the JRE by specifying a local path in |
@jul1u5 were you able to test the plugin? When worst comes to worst, one could also use fhsuservenv: https://gist.github.com/Mic92/b59054188c595e5652cacf50485583e0 to make the jetbrains build working. |
@Mic92 Hi, the syntax highlighting and error reporting seemed to work fine. However, I didn't know how to test the linting, profile management and template features that are mentioned in the README. I was thinking, that maybe the development environment for NixOS could be implemented in another PR after this one is merged. For now we could just add the fhsuserenv file that you linked, or at least mention it in the README. |
If at least syntax highlight works, we should also publish a new version as I suspect in the current state no one can use it in idea with newer versions. |
Ah yeah, I didn't try the "runIde" task, only focused on the "build" one, since that generates the zip-packaged plugin. It's only a matter of adding a GitHub action for example replicating travis and artifacting it as a release I suppose. Can do it, or let it for others to figure out ; I'm not familiar how publication to the Jetbrains marketplace happens however, and I'm not sure the project is set up to allow individuals to try that out either? |
Maybe @edwtjo has more insights into the jetbrain marketplace. However github actions for uploading stuff on github tags should be a good starter. |
@Tristan971 Are you working on a release job? Otherwiese, I could also take a look. My experiance with GitHub Actions is limited but uploading an artifact when certain tags are pushed sounds easy enough. |
Hi @JojOatXGME, unfortunately I don't quite have the time to work on it right now, so by all means go ahead with that 🙇 |
I created pull request #16 about a release job. |
Hi,
Am getting into Nix, and I do love my IJ so I thought it'd be cool to get this plugin refreshed (and later on improved upon).
So this is a first PR related to refreshing the project structure, which, thanks to Jetbrains making quite a few leaps in plugin development QoL, wasn't too difficult.
With this I'm able to
gradle build
the project which yields a usable plugin package atbuild/distributions/NixIDEA-<version>.zip
. No idea how to wire automatic update to the marketplace however, so keep it manual as it was before for now.Let me know your thoughts and apologies for the out-of-nowhere PR.
Cheers
Note: I'm no fan of Gradle personally, but alas it's the route Jetbrains has chosen for plugins, and it does allow almost all the Lexer/Parser setup and plugin packaging to be trivialized, so we might as well embrace the recommended way (from: https://github.com/JetBrains/intellij-platform-plugin-template )