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

[refactor]: update iroha_schema_derive to use syn 2.0 #3759

Merged
merged 2 commits into from
Aug 14, 2023

Conversation

DCNick3
Copy link
Contributor

@DCNick3 DCNick3 commented Jul 28, 2023

Also parse attributes with darling and handle errors with manyhow

Description

This is continuation of work started in #3727, touching on iroha_schema_derive.

There was an unused API in TypeId derive: #[type_id(bound = "...")], I removed support for it for now.

Benefits

Same as before: less code, better error messages.

Checklist

  • update the iroha_schema_derive crate
  • add more ui tests covering all the API
  • Address comments

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Jul 28, 2023
@coveralls
Copy link

coveralls commented Jul 28, 2023

Pull Request Test Coverage Report for Build 5856040680

  • 182 of 244 (74.59%) changed or added relevant lines in 2 files are covered.
  • 5323 unchanged lines in 89 files lost coverage.
  • Overall coverage decreased (-1.7%) to 57.733%

Changes Missing Coverage Covered Lines Changed/Added Lines %
primitives/src/conststr.rs 16 17 94.12%
schema/derive/src/lib.rs 166 227 73.13%
Files with Coverage Reduction New Missed Lines %
cli/src/main.rs 1 0%
cli/src/torii/pagination.rs 1 98.9%
config/base/src/runtime_upgrades.rs 1 51.72%
config/src/torii.rs 1 96.67%
core/src/smartcontracts/isi/block.rs 1 87.5%
crypto/src/merkle.rs 1 96.23%
data_model/derive/src/partially_tagged.rs 1 99.67%
data_model/src/account.rs 1 52.21%
data_model/src/domain.rs 1 47.37%
derive_primitives/src/lib.rs 1 0%
Totals Coverage Status
Change from base Build 5423219773: -1.7%
Covered Lines: 20613
Relevant Lines: 35704

💛 - Coveralls

schema/tests/transparent_types.rs Show resolved Hide resolved
schema/tests/schema_json.rs Outdated Show resolved Hide resolved
schema/derive/tests/ui_pass/derive_into_schema.rs Outdated Show resolved Hide resolved
schema/derive/src/lib.rs Show resolved Hide resolved
schema/derive/src/lib.rs Outdated Show resolved Hide resolved
@appetrosyan appetrosyan self-assigned this Jul 28, 2023
@DCNick3 DCNick3 force-pushed the syn2-iroha-schema branch 2 times, most recently from f9f8407 to aa575ba Compare August 1, 2023 06:43
@DCNick3 DCNick3 marked this pull request as ready for review August 1, 2023 08:15
primitives/src/conststr.rs Outdated Show resolved Hide resolved
primitives/src/conststr.rs Outdated Show resolved Hide resolved
primitives/src/conststr.rs Outdated Show resolved Hide resolved
primitives/src/conststr.rs Show resolved Hide resolved
schema/derive/src/lib.rs Show resolved Hide resolved
schema/tests/schema_json.rs Outdated Show resolved Hide resolved
schema/tests/schema_json.rs Outdated Show resolved Hide resolved
@DCNick3 DCNick3 force-pushed the syn2-iroha-schema branch 2 times, most recently from 9079449 to f7059bb Compare August 14, 2023 10:16
Also parse attributes with `darling` and handle errors with `manyhow`

Signed-off-by: Nikita Strygin <[email protected]>
…representation of schema

Signed-off-by: Nikita Strygin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants