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

feat: improvements to test_extern command #3075

Merged
merged 7 commits into from
Apr 24, 2024
Merged

feat: improvements to test_extern command #3075

merged 7 commits into from
Apr 24, 2024

Conversation

kim-em
Copy link
Collaborator

@kim-em kim-em commented Dec 15, 2023

Two improvements suggested by @digama0 after the initial PR was merged.

  • Allow testing implemented_by attributes as well.
  • Use DecidableEq rather than BEq for stricter testing.

@kim-em kim-em added the awaiting-review Waiting for someone to review the PR label Dec 15, 2023
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Dec 15, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented Dec 15, 2023

  • ❗ Mathlib CI will not be attempted unless you rebase your PR onto the 'nightly' branch. (2023-12-15 02:39:21)
  • ❗ Std/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 41d310ab39c8d211fcdab0c00ef8fc7796ffece9 --onto 62cdb51ed5b9d8487877d5a4adbcd4659d81fc6a. (2024-04-22 07:18:59)
  • ❗ Std/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 94360a72b378525626afe72d0d50963208cc4c26 --onto 62cdb51ed5b9d8487877d5a4adbcd4659d81fc6a. (2024-04-24 03:34:10)

test_extern.lean:7:0-7:17: error: test_extern: HAdd.hAdd does not have an @[extern] attribute
test_extern.lean:9:0-9:86: error: native implementation did not agree with reference implementation!
test_extern.lean:6:0-6:17: error: test_extern: HAdd.hAdd does not have an @[extern] attribute or @[implemented_by] attribute
test_extern.lean:8:0-8:86: error: native implementation did not agree with reference implementation!
Compare the outputs of:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does the error message say to compare the outputs instead of showing what the outputs are? I think it should actually print the outputs (when possible), because these issues can be OS dependent so it's important to know what value was actually produced in CI since they may not reproduce locally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a good suggestion, but I'd prefer not to take it on now. Happy to either open an issue, let you do that. Or, for that matter, to accept commits on this PR, or promise to review a new PR! :-)

@kim-em kim-em enabled auto-merge April 22, 2024 07:01
@digama0
Copy link
Collaborator

digama0 commented Apr 22, 2024

Another improvement I found a need for in #3961 was to allow specifying the desired result which both versions of the function should evaluate to.

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc April 24, 2024 03:49 Inactive
@kim-em kim-em added this pull request to the merge queue Apr 24, 2024
Merged via the queue into master with commit 41697dc Apr 24, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review Waiting for someone to review the PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants