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

Include all sources by default in eclipse-sdk target #2777

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HannesWell
Copy link
Member

No description provided.

@merks
Copy link
Contributor

merks commented Jan 23, 2025

Could you explain this? Do we really want to exclude source of anything in the SDK? Is a default value being serialized? Does this change what is in the target platform? If not, why do we need this change?

@laeubi
Copy link
Contributor

laeubi commented Jan 24, 2025

Regarding the source thing, it seems that currently we list source bundle (and features) explicitly in the location (sometimes) so question for me would be if we should remove the explicit ones and enable it in general. Beside that the added values are just the defaults so making it explicit what is used anyways.

@HannesWell HannesWell force-pushed the add-missing-attributes branch from 0c99e98 to da16760 Compare January 24, 2025 17:10
@HannesWell HannesWell changed the title Add omitted IU-location attributes in eclipse-sdk target Include all sources by default in eclipse-sdk target Jan 24, 2025
@HannesWell
Copy link
Member Author

Is a default value being serialized? Does this change what is in the target platform? If not, why do we need this change?

Initially this just serialized the default attributes that are added by the Target-Editor upon any modification and I wanted to avoid unrelated changes in the future if one uses the Editor.

Beside that the added values are just the defaults so making it explicit what is used anyways.

Yes, exactly.

Regarding the source thing, it seems that currently we list source bundle (and features) explicitly in the location (sometimes) so question for me would be if we should remove the explicit ones and enable it in general.

Good point, I have now enhanced this change to remove all explicitly listed source bundles/features and set the includeSource attribute to true for all IU-locations.

@merks
Copy link
Contributor

merks commented Jan 24, 2025

I like the removal of explicit source ius. An attribute for that is more convenient. It should be true for all locations though I think. Or?

@merks
Copy link
Contributor

merks commented Jan 24, 2025

The unrelated charges annoyed me too. Better I can tell it to upgrade without noise.

@laeubi
Copy link
Contributor

laeubi commented Jan 24, 2025

The unrelated charges annoyed me too. Better I can tell it to upgrade without noise.

The main problem is that the target file is "handcrafted" especially the comments and formatting/orderings of maven target locations.

PDE has special handling for IU targets to minimize that, but do not make it available to general locations and not always works well.

@merks
Copy link
Contributor

merks commented Jan 24, 2025

Lately it was literally just a line feed change in the comment about the install location. So mostly not so annoying. 😀

@HannesWell
Copy link
Member Author

I like the removal of explicit source ius. An attribute for that is more convenient. It should be true for all locations though I think. Or?

Yes, I think so as well, but to me it looks like it's enabled for all locations now.
However the build fails saying that org.eclipse.emf.common.source.feature.group, which is required by the eclipse.sdk (which is IMO valid for an SDK), is cannot be found.

@merks
Copy link
Contributor

merks commented Jan 24, 2025

I wonder if we need the source feature. Isn’t there an include all sources for the product/repository that would include the source bundles?

Remove explicitly listed source-bundles and instead include all sources
by default.

Add other omitted IU-location attributes, too.
@HannesWell HannesWell force-pushed the add-missing-attributes branch from da16760 to 18d98a9 Compare January 24, 2025 22:13
@HannesWell
Copy link
Member Author

I wonder if we need the source feature. Isn’t there an include all sources for the product/repository that would include the source bundles?

Yes that option exists and AFAICT it's enabled for the Eclipse-SDK repo. So technically we could remove all explicit sources from that feature.
But in the end I think it's a philosophical question if the org.eclipse.sdk feature should include the sources even if the automated inclusion of sources in a consuming target is not enabled. Personally it wouldn't bother me because I usually have includeSource="true". It most of the time very useful and the only drawback I know that it consumes more disk-space and download-bandwidth for my dev-workspace, but nowadays I don't think that's a real problem anymore.
However others might think differently and maybe argue that a SDK-feature should 'actively' pull in the sources.

Besides of what we want to do with respect to the o.e.sdk bundle, I think it's a missing capability of tycho that one cannot reference source-features (maybe also not source-bundles) in a feature if those source-IUs are only included via includeSource="true" in the target.

@HannesWell
Copy link
Member Author

In fact we have multiple sdk features that explicitly include sources:
grafik

But the org.eclipse.sdk is the only one 'importing' source-IUs from the TP and including the (generated) source-IUs from the reactor works well.

@laeubi
Copy link
Contributor

laeubi commented Jan 25, 2025

But in the end I think it's a philosophical question if the org.eclipse.sdk feature should include the sources even if the automated inclusion of sources in a consuming target is not enabled. Personally it wouldn't bother me because I usually have includeSource="true". It most of the time very useful and the only drawback I know that it consumes more disk-space and download-bandwidth for my dev-workspace, but nowadays I don't think that's a real problem anymore.
However others might think differently and maybe argue that a SDK-feature should 'actively' pull in the sources.

Many things are of course "historical" but I think for this use-case it would be better if a feature.xml would have an attribute "include sources" that the is read by Tycho to include the sources (without a separate source feature), this could also be useful in cases where I have legal requirements to ship the source and don't want to maintain it manually.

So we need a new checkbox in PDE and then Tycho can support it.

In fact we have multiple sdk features that explicitly include sources

Yes that should work without a problem

But the org.eclipse.sdk is the only one 'importing' source-IUs

It might be that this case is special indeed, but I don't see any advantage here in import versus include

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.

3 participants