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: Remove types forwarding to interface in sv::messages #361

Merged
merged 3 commits into from
May 7, 2024

Conversation

kulikthebird
Copy link
Contributor

@kulikthebird kulikthebird commented Apr 22, 2024

TODO:

  • JsonSchema implementation for contract's Exec, Query and Sudo message enums
  • Improve sylvia generated code's lifetimes names to avoid collisions

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 98.96907% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 84.74%. Comparing base (f8c1e55) to head (5165301).

Files Patch % Lines
sylvia-derive/src/parser/attributes/messages.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #361      +/-   ##
==========================================
+ Coverage   84.71%   84.74%   +0.02%     
==========================================
  Files          37       37              
  Lines        2598     2589       -9     
==========================================
- Hits         2201     2194       -7     
+ Misses        397      395       -2     

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

@kulikthebird kulikthebird force-pushed the tkulik/feat/no_generics_for_interfaces branch 2 times, most recently from 559a06a to 5132a69 Compare April 22, 2024 07:58
@kulikthebird kulikthebird marked this pull request as ready for review April 22, 2024 07:59
@kulikthebird kulikthebird force-pushed the tkulik/feat/no_generics_for_interfaces branch 6 times, most recently from dfdad2e to 371aa34 Compare April 22, 2024 13:58
@kulikthebird
Copy link
Contributor Author

There are Json and TS API generated for the sylvia/examples/contracts/generic_contract:

execute.json
GenericContract.client.txt
GenericContract.types.txt

@kulikthebird kulikthebird changed the title feat: Remove types forwarding to interface's assoc feat: Remove types forwarding to interface in sv::messages Apr 22, 2024
@kulikthebird kulikthebird force-pushed the tkulik/feat/no_generics_for_interfaces branch from 371aa34 to 69f59e2 Compare April 23, 2024 06:30
sylvia-derive/src/message.rs Outdated Show resolved Hide resolved
sylvia-derive/src/message.rs Outdated Show resolved Hide resolved
sylvia-derive/src/message.rs Outdated Show resolved Hide resolved
sylvia-derive/src/message.rs Outdated Show resolved Hide resolved
@kulikthebird kulikthebird force-pushed the tkulik/feat/no_generics_for_interfaces branch from c4fdf15 to dc8747a Compare May 6, 2024 08:14
@kulikthebird kulikthebird requested a review from jawoznia May 6, 2024 08:35
Copy link
Collaborator

@jawoznia jawoznia left a comment

Choose a reason for hiding this comment

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

One more thing: Update MIGRATING.md.
I think two changes have to be mentioned which are required lifetimes in impl block and CodeId generic over a Contract.

Otherwise LGTM

@kulikthebird kulikthebird force-pushed the tkulik/feat/no_generics_for_interfaces branch from 65bd4ef to 1620583 Compare May 7, 2024 09:05
Copy link
Collaborator

@jawoznia jawoznia left a comment

Choose a reason for hiding this comment

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

Last small changes otherwise LGTM.

Basically do not link changes with specific feature as MIGRATING is supposed to group all the changes to specific version migration.

MIGRATING.md Outdated Show resolved Hide resolved
MIGRATING.md Outdated Show resolved Hide resolved
MIGRATING.md Outdated Show resolved Hide resolved
MIGRATING.md Outdated Show resolved Hide resolved
MIGRATING.md Outdated Show resolved Hide resolved
@kulikthebird kulikthebird force-pushed the tkulik/feat/no_generics_for_interfaces branch from 1620583 to 5165301 Compare May 7, 2024 09:18
@kulikthebird kulikthebird enabled auto-merge (squash) May 7, 2024 09:21
@kulikthebird kulikthebird merged commit 741b358 into main May 7, 2024
7 checks passed
@kulikthebird kulikthebird deleted the tkulik/feat/no_generics_for_interfaces branch May 7, 2024 09:30
@github-actions github-actions bot mentioned this pull request May 7, 2024
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.

#[sv::messages] does not need generics to be forwarded to interfaces with associated types
2 participants