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

[lang] Improve invalid selector error #561

Merged
merged 10 commits into from
Nov 4, 2020

Conversation

cmichi
Copy link
Collaborator

@cmichi cmichi commented Nov 3, 2020

Previously it was just:

$ cargo build                                                                                                                                                  
error: custom attribute panicked                                                                                                                               
  --> lib.rs:19:1                                                                                                                                              
   |                                                                                                                                                           
19 | #[ink::contract]                                                                                                                                          
   | ^^^^^^^^^^^^^^^^                                                                                                                                          
   |                                                                                                                                                           
   = help: message: called `Option::unwrap()` on a `None` value                                                                                                
                                                                                                                                                               
error: aborting due to previous error  

@cmichi cmichi requested a review from Robbepop November 3, 2020 08:24
@cmichi cmichi changed the title [lang] Improve invalid selector message [lang] Improve invalid selector error Nov 3, 2020
crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM

crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
crates/lang/ir/src/ir/attrs.rs Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Nov 4, 2020

Codecov Report

Merging #561 into master will increase coverage by 2.31%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #561      +/-   ##
==========================================
+ Coverage   80.22%   82.53%   +2.31%     
==========================================
  Files         155      155              
  Lines        6811     6820       +9     
==========================================
+ Hits         5464     5629     +165     
+ Misses       1347     1191     -156     
Impacted Files Coverage Δ
crates/lang/ir/src/ir/attrs.rs 85.58% <75.00%> (+0.14%) ⬆️
crates/env/src/engine/off_chain/chain_extension.rs 60.00% <0.00%> (-40.00%) ⬇️
crates/env/src/engine/off_chain/db/chain_spec.rs 80.00% <0.00%> (-20.00%) ⬇️
crates/env/src/engine/off_chain/mod.rs 77.92% <0.00%> (-11.69%) ⬇️
crates/env/src/engine/off_chain/db/console.rs 15.78% <0.00%> (-10.53%) ⬇️
crates/env/src/engine/off_chain/db/accounts.rs 75.32% <0.00%> (-10.39%) ⬇️
crates/env/src/engine/off_chain/db/events.rs 9.67% <0.00%> (-6.46%) ⬇️
crates/lang/ir/src/ir/trait_def.rs 92.82% <0.00%> (+9.74%) ⬆️
crates/lang/ir/src/ir/item_impl/constructor.rs 98.30% <0.00%> (+13.55%) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c85cb78...809fb97. Read the comment docs.

Copy link
Collaborator

@Robbepop Robbepop left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks a lot for the highly anticipated error reporting improvements! :)

@cmichi cmichi merged commit 0eca603 into master Nov 4, 2020
@cmichi cmichi deleted the cmichi-improve-invalid-selector-error branch November 4, 2020 13:49
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.

4 participants