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

Deleting a test file makes me restart everything - solution idea! #90

Open
gleenn opened this issue Jul 31, 2024 · 3 comments
Open

Deleting a test file makes me restart everything - solution idea! #90

gleenn opened this issue Jul 31, 2024 · 3 comments

Comments

@gleenn
Copy link

gleenn commented Jul 31, 2024

Use the template below when reporting bugs. Please make sure the
problem is still a problem with the latest version of
lein-test-refresh before submitting.

What version of lein-test-refresh?
0.25.0

What version of Leiningen or Clojure (for deps.edn projects)?
2.9.8

Can you recreate the issue with a minimal project?
Yes, super easy, just start a test runner with any test file, and then delete the file. Now it throws an irrecoverable exception where you must restart the test runner.

Simple solution suggestion hopefully:
Make it so hitting "enter" in this state will force a reload of the watched/loaded files so I don't have to restart my very slow suite runner :)

@jakemcc
Copy link
Owner

jakemcc commented Aug 2, 2024

Yeah, this is a definite pain point that I've never felt came up often enough to warrant figuring out a solution besides quit + restart. test-refresh itself leans heavily on tools.namespace for doing the reloading.

I'll try to spend some time digging into this. Maybe there is some way to fully unload and try again.

@jakemcc
Copy link
Owner

jakemcc commented Aug 4, 2024

I thought this would be easy to reproduce but I've failed to recreate a problem with deleting files while lein-test-refresh is running that weren't actual problems (such as a require referencing the just deleted namespace).

I recall there is some problem with deleting files but am actually stumped on recreating this problem. If you can create a sample project with steps to reproduce, I'm willing to take a shot at looking into fixing it (though, I think this is a problem I've punted on fixing before due to the relative rarity of someone deleting files and the solution being "just restart the test runner", so I'm lacking some confidence that it is an easy fix.)

@gleenn
Copy link
Author

gleenn commented Aug 5, 2024

When I have some time I will try and make a little example to repro. Thanks for responding back quickly and love the tool overall! It's saved me countless hours waiting for larger projects to boot up!

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

No branches or pull requests

2 participants