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

Add deprecation notice to some UPPER_CASE enums. #1036

Merged
merged 1 commit into from Aug 12, 2018

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Jul 28, 2018

The enumerators won't change, but the type name will change in 0.3.0.
Reasoning:

  • Type names in toxcore start with an uppercase letter and either have at
    least one lowercase letter in them, or are less than 4 characters long.
  • Constants consist of 4 or more uppercase letters or underscores.

By these rules, "DHT" is a type name, but "TOX_USER_STATUS" is a
constant. We provide Tox_User_Status as an alternative for now, and will
switch to that in 0.3.0, removing the UPPER_CASE versions.


This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Jul 28, 2018
Copy link
Member

@hugbubby hugbubby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: 0 of 1 LGTMs obtained

Copy link
Member

@hugbubby hugbubby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

Copy link
Member

@robinlinden robinlinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewed 2 of 2 files at r1.
Reviewable status: 1 of 2 LGTMs obtained (waiting on @JFreegman)

@iphydf iphydf force-pushed the deprecate-uppercase-enum-types branch 3 times, most recently from 215276d to fceee56 Compare August 9, 2018 22:42
Copy link
Member

@JFreegman JFreegman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewed 1 of 2 files at r1, 2 of 2 files at r2.
Reviewable status: 1 of 2 LGTMs obtained (waiting on @sudden6)

Copy link

@sudden6 sudden6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

The enumerators won't change, but the type name will change in 0.3.0.
Reasoning:
- Type names in toxcore start with an uppercase letter and either have at
  least one lowercase letter in them, or are less than 4 characters long.
- Constants consist of 4 or more uppercase letters or underscores.

By these rules, "DHT" is a type name, but "TOX_USER_STATUS" is a
constant. We provide Tox_User_Status as an alternative for now, and will
switch to that in 0.3.0, removing the UPPER_CASE versions.
@iphydf iphydf force-pushed the deprecate-uppercase-enum-types branch from af3edff to 503d9f7 Compare August 11, 2018 16:39
@iphydf iphydf merged commit 503d9f7 into TokTok:master Aug 12, 2018
@iphydf iphydf deleted the deprecate-uppercase-enum-types branch August 12, 2018 11:38
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.6 Aug 14, 2018
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.

None yet

5 participants