-
Notifications
You must be signed in to change notification settings - Fork 381
feat: Option expect method #4219
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
Merged
Merged
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
a523278
initial updates to make assert_message not a string literal
vezenovm 31b6e55
Merge branch 'master' into mv/assert-msg-fmtstr
vezenovm 84ec1bc
working resolution of assert messages and runtime
vezenovm 0a084c4
remove old impl
vezenovm c581cee
revert debugging changes for brillig inputs
vezenovm 73e48fb
cargo fmt
vezenovm 0c46345
remove old ocmment
vezenovm 1cf135d
cargo clippy and cleanup
vezenovm 3123241
cleanup old comments and initial debugging for brillig assert message
vezenovm 08d8922
improved usage of From trait for ForeignCallResults
vezenovm 3284b99
resolve merge conflicts
vezenovm 83605d8
start switching order of evaluation of resolve_assert_message as to n…
vezenovm 7fdf5be
Merge branch 'master' into mv/assert-msg-fmtstr
vezenovm f131b96
switch order of execution
vezenovm f253cd2
update parser tests and some cleanup
vezenovm e149ede
cargo clippy
vezenovm 8eb77ad
add back debug logs lines that were removed
vezenovm d0234d2
added compile failure tests
vezenovm 0f0cbe0
move transformation of call expression to resolution rather than have…
vezenovm 845e269
Merge branch 'master' into mv/assert-msg-fmtstr
vezenovm 85a40c4
handle parser rrs
vezenovm e42cb9c
fix create_mock
vezenovm ec87b69
move to non-optional expr
vezenovm bc317a0
clippy
vezenovm 9284490
clear out circuits w/ only brillig
vezenovm 4333637
update compile_empty_success test
vezenovm 9bc00eb
fix format
vezenovm f3083c8
cleanup resolve assert message
vezenovm 185aba1
update debugger handle_foreign_call
vezenovm 27ea4d9
cargo fmt
vezenovm 0c7ff78
fix frontend tests, but acvm_js tests still failing
vezenovm 720e470
Update tooling/nargo/src/ops/execute.rs
vezenovm 8698083
some initial switches to putting resolve_assert_message under a predi…
vezenovm 8458f83
Merge remote-tracking branch 'origin/mv/assert-msg-fmtstr' into mv/as…
vezenovm 1a3ea85
accept changes
vezenovm 480297a
missing merge edit
vezenovm 8de9539
remove unused imports
vezenovm 86cab04
remove old dbg
vezenovm 7afc317
switch assert_message call instruction to be atomic with SSA and add …
vezenovm 55de71f
cleanup decompose_constrain
vezenovm 3ebc34a
some comment cleanup
vezenovm c0d3403
remove old comments
vezenovm 49e7118
resolve merge conflicts
vezenovm 9944a83
cargo fmt
vezenovm 282a7d7
reorganize codegen of constrain error
vezenovm 4cd9255
defunc cleanup
vezenovm 9796a1b
cleanup
vezenovm 8579816
cleanup brillig assert message gen:
vezenovm 5170bc1
Merge branch 'master' into mv/assert-msg-fmtstr
vezenovm ae06f9e
macro errs update
vezenovm 4e4d273
add an expect func to option
vezenovm 4fdf3a9
add option expect method
vezenovm 89929ff
add comment to expect
vezenovm e516c27
leave option expect for separate branch
vezenovm b53a2aa
resovle conflicts w/ parent
vezenovm 0c77f8f
Update compiler/noirc_evaluator/src/ssa/opt/defunctionalize.rs
vezenovm 5cd9335
fixup git suggestion
vezenovm c8170f3
use AssertMessageMacro when disable_macros is enabled
vezenovm ae23e5c
chore: reduce diff and fix clippy warnings
TomAFrench 5e0e198
chore: reduce diff
TomAFrench fa6b50c
format constrain err better
vezenovm f5598fe
Update compiler/noirc_evaluator/src/ssa/ssa_gen/mod.rs
vezenovm d3c2f0e
cargo fmt
vezenovm bb34b45
fix old test updates
vezenovm 819c95a
remove old comment
vezenovm c62bec8
reduce diff
vezenovm 7eb7581
Merge branch 'mv/assert-msg-fmtstr' into mv/option-expect
vezenovm 4eaaea9
change to only fmtstr accepted for Option expect
vezenovm 7c1778f
document expect
vezenovm 7f174dc
update assert docs
vezenovm e06ec4b
use f-string for expect in option compile_success_empty test
vezenovm 2dc4805
Merge branch 'mv/assert-msg-fmtstr' into mv/option-expect
vezenovm 7b2ca25
merge conflicts
vezenovm 4e3aa17
reduce diff
vezenovm 335f250
remove unnecessary prover files
vezenovm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| x = "5" | ||
| y = "10" |
1 change: 1 addition & 0 deletions
1
test_programs/compile_failure/brillig_assert_msg_runtime/Prover.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| x = "5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [package] | ||
| name = "option_expect" | ||
| type = "bin" | ||
| authors = [""] | ||
| compiler_version = ">=0.23.0" | ||
|
|
||
| [dependencies] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| fn main() { | ||
| let inner_value = 3; | ||
| let none = Option::none(); | ||
| let some = Option::some(inner_value); | ||
|
|
||
| assert(some.expect(f"Should have the value {inner_value}") == 3); | ||
| assert(none.expect(f"Should have the value {inner_value}") == 3); | ||
| } |
7 changes: 7 additions & 0 deletions
7
test_programs/compile_failure/option_expect_bad_input/Nargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [package] | ||
| name = "option_expect_bad_input" | ||
| type = "bin" | ||
| authors = [""] | ||
| compiler_version = ">=0.23.0" | ||
|
|
||
| [dependencies] |
6 changes: 6 additions & 0 deletions
6
test_programs/compile_failure/option_expect_bad_input/src/main.nr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| fn main() { | ||
| let inner_value = 3; | ||
| let some = Option::some(inner_value); | ||
|
|
||
| assert(some.expect("Should have the value {inner_value}") == 3); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.