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

Bug 533327 - [9] Implement JEP 211 #2680

Merged
merged 4 commits into from
Jul 9, 2024

Conversation

stephan-herrmann
Copy link
Contributor

fixes #2679

@stephan-herrmann
Copy link
Contributor Author

@jarthana @iloveeclipse I'd like to apply the same also to warnings / errors regarding restricted access (according to access rules):

Currently, just like with deprecation warnings, those warnings ("Discouraged access ...") can only be suppressed by adding @SuppressWarnings("restriction") on the entire class, which is typically undesirable.

So perhaps we should also stop raising such warnings on imports? Warnings on actual usage will of course remain.

Any objections?

Strictly speaking the rule in JLS was changed in version 9, but I don't think anybody will complain if the same also applies at 1.8, right?

@stephan-herrmann
Copy link
Contributor Author

Test failures show that I "accidentally" already did away with warnings for restricted access reported on import declarations.

I'll wait for agreement / objections before adjusting those tests or limiting the implementation change to pure deprecation warnings.

@iloveeclipse
Copy link
Member

Any objections?

Not from me, makes sense.

Strictly speaking the rule in JLS was changed in version 9, but I don't think anybody will complain if the same also applies at 1.8, right?

Is that a problem / big overhead to perform it on 9+ level only? I would follow the spec, simply to be consistent with it even if the change should be fine with 1.8.

@stephan-herrmann
Copy link
Contributor Author

Any objections?

Not from me, makes sense.

thanks

Is that a problem / big overhead to perform it on 9+ level only?

Not a problem, only means instead of deleting code I'll have to add code :)

@iloveeclipse
Copy link
Member

Not a problem, only means instead of deleting code I'll have to add code :)

I would prefer the opposite.
@jarthana, @srikanth-sankaran : any opinions?

Adjust also AccessRestrictionsTests
@stephan-herrmann
Copy link
Contributor Author

Not a problem, only means instead of deleting code I'll have to add code :)

I would prefer the opposite. @jarthana, @srikanth-sankaran : any opinions?

If "opposite" refers to removing code rather than adding, this is at conflict with your previous suggestion.

Anyway, not a big deal, see 5024190 for warning re-introduced at 1.8-

@stephan-herrmann stephan-herrmann merged commit eb2e0c6 into eclipse-jdt:master Jul 9, 2024
9 checks passed
@stephan-herrmann stephan-herrmann deleted the issue2679 branch July 9, 2024 19:56
iloveeclipse added a commit to iloveeclipse/eclipse.jdt.debug that referenced this pull request Jul 10, 2024
iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.debug that referenced this pull request Jul 10, 2024
@iloveeclipse
Copy link
Member

@stephan-herrmann : this PR was merged "too fast", as it introduced new warnings that failed the SDK build (see eclipse-platform/eclipse.platform.releng.aggregator#2178).

I don't have a solution yet for how we can avoid that in the future (except to avoid treating warnings as errors in project settings), because it is of course a lot of effort / time needed to compile everything locally with a new compiler version.

@stephan-herrmann
Copy link
Contributor Author

@iloveeclipse I'm all ears if you have any feasible suggestions. For the recently added "unnecessary casts" warnings, I was happy to fix them ahead of time, but that certainly was a one-time favor :)

robstryker pushed a commit to robstryker/eclipse.jdt.core that referenced this pull request Jul 18, 2024
Don't raise warnings on imports (deprecation, restricted access) 

fixes eclipse-jdt#2679
gayanper pushed a commit to gayanper/eclipse.jdt.core that referenced this pull request Sep 7, 2024
Don't raise warnings on imports (deprecation, restricted access) 

fixes eclipse-jdt#2679
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.

Bug 533327 - [9] Implement JEP 211
2 participants