-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add multiple folders to src path #412
Comments
Currently the Java Language Server does not support Bazel. By doing I'm actually curious if that really works for your Bazel project? |
It is a hack for sure but it does seems to work. Agreed we are setting this up as a no build tool project.
We basically use the dependency glob setting to find the maven jars in the external directory under bazel-{source}. That works well.
The annoying part is you have to right click on each src folder to add it to the Java path source.
So if I had two projects, I would need to add 4 folders:
./project1/src/main/java
./project1/src/teat/java
./project2/src/main/java
./project2/src/teat/java
One would already be there, so 3 folders to right click on and add.
We verified this in the auto generated .classpath file each src path was added.
Once you add in all src paths, things work in the IDE.
It is not as seemless as using maven, for sure.
…-- Yezdaan
On Dec 10, 2020, at 9:14 PM, Sheng Chen <[email protected]> wrote:
Currently the Java Language Server does not support Bazel. By doing right-click on another folder and add it to the java source path. It's actually treat the project as a no build tool project.
I'm actually curious if that really works for your Bazel project?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-java-dependency%2Fissues%2F412%23issuecomment-742938204&data=04%7C01%7C%7Cba3bf9d399184ba054a408d89d82ec62%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637432532912905725%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4mhJWqpjpYg7xGYZtwCQAkL%2FNmFia22iESaNFnB%2FyJQ%3D&reserved=0>, or unsubscribe<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABIWIF3BLPS6UZPYWMBG4BDSUGFCVANCNFSM4UVMAG3A&data=04%7C01%7C%7Cba3bf9d399184ba054a408d89d82ec62%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637432532912905725%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=M%2BUsDWhnzrD3nNqanzPKpdV9PzqM%2BAk%2FcUAexywX4qI%3D&reserved=0>.
|
The team is now thinking about the classpath management experience(source path, jdk, dependencies) as a whole big feature. The rough idea is users can manage the classpath in a webview. I'll update if we have anything new. |
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further. |
The upstream issue has been fixed. In the next version, you should be able to use the setting |
Can we define the output folder correspnding to each source path ? |
We are trying to make this work with a Bazel mono-repo and are wondering if there is a programmatic way to add multiple src folders to the .classpath file?
Right now it seems to add the first src/main/java folder if finds to the .classpath file and then stops. If you right-click on another folder and add it to the java source path that works fine.
For example:
It would be nice to have a config like this:
For example, this shell script exports the desired src folders.
SRC_PATHS=$(find . -type d -path '*/src/main/java' -o -path '*/src/test/java')
Hopefully, there is another, simpler way to do this.
The text was updated successfully, but these errors were encountered: