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

Removed unnecessary dependency features, changed default features #1143

Closed
wants to merge 1 commit into from

Conversation

njelich
Copy link

@njelich njelich commented Feb 14, 2024

I removed the legacy and ABI from default features. I am not sure about the removal of ABI about defaults, but legacy seems like it should be removed, though this will require changing the examples to either use the legacy feature or to use the newer near_sdk::store which has a nearly identical interface, but better matches std::collections interfaces.

The other part was testing compilation and looking over features used by direct dependencies, where I found a dozen or so unnecessary features and potential optimizations.

The CI/CD tests currently fail with a lot of erros like below, once I know the final decision regarding the legacy feature, I will make updates to the tests according to the decision.

error[E0432]: unresolved import `near_sdk::collections`
 --> src/lib.rs:2:15
  |
2 | use near_sdk::collections::LookupMap;
  |               ^^^^^^^^^^^ could not find `collections` in `near_sdk`

@njelich njelich changed the title clean up features Removed unnecessary dependency features, changed default features Feb 14, 2024
@frol
Copy link
Collaborator

frol commented Feb 19, 2024

  1. Let's migrate examples that don't use UnorderedMap and UnorderedSet over to the store API (store::UnorderedMap and store::UnorderedSet got recently deprecated - see fix: deprecated store::UnorderedMap and store::UnorderedSet due to not meeting the original requirements (iteration over a collection of more than 2k elements runs out of gas) #1139 + discussion in Keys iterator of the store::UnorderedMap has a huge performance drop after removing elements #1134).
  2. Let's keep the examples that use collections::Unordered* and use legacy feature for them until store::IterableMap/store::IterableSet are implemented.

@frol
Copy link
Collaborator

frol commented Feb 23, 2024

@njelich I needed to see if there would be any breaking changes, and went ahead with #1149, so this PR is superseded now.

@frol frol closed this Feb 23, 2024
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.

2 participants