Remove storage-plus dependency from storage-macro#817
Conversation
Good catch. You should be able to test the docs locally by running You could also add some metadata to |
|
Yes, locally it was working with [package.metadata.docs.rs]
all-features = true |
|
Yep, that's fine |
packages/storage-macro/src/lib.rs
Outdated
| /// Auto generate an `IndexList` impl for your indexes struct. | ||
| /// | ||
| /// # Example | ||
| /// | ||
| /// ```rust | ||
| /// #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] | ||
| /// struct TestStruct { | ||
| /// id: u64, | ||
| /// id2: u32, | ||
| /// addr: Addr, | ||
| /// } | ||
| /// | ||
| /// #[index_list(TestStruct)] // <- Add this line right here. | ||
| /// struct TestIndexes<'a> { | ||
| /// id: MultiIndex<'a, u32, TestStruct, u64>, | ||
| /// addr: UniqueIndex<'a, Addr, TestStruct>, | ||
| /// } | ||
| /// ``` | ||
| /// |
There was a problem hiding this comment.
Ah, so normally macro docs would live in the storage-plus crate, above the reexport. Here's an example.
Does this example pass when tested?
There was a problem hiding this comment.
Good point, it does not. I'll move it to the reexport
| syn = { version = "1.0.96", features = ["full"] } | ||
|
|
||
| [dev-dependencies] | ||
| cw-storage-plus = { version = "<=0.15.1, >=0.14.0", path = "../storage-plus" } |
There was a problem hiding this comment.
Just FYI: the way the version requirements are specified here is a hack to make a cyclic dependency publishable to crates.io. Good thing we don't actually need it!
There was a problem hiding this comment.
Good that this is not needed, yes. Thanks for working on simplifying this.
uint
left a comment
There was a problem hiding this comment.
LGTM. Thanks for making sure those tests are actually run in CI
The tests that were depending on
storage-plusare now instorage-plus. I also changed the CI to actually run them.I added the docs from readme to the actual macro. I'm not sure how docs.rs works in this regard though, since the reexport is only available with the
macrofeature.closes #808