Gracefully handle circular dependencies in watch mode#373
Gracefully handle circular dependencies in watch mode#373fdserr merged 1 commit intolambdaisland:mainfrom
Conversation
assoc undo tweak
Codecov ReportBase: 75.47% // Head: 75.26% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #373 +/- ##
==========================================
- Coverage 75.47% 75.26% -0.22%
==========================================
Files 51 51
Lines 2732 2745 +13
Branches 255 257 +2
==========================================
+ Hits 2062 2066 +4
- Misses 510 517 +7
- Partials 160 162 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
When I test against your reproduction (thanks again for that), it works when I start watch mode without a circular dependency add one, and then remove one, but if I start it with a circular dependency and then remove it, I get this: |
|
Couldn't reproduce, I tried removing the cycle in either file and both seem to have similar output: |
|
Hmm, I'm testing on Ubuntu Linux 22.04, Clojure 1.11.1, and Java 13. I can try poking around to see what might be interfering with loading the test namespace. |
|
Works as expected: watch keeps running when cycling on/off a circular dependency. |
Close #372
This keeps watch mode active even in the presence of circular dependencies. Basically, a tool.namespace cyclic deps error is now treated as a normal compilation error from the user's perspective.
I tested this successfully against the minimal reproduction: frenchy64/kaocha-circular-watch-reprod#1
I tried this this on a larger project and first impressions are positive. I let the tests run through once, then intentionally added a circular dep to one of the core namespaces (depended on by dozens of files), then removed it. It behaved as expected and the process was not killed.
Full transcript