Conversation
PR SummaryHigh Risk Overview Tightens Reworks test execution and coverage: CI and Reviewed by Cursor Bugbot for commit 49529ec. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
👍 |
StorageVecStorageVec
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f6e7fd7. Configure here.
| /// at all, or if it has any limitations or exceptional behaviors, | ||
| /// refer to method documentation. | ||
| #[cfg(experimental_dynamic_storage = true)] | ||
| pub struct StorageVec<V> {} |
There was a problem hiding this comment.
What is the difference from the declaration above? I am only seeing a small diff on the doc-comments. I think it makes more sense to keep just one and make the difference more explicit.

Description
This PR is an additional step in implementing #7560. It implements
StorageVec<V>for dynamic storage.Additionally the PR:
StorageVecin the form of in-language tests. Existing SDK harness tests are deleted in favor of new in-language tests. This is aligned with the agreed strategy to migrate SDK harness tests to in-language tests.StorageVec::insert()does not work with nested storage types #6040 by properly documenting the semantics of zero-sized types in relation to storage. EveryStorageVec<V>methods that does not work with zero-sized types, which are assumed to be nested storage types, is now documented for limitations.StorageVec<V>::store_vecandload_vecfor non-aligned types #7618 by accepting non-aligned types of any size instore_vecandload_vecand padding them accordingly.store_vec.StorageVec<V>methods in the quads-based implementation that cannot be used with nested storage types. For more details see Breaking Changes below.When running in-language tests using
forc teston the whole workspace two blocking issues occur:assert_eqcalls make compiler panic with too big data section #7612forc testprocess gets killed when run on a workspace with a large number of projects #7613Workarounds for those issues are commented in code and linked to the issues.
Additional in-language tests for other storage types will be added in a separate PR.
Breaking Changes
Existing
StorageVec<V>methods in the quads-based implementation that cannot be used with nested storage types, e.g.,swapnow consistently reverts ifVis a nested storage type.Previously, those methods:
Consistently reverting can be a breaking change if some existing code called these methods and they were not reverting. Note that such calls represent invalid usage of the storage API (although it was up to now not clearly documented as such) and reverting will actually point to bugs in existing callers code.
Checklist
Breaking*orNew Featurelabels where relevant.