[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-dev] How can I reduce the warnings

Hi,

it looks like we never documented the policy for warnings that we
discussed a couple years ago on a Mylyn call. Here is what I recall
from the discussion (unfortunately I can't edit the Wiki right now due
to the server outage at Eclipse.org but I'll update the Contributor
Reference later):

1. Plug-ins are allowed to use internals within the boundaries of
their component (e.g. o.e.m.bugzilla.ui may access internals of
o.e.m.bugzilla.core). We have generally allowed that through x-friends
relationships in plug-in manifests.
2. It's generally okay to use provisional APIs. We have made these
accessible through classpath filters: Project Properties > Java Build
Path > Libraries > Plug-in Dependencies > Access rules. It's common
that plug-ins have a rule to make
org/eclipse/mylyn/internal/provisional/** accessible.
3. In cases where platform internals need to be accessed due to a lack
of API it's okay to make the specific classes or packages accessible.
These cases should be documented on bug 233055.
4. Test plug-ins are allowed to use all internals.

In theory, all remaining warnings indicate potential problems or API
insufficiencies. In practice, we do not have the capacity to address
all of them or the cost outweighs the benefit or they result out of
intentional design decisions, e.g. usage of deprecated APIs for
maintaining backwards compatibility. Still, I believe it's wrong to
hide all discouraged access and deprecation warnings by default as
that can create a perception that the code base is in perfect shape or
that it's generally okay to use internals.

Instead, I recommend to create custom filters in the workspace to hide
those warnings that will not get addressed in the short time. You can
do that using the view menu of the Markers view. I currently use the
attached filters (File > Export > Preferences > Markers View
Configuration) which leaves around 130 warnings in the core Mylyn
plug-ins that should be looked at.

Steffen


On Mon, May 30, 2011 at 5:48 AM, Frank Becker <frank@xxxxxxxxxxxxxxx> wrote:
> Hi,
>
> actual I have 5942 warnings within my workspace.
> 3568 warning are Discouraged access:
>
> Is there a way that I now longer get this as an warning.
>
> My goal is to have none / few warnings.
>
> Thanks
>
> Frank
> _______________________________________________
> mylyn-dev mailing list
> mylyn-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mylyn-dev
>



-- 
Steffen Pingel
Committer, http://eclipse.org/mylyn
Senior Developer, http://tasktop.com
#Mon May 30 21:38:41 CEST 2011
file_export_version=3.0
@org.eclipse.ui.ide=3.7.0.I20110519-0100
/instance/org.eclipse.ui.ide/org.eclipse.ui.internal.views.markers.CachedMarkerBuilderorg.eclipse.ui.views.AllMarkersView=<?xml version\="1.0" encoding\="UTF-8"?>\n<filterGroups andFilters\="true" markerLimit\="1000" markerLimitEnabled\="true">\n<filterGroup IMemento.internal.id\="USER1204511068792" enabled\="false" filterLimit\="0" name\="Working Set" scope\="4" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="CONTAINS" containsText\="" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n<filterGroup IMemento.internal.id\="USER1204511147686" enabled\="true" filterLimit\="0" name\="Build Path" scope\="0" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="DOES_NOT_CONTAIN" containsText\="Build path specifies execution environment" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n<filterGroup IMemento.internal.id\="USER1207025632404" enabled\="true" filterLimit\="0" name\="Project" scope\="3" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="CONTAINS" containsText\="" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n<filterGroup IMemento.internal.id\="USER1212631330682" enabled\="true" filterLimit\="0" name\="Source Plug-in reference" scope\="0" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="DOES_NOT_CONTAIN" containsText\="source&apos; cannot be resolved" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n<filterGroup IMemento.internal.id\="USER1229108422664" enabled\="true" filterLimit\="0" name\="Unpack" scope\="0" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="DOES_NOT_CONTAIN" containsText\="tests&apos; to run from a JAR, specify &apos;unpack" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n<filterGroup IMemento.internal.id\="USER1241547459901" enabled\="true" filterLimit\="0" name\="Discouraged Access" scope\="0" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="DOES_NOT_CONTAIN" containsText\="Discouraged access\:" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n<filterGroup IMemento.internal.id\="USER1244863129104" enabled\="true" filterLimit\="0" name\="Deprecated" scope\="0" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="DOES_NOT_CONTAIN" containsText\=" is deprecated" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n<filterGroup IMemento.internal.id\="USER1250193275529" enabled\="true" filterLimit\="0" name\="EPP Package Perspectives" scope\="0" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="DOES_NOT_CONTAIN" containsText\="erspective&apos; in attribute &apos;targetID&apos; cannot be found" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n<filterGroup IMemento.internal.id\="USER1250805265298" enabled\="true" filterLimit\="0" name\="Internal Extension Point" scope\="0" workingSet\="Aggregate for window 1292282945351">\n<fieldFilter FILTER_ON_SEVERITY\="false" IMemento.internal.id\="org.eclipse.ui.ide.allSeverityField" containsModifier\="DOES_NOT_CONTAIN" containsText\="Access to extension point &apos;org.eclipse.mylyn.tasks.ui.searchProvider&apos; is discouraged" selectedSeverities\="7"/>\n<fieldFilter IMemento.internal.id\="org.eclipse.ui.ide.markerType"/>\n</filterGroup>\n</filterGroups>
\!/=