Skip to content

Conversation

@cloud-fan
Copy link
Contributor

Cursor/VS Code is well supported now after apache/spark#53621 . This PR introduces the steps to use Cursor/VS Code.

@cloud-fan
Copy link
Contributor Author

cc @yaooqinn @HyukjinKwon @pan3793

Copy link
Member

@pan3793 pan3793 left a comment

Choose a reason for hiding this comment

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

Having never experienced VS Code for Scala/Java projects previously, I have successfully used VS Code to import the Spark project by following the instructions, and confirmed that basic functionalities like code jump work as expected.

- *Confirm Build Server*: Metals defaults to using Bloop as the build server. Do not change this setting, as Bloop provides the fastest compilation and best integration for local development. Open the Command Palette (Cmd+Shift+P or Ctrl+Shift+P), run `Metals: Run doctor`, and verify the status dashboard. Ensure it shows: `Build definition is coming from sbt` and `Build server currently being used is Bloop`.

If you encounter compilation errors or the IDE fails to recognize symbols, follow these steps to perform a clean import:
1. *Stop Bloop Server*: Run the following command in your terminal to stop the bloop server: `pkill -f "bloop.BloopServer"`. If you have installed bloop CLI you can run `bloop exit` instead.
Copy link
Member

Choose a reason for hiding this comment

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

Is this equivalent to Metals: Restart server?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

metals server is different from bloop server.


If you encounter compilation errors or the IDE fails to recognize symbols, follow these steps to perform a clean import:
1. *Stop Bloop Server*: Run the following command in your terminal to stop the bloop server: `pkill -f "bloop.BloopServer"`. If you have installed bloop CLI you can run `bloop exit` instead.
2. *Clean Workspace*: Run the following command in your terminal to remove cached build metadata: `rm -rf .bloop/ .metals/ .bsp/`.
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to rm ./project/.bloop too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't remove it and there is no issue. I checked a bit and this .bloop is only for building the sbt build definition, which is simply the SparkBuild.scala. It's unlikely to cause issues.

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