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

feat: Make cosmwasm_schema deps obsolete #421

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

jawoznia
Copy link
Collaborator

This makes cosmwasm_schema dependency optional on user side, however due to how cosmwasm_schema and schemars is constructed it requires user to specify path to add some more info to macros like so:

#[cw_serde(crate = "sylvia::cw_schema")]
pub struct MyType {}
write_api! {
    crate_name: sylvia::cw_schema,

    instantiate: InstantiateMsg,
    execute: ContractExecMsg<Empty, Empty>,
    query: ContractQueryMsg<Empty, Empty>,
}

Users however can still add cosmwasm_schema to their deps and this change allows them to skip this dependency if they want to.

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.12%. Comparing base (b8aa9b0) to head (05aae9d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #421      +/-   ##
==========================================
+ Coverage   70.10%   70.12%   +0.02%     
==========================================
  Files          53       53              
  Lines        3077     3080       +3     
==========================================
+ Hits         2157     2160       +3     
  Misses        920      920              

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

@jawoznia jawoznia force-pushed the jawoznia/feat/make_user_cw_schema_dep_obsolete branch from 3ec395f to d017e01 Compare August 26, 2024 08:38
@jawoznia jawoznia force-pushed the jawoznia/feat/make_user_cw_schema_dep_obsolete branch from d017e01 to 05aae9d Compare August 26, 2024 08:39
Copy link
Contributor

@kulikthebird kulikthebird left a comment

Choose a reason for hiding this comment

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

👍

@jawoznia jawoznia merged commit e8ede74 into main Aug 27, 2024
9 checks passed
@jawoznia jawoznia deleted the jawoznia/feat/make_user_cw_schema_dep_obsolete branch August 27, 2024 08:05
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