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

Allow Buildship to separate runtime classpath based on source set information #3209

Merged
merged 10 commits into from Oct 19, 2017

Conversation

donat
Copy link
Member

@donat donat commented Oct 17, 2017

This pull request contains all changes required for eclipse/buildship#354:

  • Source folders use separate output locations
  • Each source folder and dependency define scope information

@donat donat requested a review from oehme October 17, 2017 00:57
@donat donat changed the title Donat/ide/eclipse cp separation Allow Buildship to separate classpath based on source set information Oct 17, 2017
@donat donat changed the title Allow Buildship to separate classpath based on source set information Allow Buildship to separate runtime classpath based on source set information Oct 17, 2017
@donat
Copy link
Member Author

donat commented Oct 17, 2017

I'm working on the performance test failures.

Copy link
Contributor

@oehme oehme left a comment

Choose a reason for hiding this comment

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

The release notes need an update, otherwise this looks good.

@@ -28,6 +28,10 @@ Gradle now suppoprts version range in parent elements of POM, which was introduc
IMPORTANT: if this is a patch release, ensure that a prominent link is included in the foreword to all releases of the same minor stream.
Add-->

### Eclipse plugin separates output folders

The `eclipse` plugin now defines separate output directories for each source folders. Also, each source folder and dependency defines an additional `gradle_source_sets` classpath attribute. The attribute specifies to which sourceSet the entry belonged. Future [Buildship](http://eclipse.org/buildship) versions will use this information to separate source sets when launching Java applications within Eclipse.
Copy link
Contributor

Choose a reason for hiding this comment

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

⭕️ folder

@@ -28,6 +28,10 @@ Gradle now suppoprts version range in parent elements of POM, which was introduc
IMPORTANT: if this is a patch release, ensure that a prominent link is included in the foreword to all releases of the same minor stream.
Add-->

### Eclipse plugin separates output folders

The `eclipse` plugin now defines separate output directories for each source folders. Also, each source folder and dependency defines an additional `gradle_source_sets` classpath attribute. The attribute specifies to which sourceSet the entry belonged. Future [Buildship](http://eclipse.org/buildship) versions will use this information to separate source sets when launching Java applications within Eclipse.
Copy link
Contributor

Choose a reason for hiding this comment

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

❌ This section is outdated. It does not reflect the actual implementation. How about not going into this detail at all and just explaining what it does? I had a draft of that on my branch.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the text from your branch.

@donat donat force-pushed the donat/ide/eclipse-cp-separation branch from 92e1eaa to da9213f Compare October 18, 2017 02:53
donat and others added 10 commits October 19, 2017 09:38
Eclipse source folders each have a scope assigned to them. This
is currently the name of the SourceSet, but might evolve later
to be the name of the component instead. The exact value is an
implementation detail.

However, we also need to track all the scopes that *use* that
source folder, so its output can be included when running
applications and tests in Eclipse. The output folder is not
explicitly modeled in the .classpath file, but instead implicitly
belongs to the source folder.
When calculating the linked resources, there's no need to set all
attributes for the source directories because only the name and the
location is used by LinkedResourcesCreator.
The source folder calculation is an expensive operation, yet it was
called multiple times inside SourceFolderCreator.createSourceFolders()
method.
@donat donat force-pushed the donat/ide/eclipse-cp-separation branch from 94cfc53 to c052c18 Compare October 19, 2017 01:39
@donat donat merged commit 2db9545 into master Oct 19, 2017
@donat donat deleted the donat/ide/eclipse-cp-separation branch October 19, 2017 03:48
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.

None yet

3 participants