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

[enumification] support "non-constant-to-constant" transition in enums too. #1080

Merged

Conversation

atsushieno
Copy link
Contributor

At 9a73c4c we became much more precise about enumification, because
formerly we only pull int constant information through DroidDoc only in
the latest API.

Besides, we had been precise on which int fields are final and which aren't,
in API XML metadata.

Since we switched the information source to API XML metadata, such final
fields that were NOT final are strictly converted to enums only in the
constant-ified API Level.

That was regarded as regression at #1078 .

The solution to this situation is: treat them as constants.

To do so, now generate-const-list-2.cs is changed to NOT check if an int
field is final or not, until at the merge phase. Then we filter out those
non-constant fields (which are not much).

This uncovers those "formerly non constant" fields too. Fortunately such
fields didn't exist other than the ones at PR #1078 mentioned (this
generate-const-list-2.exe now prints out such fields now.)

…s too.

At  9a73c4c we became much more precise about enumification, because
formerly we only pull int constant information through DroidDoc only in
the latest API.

Besides, we had been precise on which int fields are final and which aren't,
in API XML metadata.

Since we switched the information source to API XML metadata, such final
fields that were NOT final are strictly converted to enums only in the
constant-ified API Level.

That was regarded as regression at dotnet#1078 .

The solution to this situation is: treat them as constants.

To do so, now generate-const-list-2.cs is changed to NOT check if an int
field is final or not, until at the merge phase. Then we filter out those
non-constant fields (which are not much).

This uncovers those "formerly non constant" fields too. Fortunately such
fields didn't exist other than the ones at PR dotnet#1078 mentioned (this
generate-const-list-2.exe now prints out such fields now.)
@atsushieno atsushieno requested a review from jonpryor December 7, 2017 06:13
@jonpryor jonpryor merged commit 50c0c15 into dotnet:master Dec 7, 2017
jonpryor added a commit that referenced this pull request Apr 23, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants