-
Notifications
You must be signed in to change notification settings - Fork 174
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
Allow optional source directory to be added into project classpath #1196
Labels
Comments
jdneo
added a commit
to jdneo/protobuf-gradle-plugin
that referenced
this issue
Aug 11, 2022
- add the generated source folders to Eclipse classpath entries. Due to a limition of Buildship, we have to create those folders beforehand, see: eclipse-buildship/buildship#1196 Signed-off-by: sheche <[email protected]>
This was referenced Aug 11, 2022
Closed
jdneo
added a commit
to jdneo/eclipse.jdt.ls
that referenced
this issue
Aug 15, 2022
A Gradle init script is added as a patch to automatically add Protobuf output source directories to clsspath. The script works for Gradle 'com.google.protobuf' plugin 0.8.4 or higher. As a side effect, the Protobuf output source directories will be created beforehand, due to an issue of Buildship. See: eclipse-buildship/buildship#1196. Signed-off-by: sheche <[email protected]>
jdneo
added a commit
to jdneo/eclipse.jdt.ls
that referenced
this issue
Aug 16, 2022
A Gradle init script is added as a patch to automatically add Protobuf output source directories to clsspath. The script works for Gradle 'com.google.protobuf' plugin 0.8.4 or higher. The init script will be extracted as a sibling file of the bundle jars. As a side effect, the Protobuf output source directories will be created beforehand, due to an issue of Buildship. See: eclipse-buildship/buildship#1196. Signed-off-by: sheche <[email protected]>
jdneo
added a commit
to jdneo/eclipse.jdt.ls
that referenced
this issue
Aug 16, 2022
A Gradle init script is added as a patch to automatically add Protobuf output source directories to clsspath. The script works for Gradle 'com.google.protobuf' plugin 0.8.4 or higher. The init script will be extracted as a sibling file of the bundle jars. As a side effect, the Protobuf output source directories will be created beforehand, due to an issue of Buildship. See: eclipse-buildship/buildship#1196. Signed-off-by: sheche <[email protected]>
rougsig
pushed a commit
to rougsig/protobuf-gradle-plugin
that referenced
this issue
Aug 21, 2022
- add the generated source folders to Eclipse classpath entries. Due to a limition of Buildship, we have to create those folders beforehand, see: eclipse-buildship/buildship#1196 Signed-off-by: sheche <[email protected]>
jdneo
added a commit
to jdneo/eclipse.jdt.ls
that referenced
this issue
Aug 22, 2022
A Gradle init script is added as a patch to automatically add Protobuf output source directories to classpath. The script works for Gradle 'com.google.protobuf' plugin 0.8.4 or higher. The init script will be extracted to a cache folder. As a side effect, the Protobuf output source directories will be created beforehand, due to an issue of Buildship. See: eclipse-buildship/buildship#1196. Signed-off-by: sheche <[email protected]>
jdneo
added a commit
to eclipse-jdtls/eclipse.jdt.ls
that referenced
this issue
Aug 22, 2022
) A Gradle init script is added as a patch to automatically add Protobuf output source directories to classpath. The script works for Gradle 'com.google.protobuf' plugin 0.8.4 or higher. The init script will be extracted to a cache folder. As a side effect, the Protobuf output source directories will be created beforehand, due to an issue of Buildship. See: eclipse-buildship/buildship#1196. Signed-off-by: sheche <[email protected]>
rougsig
pushed a commit
to rougsig/protobuf-gradle-plugin
that referenced
this issue
Aug 29, 2022
- add the generated source folders to Eclipse classpath entries. Due to a limition of Buildship, we have to create those folders beforehand, see: eclipse-buildship/buildship#1196 Signed-off-by: sheche <[email protected]>
rougsig
pushed a commit
to rougsig/protobuf-gradle-plugin
that referenced
this issue
Aug 29, 2022
- add the generated source folders to Eclipse classpath entries. Due to a limition of Buildship, we have to create those folders beforehand, see: eclipse-buildship/buildship#1196 Signed-off-by: sheche <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
Allow to add optional source folder classpath entry even the folder does not exist on disk.
Current Behavior
folder that does not exist on disk will be ignored.
Context
Currently, in https://github.com/eclipse/buildship/blob/35d01caad3ab023fdd9fdf4a1b9e9c738bff7fd0/org.eclipse.buildship.core/src/main/java/org/eclipse/buildship/core/internal/workspace/SourceFolderUpdater.java#L138
The source folder entry will be ignored if it does not exist.
There is one exception when the source folder has the optional attribute:
In JDT, optional classpath entry is allowed to be not existed - if I understood the JDT code correctly:
https://github.com/eclipse-jdt/eclipse.jdt.core/blob/f71a39afb62a1436cd094f6274ad9a91b96484f7/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClasspathEntry.java#L2219-L2224
Steps to Reproduce
Try to add a non-exist source folder to classpath, sth like:
More information
Another example is m2e, for example, if we import the spring-petclinic as a Maven project, m2e will generate classpath entries like:
while that generated folder does not exist on disk until build.
The text was updated successfully, but these errors were encountered: