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

Project workspace setup in eclipse_jdtls #34

Open
nassermohamedit opened this issue Dec 27, 2024 · 2 comments
Open

Project workspace setup in eclipse_jdtls #34

nassermohamedit opened this issue Dec 27, 2024 · 2 comments

Comments

@nassermohamedit
Copy link
Contributor

In the current implementation, the workspace directory for Eclipse JDTLS is generated using a random UUID for every invocation:

ws_dir = str(PurePath(
        MultilspySettings.get_language_server_directory(),
        "EclipseJDTLS",
        "workspaces",
        uuid.uuid4().hex,
    )
)

Two directories are created inside ws_dir:

data_dir = str(PurePath(ws_dir, "data_dir"))
dtls_config_path = str(PurePath(ws_dir, "config_path"))

Shouldn't workspace directories be consistent across invocations for the same project?

@nassermohamedit nassermohamedit changed the title Project workspace setup in eclipss_jdtls Project workspace setup in eclipse_jdtls Dec 27, 2024
@LakshyAAAgrawal
Copy link
Collaborator

This repository was created with AI4Code applications in mind, where often, when you are benchmarking on a particular codebase/repository, you want to start from a "clean"/"pristine" workspace dir, which is not impacted by any of the actions taken in the past on the repository workspace (for example, for Monitor-Guided Decoding, for which multilspy was built, the monitor would append and delete text within different files). Hence, I had decided to go with creating a new workspace directory for every invocation.

Having said that, I agree that it is much more useful (in general) to have a common workspace dir for the same project. I believe the right way to go to ensure both usecases can be satisfied is to let it be a config. The user can specify a custom workspace dir when invoking multilspy, and if it is None, then it creates a new workspace dir (as currently implemented).

Would you be able to create a PR for the same?

@nassermohamedit
Copy link
Contributor Author

Hello LakshyAAAgrawal
Thanks for the explanation. I'd be happy to work on that PR: make the workspace configurable, either by passing it as a config to the server factory or by inferring the workspace directory for the project if it already exists.

Can we make the launch command part of the config too. For now, a default command with default runtime dependencies is used to launch the server instance. We could make this part of the config and fall back to the default command if none is provided.

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