Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Fix missing bazelWorkspaceRootDirectory at project reimport #33

Closed
beginningineer opened this issue Mar 10, 2020 · 3 comments · Fixed by #57
Closed

Fix missing bazelWorkspaceRootDirectory at project reimport #33

beginningineer opened this issue Mar 10, 2020 · 3 comments · Fixed by #57
Assignees
Labels
bug Something isn't working
Milestone

Comments

@beginningineer
Copy link
Contributor

Currently we getting next exception on file close/open cycle:
java.lang.IllegalStateException: Attempt to retrieve the classpath of a Bazel Java project prior to setting up the Bazel workspace.
at com.salesforce.b2eclipse.classpath.BazelClasspathContainer.getClasspathEntries(BazelClasspathContainer.java:120)

@beginningineer beginningineer added this to the Pilot milestone Mar 10, 2020
@beginningineer beginningineer added the bug Something isn't working label Mar 10, 2020
@beginningineer
Copy link
Contributor Author

#31 related
currently eclipse.jdt.ls deletes all projects while init phase. eventually it calls BazelClasspathContainer.getClasspathEntries for non-imported projects.
we have to skip project deletion or return empty classpath entries set

@beginningineer beginningineer removed this from the Pilot milestone Mar 17, 2020
@kkazakevich kkazakevich added this to the Phase 1 - MVP milestone Mar 18, 2020
@beginningineer
Copy link
Contributor Author

I believe we have to return an empty classpath set.
the bug occurred (eclipse-jdtls/eclipse.jdt.ls#1404 (comment)) during eclipse.jdt.ls start with disabled bazel importer as the project were previously imported and .classpath file refers to our BAZEL_CONTAINER

@beginningineer
Copy link
Contributor Author

after local discussion we concluded to save bazelWorkspaceRootDirectory to persistent preferences at the import phase and restore it when plugin is starting up

@beginningineer beginningineer changed the title Skipping "Bazel workspace project" import leads to bazelWorkspaceRootDirectory is not set. Fix missing bazelWorkspaceRootDirectory at project reimport Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants