-
Notifications
You must be signed in to change notification settings - Fork 117
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
Fix discouraged access warnings for own code #1206
base: master
Are you sure you want to change the base?
Fix discouraged access warnings for own code #1206
Conversation
Test Results 196 files ±0 196 suites ±0 23m 23s ⏱️ + 3m 14s For more details on these failures, see this check. Results for commit 83f36ba. ± Comparison against base commit 7943365. ♻️ This comment has been updated with latest results. |
aa88bf3
to
0b8dd69
Compare
Have all m2e project accesses be silenced by exporting the related packages via x-friends. That's safe since all that code is changed and released together. Disable discouraged access warnings in test projects. Tests can be adapted the moment that referenced class vanishes, there is no need to require stable APIs only in tests. Finally remove no longer needed SuppressWarnings.
0b8dd69
to
83f36ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, only one point in the comments.
org.eclipse.m2e.jdt.ui, | ||
org.eclipse.m2e.tests, | ||
org.eclipse.m2e.editor.tests", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me it is a bit strange, to mark 'test-plugins' as x-friends. Can't you instead disbale discouraged access-warnings in the preferences of the tests, just like you did in the apt.tests?
Applies to other 'production' plugins too.
Export-Package: org.eclipse.m2e.tests.common;x-friends:="org.eclipse.m2e.tests,org.eclipse.m2e.core.tests,org.eclipse.m2e.jdt.tests,org.eclipse.m2e.core.ui.tests,org.eclipse.m2e.wtp.tests" | ||
Export-Package: org.eclipse.m2e.tests.common; | ||
x-friends:="org.eclipse.m2e.tests, | ||
org.eclipse.m2e.core.tests, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this plug-in itself is only for tests, I think it would be ok to define other test-plugins as friends. But if you disable discouraged access warnings there that is probably not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, will disable it in all test bundles, and then apply only the remaining fixes in non test bundles. Since the bundles currently have very mixed preferences (or no preferences) this might require to first create preferences in all of them. Otherwise search/replace leads to such confusing results.
@Bananeweizen do you want to complete this one? |
What is the status here? |
Have all m2e project accesses be silenced by exporting the related packages via x-friends. That's safe since all that code is changed and released together.
Disable discouraged access warnings in test projects. Tests can be adapted the moment that referenced class vanishes, there is no need to require stable APIs only in tests.
Finally remove no longer needed SuppressWarnings.