Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 506435 - JDT project settings should be used by Tycho build
Summary: JDT project settings should be used by Tycho build
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.7 M4   Edit
Assignee: Platform-Releng-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 506766 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-24 08:59 EDT by Mickael Istria CLA
Modified: 2016-11-01 14:54 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2016-10-24 08:59:52 EDT
Platform projects specify some .settings file to enforce quality rules. Those rules are ignored at build-time by Tycho, whereas Tycho has a way to enable them.
Platform Tycho Build should honor this .settings.
Comment 1 Mickael Istria CLA 2016-10-24 09:03:23 EDT
This patch seems very low risk. It would be nice to merge it early in M4 cycle, and maybe even to backport it to branch.
Comment 3 Eclipse Genie CLA 2016-10-30 20:12:38 EDT
New Gerrit change created: https://git.eclipse.org/r/84198
Comment 5 Markus Keller CLA 2016-10-30 20:18:16 EDT
Reverted, because this broke N20161029-1500:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:0.25.0:compile (default-compile) on project org.eclipse.osgi: Compilation failure: Compilation failure:
[ERROR] /opt/public/eclipse/builds/4N/gitCache/eclipse.platform.releng.aggregator/rt.equinox.framework/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/util/CopyOnWriteSet.java:[22]
[ERROR] import java.util.AbstractSet;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import java.util.AbstractSet is never used
[ERROR] /opt/public/eclipse/builds/4N/gitCache/eclipse.platform.releng.aggregator/rt.equinox.framework/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/Logger.java:[23]
[ERROR] import org.osgi.service.resolver.ResolutionException;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import org.osgi.service.resolver.ResolutionException is never used
[ERROR] /opt/public/eclipse/builds/4N/gitCache/eclipse.platform.releng.aggregator/rt.equinox.framework/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/WrappedResource.java:[24]
[ERROR] import org.osgi.framework.namespace.IdentityNamespace;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import org.osgi.framework.namespace.IdentityNamespace is never used

One reason why we don't use the .settings file in the official build is to make it harder for beginners to commit bad changes to build settings that would then go undetected in the build. I don't think there's anything left to do here.
Comment 6 Lars Vogel CLA 2016-10-31 04:42:53 EDT
(In reply to Markus Keller from comment #5)
> Reverted, because this broke N20161029-1500:
> 
> [ERROR] Failed to execute goal
> org.eclipse.tycho:tycho-compiler-plugin:0.25.0:compile (default-compile) on
> project org.eclipse.osgi: Compilation failure: Compilation failure:
> [ERROR]
> /opt/public/eclipse/builds/4N/gitCache/eclipse.platform.releng.aggregator/rt.
> equinox.framework/bundles/org.eclipse.osgi/felix/src/org/apache/felix/
> resolver/util/CopyOnWriteSet.java:[22]
> [ERROR] import java.util.AbstractSet;
> [ERROR] ^^^^^^^^^^^^^^^^^^^^^
> [ERROR] The import java.util.AbstractSet is never used
> [ERROR]

Looks like a bug in JDT is hiding this unnecessary import in the IDE, as JDT does not detect the unnecessary import. Opened Bug 506770 for that.

Some issue for CopyOnWriteSet, Logger and IdentityNamespace
Comment 7 Lars Vogel CLA 2016-10-31 04:46:29 EDT
Opened Bug 506772 for Equinox to remove the unnecessary imports.
Comment 8 Mickael Istria CLA 2016-10-31 05:00:00 EDT
> One reason why we don't use the .settings file in the official build is to
> make it harder for beginners to commit bad changes to build settings that
> would then go undetected in the build. I don't think there's anything left
> to do here.

This change by requested by some committers that wanted to make sure that platform rules are enforced and verified at build-time, and also to make sure that beginners will conform to these rules thanks to automated build.
I don't understand why not using this settings makes harder to create bad changes on them. Can you please elaborate?
Comment 9 Mickael Istria CLA 2016-10-31 05:18:30 EDT
Note that although I think the initial request of using .settings/ at build-time as well is a good one and is profitable for both contributors and project and doesn't add any risk, I won't "fight" for it and I'm going to stay away of this conversation to focus on other topics.
The commit is there, feel free to cherry-pick it whenever needed.
Comment 10 Dani Megert CLA 2016-11-01 10:58:00 EDT
We don't want to use the project settings as we want to apply the defaults to all projects no matter what they chose to disable or enable.

Due to bug 506439 we now have to explicitly disable this.
Comment 11 Markus Keller CLA 2016-11-01 14:54:18 EDT
*** Bug 506766 has been marked as a duplicate of this bug. ***