-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Rename NFT to NFToken for lsfDisallowIncomingNFTokenOffer flags #4442
Rename NFT to NFToken for lsfDisallowIncomingNFTokenOffer flags #4442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not generally an advocate of rename-only changesets, but I'm fine approving work that has already been done.
@@ -147,15 +147,15 @@ constexpr std::uint32_t const tfNFTokenMintMask = | |||
~(tfUniversal | tfBurnable | tfOnlyXRP | tfTransferable); | |||
|
|||
// NFTokenCreateOffer flags: | |||
constexpr std::uint32_t const tfSellNFToken = 0x00000001; | |||
constexpr std::uint32_t const tfSellNFToken = 0x00000001; | |||
constexpr std::uint32_t const tfNFTokenCreateOfferMask = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the equals signs in this file are aligned with the one on this line because it has the longest prefix. Two things:
- After changing "NFT" to "NFToken", the new longest prefix is on line 85. The equals sign on that line should be one space apart from that prefix. In this commit, it is four spaces apart.
- The equals sign on this line, 151, should be aligned with the others in the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy to go with that spacing guidance, i had assumed it was a nearest every 4 spaces approach since the last one happened to be % 4 in a clean way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thejohnfreeman for point 2. I think I have seen a different approach in other lines that fold so I thought it was more consistent to not align when they fold, see lines https://github.com/XRPLF/rippled/blob/develop/src/ripple/protocol/TxFlags.h#L67 for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, has it ever been considered to have formatting rules controlled by a linting tool automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file as it looked before clang-format hit it in the Great Reformat appears to have every equals sign aligned, even on lines that wrap. They are all in column 44, and they are all 4 spaces after the longest prefix. Both of these rules match the alignment you have, @kennyzlei, except for the wrapped lines that you are not touching. Let's keep that alignment and just add a comment at the start, before or after the // clang-format off
line, explaining this rule. Optionally, you can restore the wrapped lines to conform to the rule.
@justinr1234 We do have that. It's controlled by clang-format. Style configuration in .clang-format. Enforcement in .github/workflows/clang-format.yml. We disable it for sections of special formatting like this. When deciding to incorporate it, the majority wanted to keep the special formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thejohnfreeman added a comment to describe the special formatting
I don't understand this sentence. Naming is important, and it seems clear that this rename follows the principle of least surprise. If we agree that the rename is worth doing, then it is not a problem to do it in a rename-only changeset. |
12bf9b1
to
e90a481
Compare
@kennyzlei Please, in the future, no more force-pushes. Not sure what is going on with review assignments either. Generally, assignments are left up even after a review is submitted. |
`lsfDisallowIncomingNFTOffer` to `lsfDisallowIncomingNFTokenOffer` `asfDisallowIncomingNFTOffer` to `asfDisallowIncomingNFTokenOffer` Related to XRPLF/rippled#4442
`asfDisallowIncomingNFTOffer` to `asfDisallowIncomingNFTokenOffer` Related to XRPLF/rippled#4442
e90a481
to
0585db3
Compare
😞 sorry I had to force push again here as my initial commits did not come with pgp signature, i thought i had auto-signed set up |
No worries; I think the signature changes when the commits get squashed anyway. This looks fine to me: I'll go ahead and merge; if we find any problems, we can fix with a follow-up PR. |
* upstream/develop: Set version to 1.10.0-rc4 Rename 'NFT' to 'NFToken' in DisallowIncoming flags (XRPLF#4442) Update Docker.md (XRPLF#4432) Update package building scripts and images to use Conan (XRPLF#4435) Disable duplicate detector: (XRPLF#4438)
* upstream/develop: Set version to 1.10.0-rc4 Rename 'NFT' to 'NFToken' in DisallowIncoming flags (XRPLF#4442) Update Docker.md (XRPLF#4432) Update package building scripts and images to use Conan (XRPLF#4435) Disable duplicate detector: (XRPLF#4438)
* upstream/develop: Set version to 1.10.0-rc4 Rename 'NFT' to 'NFToken' in DisallowIncoming flags (XRPLF#4442) Update Docker.md (XRPLF#4432) Update package building scripts and images to use Conan (XRPLF#4435) Disable duplicate detector: (XRPLF#4438)
* upstream/develop: Set version to 1.10.0-rc4 Rename 'NFT' to 'NFToken' in DisallowIncoming flags (XRPLF#4442) Update Docker.md (XRPLF#4432) Update package building scripts and images to use Conan (XRPLF#4435) Disable duplicate detector: (XRPLF#4438)
* upstream/develop: Set version to 1.10.0-rc4 Rename 'NFT' to 'NFToken' in DisallowIncoming flags (XRPLF#4442) Update Docker.md (XRPLF#4432)
…ctionality * upstream/develop: Set version to 1.10.0-rc4 Rename 'NFT' to 'NFToken' in DisallowIncoming flags (XRPLF#4442) Update Docker.md (XRPLF#4432) Update package building scripts and images to use Conan (XRPLF#4435) Disable duplicate detector: (XRPLF#4438)
…tpage * upstream/develop: Set version to 1.10.0-rc4 Rename 'NFT' to 'NFToken' in DisallowIncoming flags (XRPLF#4442) Update Docker.md (XRPLF#4432) Update package building scripts and images to use Conan (XRPLF#4435) Disable duplicate detector: (XRPLF#4438)
* Follow-up to XRPLF#4336 * NFToken is the naming convention in the codebase (rather than NFT) * Rename `lsfDisallowIncomingNFTOffer` to `lsfDisallowIncomingNFTokenOffer` * Rename `asfDisallowIncomingNFTOffer` to `asfDisallowIncomingNFTokenOffer`
`lsfDisallowIncomingNFTOffer` to `lsfDisallowIncomingNFTokenOffer` `asfDisallowIncomingNFTOffer` to `asfDisallowIncomingNFTokenOffer` Related to XRPLF/rippled#4442
`lsfDisallowIncomingNFTOffer` to `lsfDisallowIncomingNFTokenOffer` `asfDisallowIncomingNFTOffer` to `asfDisallowIncomingNFTokenOffer` Related to XRPLF/rippled#4442
`asfDisallowIncomingNFTOffer` to `asfDisallowIncomingNFTokenOffer` Related to XRPLF/rippled#4442
High Level Overview of Change
lsfDisallowIncomingNFTOffer
tolsfDisallowIncomingNFTokenOffer
asfDisallowIncomingNFTOffer
toasfDisallowIncomingNFTokenOffer
TXFlags.h
after renameContext of Change
NFToken
is the more standard naming convention in the codebase compared toNFT
Type of Change