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

Fix panic when throwing arity mismatch #477

Merged
merged 4 commits into from
Dec 6, 2024
Merged

Conversation

yihozhang
Copy link
Collaborator

@yihozhang yihozhang commented Dec 5, 2024

Fixes #463

After this change:

❯ echo  "(+ 1 2 3)" | cargo run --release
    Finished `release` profile [optimized] target(s) in 0.20s
     Running `target/release/egglog`
[INFO ] Welcome to Egglog! (build: 0.3.0_2024-12-05_a060316)
[ERROR] All alternative definitions considered failed
      In 1:4-4 of <unnamed.egg>: 1
     Expect expression 1 to have type String, but get type i64
      In 1:1-9 of <unnamed.egg>: (+ 1 2 3)
    Arity mismatch, expected 2 args: (+ 1 2 3)
      In 1:1-9 of <unnamed.egg>: (+ 1 2 3)
    Arity mismatch, expected 2 args: (+ 1 2 3)
      In 1:1-9 of <unnamed.egg>: (+ 1 2 3)
    Arity mismatch, expected 2 args: (+ 1 2 3)

Edit: also closes #310

@yihozhang yihozhang requested a review from a team as a code owner December 5, 2024 02:14
@yihozhang yihozhang requested review from FTRobbin and removed request for a team December 5, 2024 02:14
Copy link

codspeed-hq bot commented Dec 5, 2024

CodSpeed Performance Report

Merging #477 will not alter performance

Comparing yihozhang-fix-arity-panic (3a00eb2) with yihozhang-fix-arity-panic (cbedde5)

Summary

✅ 8 untouched benchmarks

@yihozhang yihozhang requested a review from oflatt December 5, 2024 02:43
Copy link
Member

@oflatt oflatt left a comment

Choose a reason for hiding this comment

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

Thanks!

@oflatt oflatt merged commit 07fde0e into main Dec 6, 2024
9 checks passed
@saulshanabrook saulshanabrook deleted the yihozhang-fix-arity-panic branch December 6, 2024 15: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.

Bad error message for (+ 1 2 3) Type errors for set not captured by the current type checker
2 participants