Skip to content

Add deprecation notice to some UPPER_CASE enums.#1036

Merged
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:deprecate-uppercase-enum-types
Aug 12, 2018
Merged

Add deprecation notice to some UPPER_CASE enums.#1036
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:deprecate-uppercase-enum-types

Conversation

@iphydf
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@iphydf iphydf force-pushed the deprecate-uppercase-enum-types branch from b180373 to 5197c0e Compare July 31, 2018 03:38
Copy link
Copy Markdown

@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
@iphydf iphydf requested review from JFreegman and sudden6 August 10, 2018 00:22
Copy link
Copy Markdown
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
Copy Markdown

@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

@iphydf iphydf force-pushed the deprecate-uppercase-enum-types branch 2 times, most recently from 13bd527 to af3edff Compare August 11, 2018 13:14
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

Development

Successfully merging this pull request may close these issues.

5 participants