Skip to content

Expand hard-coded list of type qualifiers#802

Closed
mernst wants to merge 1 commit intogoogle:masterfrom
mernst:typequalifiers
Closed

Expand hard-coded list of type qualifiers#802
mernst wants to merge 1 commit intogoogle:masterfrom
mernst:typequalifiers

Conversation

@mernst
Copy link
Contributor

@mernst mernst commented Jul 15, 2022

This change is necessary even if a -Dtypeannotationconfig=_filename_ flag is implemented as mentioned in #5. (That filename would be for recently-created annotations, or ones that are private to a project or a company.)

@mernst
Copy link
Contributor Author

mernst commented Jul 19, 2022

The CI failure is the same as is currently occurring on the master branch.

@cushon
Copy link
Collaborator

cushon commented Aug 4, 2022

This change is necessary even if a -Dtypeannotationconfig=filename flag is implemented as mentioned in #5

I think I see what you mean, but that isn't the way I was thinking about it. With -Dtypeannotationconfig= people could create their own lists, and we wouldn't have to try to maintain an exhaustive list of type use annotations in public libraries.

@mernst
Copy link
Contributor Author

mernst commented Aug 4, 2022

This change is necessary even if a -Dtypeannotationconfig=filename flag is implemented as mentioned in #5

I think I see what you mean, but that isn't the way I was thinking about it. With -Dtypeannotationconfig= people could create their own lists, and we wouldn't have to try to maintain an exhaustive list of type use annotations in public libraries.

Thanks for clarifying how you were thinking about it; that was not clear to me before. My view is (as stated in the PR description) that the extra filename would be rarely used: for recently-created annotations or for ones that are private to a project or a company.

If we apply your view consistently, then GJF should not support org.jspecify.nullness.Nullable. Every user who wishes to use that annotation should create a side file containing its name and configure GJF to use that file. I think this is unreasonable; do you agree?

There is no need to maintain an exhaustive list -- no one (other than you?) has suggested that. But maintaining a useful list would be helpful to users. It would significantly reduce user effort, and it would reduce inadvertent formatting differences among users and among projects.

Another argument in favor of this pull request is that it is consistent with how the current GJF implementation works.

@cushon
Copy link
Collaborator

cushon commented Aug 5, 2022

This is not the approach I want to take at this time. I would take a PR for the approach described in #5 (comment)

@cushon cushon closed this Aug 5, 2022
@mernst
Copy link
Contributor Author

mernst commented Aug 5, 2022

I would be curious to understand the reasoning. I noted some tradeoffs that favor this pull request, but you didn't have any criticism of it, nor mention anything that recommends the approach of every user having to create a side file and customize their buildfile.

@ViliusS ViliusS mentioned this pull request Dec 19, 2023
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.

2 participants