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

storage-plus: containers #23

Merged
merged 7 commits into from
Jun 17, 2024
Merged

storage-plus: containers #23

merged 7 commits into from
Jun 17, 2024

Conversation

uint
Copy link
Contributor

@uint uint commented May 16, 2024

Review and merge #20 first!

Copy link

vercel bot commented May 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cosmwasm-docs ✅ Ready (Inspect) Visit Preview 💬 6 unresolved
✅ 6 resolved
Jun 17, 2024 1:58pm

@uint uint force-pushed the storage-plus-containers branch from 38a8787 to 9e4e28e Compare May 22, 2024 14:02
@uint uint changed the title storage-plus: Item and Map storage-plus: containers May 22, 2024
@uint uint marked this pull request as ready for review May 22, 2024 14:07
@uint uint requested a review from hashedone June 4, 2024 12:12
Base automatically changed from storage-skeleton to main June 4, 2024 13:05
@aumetra
Copy link
Member

aumetra commented Jun 4, 2024

By the way, you should add the crates you added as dependencies to the GitHub CI workflow, too, to update them to the latest versions (otherwise they are locked by the lockfile)

Copy link
Contributor

@dakom dakom left a comment

Choose a reason for hiding this comment

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

docs look good to me fwiw :) left a couple small questions, nothing major

Copy link
Collaborator

@hashedone hashedone left a comment

Choose a reason for hiding this comment

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

Overall I would make sure the documentation is not simply list of functions and then some random examples - it has to be easy to follow by someone never using this thing before. Going to every single useful function one by one and providing an example would be easier to understand in my opinion.
Also we cannot just focus on simple concepts, and then ignore things like prefixed and layered things assuming that people would figure it out - we need to take special care about explaining those non-trivial things.

Comment on lines +1 to +8
#[allow(unused_imports)]
mod imports {
pub use cosmwasm_std::*;
pub use cosmwasm_schema::cw_serde;
}

#[allow(unused_imports)]
use imports::*;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this way instead of importing stuff directly in the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So that we don't have to add #[allow(unused_imports)] to every use directive if we decide to add more. It looks awful.

Copy link
Member

Choose a reason for hiding this comment

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

#![allow(unused_imports)] at the top of the file once

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aumetra My instinct is to be more granular so that we still get warnings in other places, where they might be useful feedback.

@uint
Copy link
Contributor Author

uint commented Jun 5, 2024

@hashedone I agree mostly. My goal with this PR was to braindump content, honestly, and review it and rearrange it in subsequent PRs.

I'm currently fighting my perfectionism, so I'm trying not to perfect every aspect of everything before I deliver it ;) It's usually a mistake.

@uint
Copy link
Contributor Author

uint commented Jun 6, 2024

Rebased

@uint
Copy link
Contributor Author

uint commented Jun 6, 2024

I addressed the comments from @dakom.

@hashedone Your review includes items that are both high-level and low-level, making it a little difficult to address. I think overall it's suggesting a rewrite, which I also think is due.

I don't currently have the throughput to do that - I'm in the middle of writing the IndexedMap thing + other stuff, and won't context-switch to doing a full rewrite here. I've taken note of all the feedback.

I strongly suggest we merge this as it is (even if not perfect), and iterate on this in subsequent PRs to keep up a sense of progress and achievement here, rather than getting stuck. If that's not OK with you, just close this and I'll submit a new PR in the future.

@uint
Copy link
Contributor Author

uint commented Jun 6, 2024

Also we cannot just focus on simple concepts, and then ignore things like prefixed and layered things assuming that people would figure it out - we need to take special care about explaining those non-trivial things.

Ah, a question about that: in my head, the priority list goes something like:

  1. Explain cw-storage-plus basic-to-medium topics
  2. Explain storey fairly in-depth
  3. Explain cw-storage-plus advanced topics

Is that wrong? I worry if we spend all the time explaining cw-storage-plus advanced topics now (there's a fair bit), we risk running out of time to touch storey, and that does not seem exactly aligned with our vision.

Which bits can we not have assuming resources run out? Trying to think strategically here.

@hashedone
Copy link
Collaborator

I addressed the comments from @dakom.

@hashedone Your review includes items that are both high-level and low-level, making it a little difficult to address. I think overall it's suggesting a rewrite, which I also think is due.

I don't currently have the throughput to do that - I'm in the middle of writing the IndexedMap thing + other stuff, and won't context-switch to doing a full rewrite here. I've taken note of all the feedback.

I strongly suggest we merge this as it is (even if not perfect), and iterate on this in subsequent PRs to keep up a sense of progress and achievement here, rather than getting stuck. If that's not OK with you, just close this and I'll submit a new PR in the future.

Lets go this way. Go through my comments. For low-level, things, whatever is easy to address - please just apply and resolve a comment. For things that are more high-level, annoying to fix in the particular review - simply open a PR, and we will figure it out there.

@uint
Copy link
Contributor Author

uint commented Jun 11, 2024

Rebased

Copy link
Collaborator

@hashedone hashedone left a comment

Choose a reason for hiding this comment

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

I was thinking how to approach this, mostly because of this comment and your response, but for now I think the best would be to merge it and move forward.

@uint uint force-pushed the storage-plus-containers branch from 86ce10a to b367e1c Compare June 17, 2024 13:57
@uint uint merged commit a49fa44 into main Jun 17, 2024
2 of 3 checks passed
@uint uint deleted the storage-plus-containers branch June 17, 2024 13:59
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.

4 participants