Skip to content

Conversation

@mak-kirkland
Copy link
Contributor

To only use the last stored arguments if
RUSTIC-CARGO-USE-LAST-STORED-ARGUMENTS is non-nil.

Otherwise once we run only a single test (e.g via
RUSTIC-CARGO-CURRENT-TEST), then trying to run all tests will still only run the last current test.

To only use the last stored arguments if
RUSTIC-CARGO-USE-LAST-STORED-ARGUMENTS is non-nil.

Otherwise once we run only a single test (e.g via
RUSTIC-CARGO-CURRENT-TEST), then trying to run all tests will still
only run the last current test.
@psibi
Copy link
Member

psibi commented Jan 11, 2025

@SiberzK Thanks for the PR!

Otherwise once we run only a single test (e.g via
RUSTIC-CARGO-CURRENT-TEST), then trying to run all tests will still only run the last current test.

I tried to test the behavior that you have specified, but I'm unable to reproduce. It could be because I have mis-understood it. Can you give me a reproducible steps of the issue that this PR is trying to fix it ?

@mak-kirkland
Copy link
Contributor Author

@SiberzK Thanks for the PR!

Otherwise once we run only a single test (e.g via
RUSTIC-CARGO-CURRENT-TEST), then trying to run all tests will still only run the last current test.

I tried to test the behavior that you have specified, but I'm unable to reproduce. It could be because I have mis-understood it. Can you give me a reproducible steps of the issue that this PR is trying to fix it ?

  1. Make sure rustic-cargo-use-last-stored-arguments is set to NIL.
  2. Call rust-cargo-test. This will run all tests.
  3. Move cursor to within a test definition and call rustic-cargo-current-test. This will run only a single test.
  4. Call rust-cargo-test. This continues to run only that one test, whereas before (in step 2), it was running all tests.

Since rustic-cargo-use-last-stored-arguments was set to NIL, calling rust-cargo-test should respect that.

Copy link
Member

@psibi psibi left a comment

Choose a reason for hiding this comment

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

Thanks! I can reproduce it. Do you think you can add tests for this ? I'm merging this nonetheless.

@psibi
Copy link
Member

psibi commented Jan 12, 2025

I'm merging this nonetheless.

I spoke soon, can you see why the tests are failing ?

To use `rustic-default-test-arguments`.

This accompanies commit 8ce8514,
fixing behaviour where even if
`rustic-cargo-use-last-stored-arguments` is set to NIL, running
`rustic-cargo-test` would still use the last stored arguments.
@mak-kirkland
Copy link
Contributor Author

mak-kirkland commented Jan 12, 2025

I'm merging this nonetheless.

I spoke soon, can you see why the tests are failing ?

Hey, I've done some digging and found that the test was changed in commit de8ec9f to no longer use the default arguments.

This was done to "fix" the test after 1280136, which introduced the bug this PR attempts to fix. In fact this change was simply hiding the bug.

I've pushed a 2nd commit to this PR reverting the relevant part of de8ec9f and restoring the original behaviour.

rustic-cargo-test-test should now pass 👍

Copy link
Member

@psibi psibi left a comment

Choose a reason for hiding this comment

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

Thanks!

@psibi psibi merged commit 1a38bb4 into emacs-rustic:main Jan 12, 2025
3 checks passed
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.

2 participants