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

fix: map delete #2017

Merged
merged 4 commits into from
May 9, 2024
Merged

fix: map delete #2017

merged 4 commits into from
May 9, 2024

Conversation

r3v4s
Copy link
Contributor

@r3v4s r3v4s commented May 2, 2024

after value is delete in map by delete(map, key), map variable wasn't updating it-self

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@github-actions github-actions bot added 📦 🤖 gnovm Issues or PRs gnovm related 📦 ⛰️ gno.land Issues or PRs gno.land package related labels May 2, 2024
Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.40%. Comparing base (8a0de59) to head (beec187).
Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2017      +/-   ##
==========================================
+ Coverage   46.68%   48.40%   +1.71%     
==========================================
  Files         492      409      -83     
  Lines       69700    62039    -7661     
==========================================
- Hits        32537    30027    -2510     
+ Misses      34448    29512    -4936     
+ Partials     2715     2500     -215     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@r3v4s r3v4s marked this pull request as ready for review May 2, 2024 07:15
@r3v4s r3v4s requested review from jaekwon, piux2, thehowl and moul as code owners May 2, 2024 07:15
@r3v4s r3v4s requested a review from zivkovicmilos May 2, 2024 07:16
Copy link
Member

@moul moul left a comment

Choose a reason for hiding this comment

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

Can this be unit tested as well, not just txtar tested?

I'm surprised this code works on the chain, not just with blockchain-less Golang. Map persistence was supposed to be temporarily disabled. Isn't it?

@r3v4s r3v4s requested a review from a team as a code owner May 2, 2024 08:21
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label May 2, 2024
@r3v4s
Copy link
Contributor Author

r3v4s commented May 2, 2024

Can this be unit tested as well, not just txtar tested?

Map persistence was supposed to be temporarily disabled. Isn't it?

  • Not sure about this, could you link any related issue

gnovm/pkg/gnolang/uverse.go Outdated Show resolved Hide resolved
@thehowl
Copy link
Member

thehowl commented May 2, 2024

@moul: Map persistence was supposed to be temporarily disabled. Isn't it?

With #1112, map persistance is already "fixed". IIRC, we didn't add any explicit checks forbidding the usage of map for persisted objects

@moul
Copy link
Member

moul commented May 2, 2024

I forgot that map persistence was fixed. We should write documentation on the pros and cons of using a map or AVL tree, updating the Effective GNO or creating a new "Data Structures on Gno" page.

@leohhhn
Copy link
Contributor

leohhhn commented May 3, 2024

@r3v4s I will make the docs on this - if you want to, play around with maps and check the speeds :)

@r3v4s r3v4s requested review from a team as code owners May 7, 2024 04:57
@thehowl thehowl merged commit 91ac58b into gnolang:master May 9, 2024
203 of 205 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants