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

Propagate compile diagnostics #316

Merged
merged 3 commits into from
Dec 23, 2024
Merged

Propagate compile diagnostics #316

merged 3 commits into from
Dec 23, 2024

Conversation

GhenadieVP
Copy link
Contributor

@GhenadieVP GhenadieVP commented Dec 20, 2024

Propagate pretty diagnostics error for CompileError. This will help dApp developers to understand better the reason when a manifest is invalid.

@GhenadieVP GhenadieVP force-pushed the propaget_better_errors branch from 2ccf1cc to 9014cdc Compare December 23, 2024 08:57
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.3%. Comparing base (4870dd8) to head (9014cdc).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #316   +/-   ##
=====================================
  Coverage   93.3%   93.3%           
=====================================
  Files       1111    1111           
  Lines      24182   24193   +11     
  Branches      79      79           
=====================================
+ Hits       22570   22581   +11     
  Misses      1597    1597           
  Partials      15      15           
Flag Coverage Δ
kotlin 97.1% <ø> (ø)
rust 92.8% <100.0%> (+<0.1%) ⬆️
swift 94.8% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crates/sargon/src/core/error/common_error.rs 93.9% <100.0%> (+0.6%) ⬆️
.../transaction_manifest/instructions/instructions.rs 100.0% <100.0%> (ø)
...ion_manifest_v2/instructions_v2/instructions_v2.rs 100.0% <100.0%> (ø)

@GhenadieVP GhenadieVP marked this pull request as ready for review December 23, 2024 09:32
Copy link
Contributor

@CyonAlexRDX CyonAlexRDX left a comment

Choose a reason for hiding this comment

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

lgtm

);
}

#[test]
fn extract_error_from_error_non_gen_err() {
assert_eq!(
CommonError::from_scrypto_compile_error(
"invalid_manifest",
Copy link
Contributor

Choose a reason for hiding this comment

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

"this is a super duper invalid manifest" is more clear a test string IMO.

Copy link
Contributor

Choose a reason for hiding this comment

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

because at first I thought this was suppose to match some expected enum value or so

@GhenadieVP GhenadieVP merged commit ad59bf0 into main Dec 23, 2024
13 checks passed
@GhenadieVP GhenadieVP deleted the propaget_better_errors branch December 23, 2024 10:26
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.

3 participants