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

[Enhancement] Deprecate Fungible Token declarative macros. #1054

Merged
merged 9 commits into from
Aug 18, 2023

Conversation

ruseinov
Copy link
Collaborator

@ruseinov ruseinov commented Jul 15, 2023

Closes #1049

Comment on lines 10 to 14
pub use self::core::FungibleTokenCore;
pub use crate::storage_management::StorageManagement;
pub use core_impl::FungibleToken;
pub use macros::*;
pub use resolver::FungibleTokenResolver;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's align on one way of importing things. I like self::, but it is not the style used before, so let's not use it now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a reason I used self there and it has to do with the fact that otherwise we get an ambiguity error. I have changed that to use the fully qualified path crate::fungible_token..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note, that we do use self for non_fungible_token imports. For that same reason - there is a name ambiguity problem with core.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ruseinov We should consider migrating all the imports to use self:: or crate:: for local imports, but it is a separate discussion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

self is interesting for disambiguation scenarios, because the path ends up being shorter.

examples/fungible-token/ft/src/lib.rs Outdated Show resolved Hide resolved
examples/fungible-token/ft/src/lib.rs Outdated Show resolved Hide resolved
near-contract-standards/src/fungible_token/mod.rs Outdated Show resolved Hide resolved
@ruseinov
Copy link
Collaborator Author

ruseinov commented Aug 7, 2023

This seems to be an a good shape for another round of reviews.

Copy link
Collaborator

@frol frol left a comment

Choose a reason for hiding this comment

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

Overall, looks good to me. See the last couple of comments from me.

CHANGELOG.md Outdated Show resolved Hide resolved
@frol
Copy link
Collaborator

frol commented Aug 17, 2023

@ruseinov The only remaining item left is the CI. Add the offending packages to the ignore list and create a separate issue to address it in the future.

@frol frol merged commit 4c5b679 into near:master Aug 18, 2023
13 checks passed
@ruseinov ruseinov deleted the ru/chore/depr-decl-fungible branch October 3, 2023 12:12
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.

Deprecate declarative macros for fungible tokens
2 participants