Skip to content

Integrate IntelliJ plugin into pnpm 🚀 #420

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jamthief
Copy link
Contributor

@jamthief jamthief commented Mar 21, 2025

Rehome IntelliJ extension in packages/intellij-extension, and integrate into pnpm 🚀

Also some misc fixups:

  • Don't define "until" IntelliJ version support (open ended for now)
  • Add Cypher language description
  • Add Cypher file template description

- Add language description
- Add file template description
- Make supported future versions open ended
Copy link

changeset-bot bot commented Mar 21, 2025

⚠️ No Changeset found

Latest commit: 5fce706

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jamthief jamthief changed the title IntelliJ plugin misc fixes Integrate IntelliJ plugin into turbo 🚀 Mar 21, 2025
@jamthief jamthief marked this pull request as draft March 21, 2025 16:49
@ncordon ncordon self-assigned this Mar 31, 2025
@jamthief jamthief marked this pull request as ready for review April 1, 2025 09:06
@jamthief jamthief force-pushed the intellij-misc-fixes branch from c491f45 to 115d7cb Compare April 2, 2025 08:37
@jamthief
Copy link
Contributor Author

jamthief commented Apr 2, 2025

The E2E check looks flaky, but I can't find a way to re-run it. Maybe I'm missing the permission?

Copy link
Collaborator

@ncordon ncordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why, I get this when I do npm run build:

2025-04-07 13:17:45,255 [   9534]   WARN - #c.i.k.a.KubernetesApiProvider - Cannot run program "kubectl": error=2, No such file or directory
com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "kubectl": error=2, No such file or directory
        at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:384)
        at com.intellij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:85)

What's Kubernetes used in the build exactly? Is it that sandbox we've added? It works after installing kubectl but not sure why it wasn't before.

In main executing the build of the plugin was working fine for me.

"license": "Apache-2.0",
"preview": true,
"scripts": {
"build": "./gradlew -q buildPlugin",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have this as:

if [[ \"$BUILD_INTELLIJ\" == \"true\" ]]; then ./gradlew -q buildPlugin; else echo 'Skipping Intellij build, set BUILD_INTELLIJ=true if that is not the desired behaviour'; fi

So this does not get executed for the people that work currently on the repo unless they specifically have that env variable set. The reason is we have 4 / 5 people that contribute regularly right now from the company, some of them using OSX, some using Windows, so I don't want to force them to install Kubernetes locally.

Copy link
Collaborator

@ncordon ncordon Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anderson4j can you try this works for you if we gated the code?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this skips and regular build works!

Copy link
Contributor Author

@jamthief jamthief Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ncordon I think I get your gist - although it needs a single equals sign to work: [[ \"$BUILD_INTELLIJ\" = \"true\" ]] - unfortunately though, this gets cached by turbo. So running it with a different value will just do the same thing over and over, even if you change the environment variable. I guess we could make a special build target instead?

However, in principle, I want to argue against doing this anyway. My reasoning is as follows:

  • The VS code extension and the IntelliJ plugin are both at identical positions in the build hierarchy: they are dependent on the language server build, and they are leaf node outputs. Running a generalised build at the top level should be the equivalent of something like make all; it should attempt to build everything by default.
  • If a developer has a workflow involving one or the other plugin, they should use the specialised build target
  • If running the whole build doesn't work in CI, this PR is incomplete
  • If we don't attempt to build it regularly, and fail the build when it also fails, then we won't know when we've broken it, and the plugin will become stale

@jamthief
Copy link
Contributor Author

@ncordon

I'm not sure why, I get this when I do npm run build:

2025-04-07 13:17:45,255 [   9534]   WARN - #c.i.k.a.KubernetesApiProvider - Cannot run program "kubectl": error=2, No such file or directory
com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "kubectl": error=2, No such file or directory
        at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:384)
        at com.intellij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:85)

What's Kubernetes used in the build exactly? Is it that sandbox we've added? It works after installing kubectl but not sure why it wasn't before.

In main executing the build of the plugin was working fine for me.

It's pretty gross, but also harmless. The build still passes. I see it too when I forcibly rename the kubectl binary to something else. Did you have kubectl installed before? I wonder if it thinks you have kubernetes support and so tries to run it.

@ncordon ncordon changed the title Integrate IntelliJ plugin into turbo 🚀 Integrate IntelliJ plugin into pnpm 🚀 May 21, 2025
@ncordon ncordon force-pushed the intellij-misc-fixes branch from b494217 to 5fce706 Compare May 21, 2025 13:36
@ncordon ncordon force-pushed the intellij-misc-fixes branch from 5fce706 to ee97dc2 Compare May 21, 2025 13:40
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

Successfully merging this pull request may close these issues.

3 participants