-
Notifications
You must be signed in to change notification settings - Fork 69
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
Tests fail if run from under a target directory #346
Comments
Thanks for the heads up!
Honestly I don't think there's a legitimate use case for this. refactor-nrepl intentionally excludes anything residing under Therefore I'd recommend to run the test suite under a more realistic setting (which, can be argued, is an improvement for rewrite-clj's canary testing, i.e. not merely a workaround). Cheers - V |
Thanks for the reply @vemv.
I find that folks put stuff wherever they put stuff. My primary goal was to be a good citizen by alerting you to a potentially larger problem for your user base. |
Yes, understood and appreciated 👍 Have a great one! |
Who knows, poor old Timothy Arget, or Ryan Emert Steven Ources might have usernames that prohibit the use of refactor-nrepl! (more tongue in cheek than making a point, but still making a bit of a point). |
That's a good call, |
All my best arguments are jokes. 🙂 |
Upgrade to current version of kaocha. test-libs - Upgraded refactor-nrepl to v3. After much head-scratching I discovered that v3 of refactor-nrepl cannot be run anywhere under a target directory. As a good citizen, raised: clojure-emacs/refactor-nrepl#346 The work-around is that test-libs work no longer happens under target, we now do the work under ./test-libs-work/. This pollutes the root dir a bit, but a tidy root dir is less important to me than testing against libs. - Upgraded rewrite-edn to current release Other changes to test-libs script: - it is now a fatal error if our patching produces no changes - searches for version strings now appropriately match versions with qualifiers
Another idle thought: I suppose it might be odd, but a CI server could plunk your code wherever too. |
Fixes #346, particularly this nuance: #346 (comment)
Fixes #346, particularly this nuance: #346 (comment)
Fixes #346, particularly this nuance: #346 (comment)
Refactor-nrepl has addressed clojure-emacs/refactor-nrepl#346 which allows us to move our test-libs work back under our general purpose build target/ dir.
Expected behavior
As part of rewrite-clj canary testing, I extract a copy of refactor-nrepl source code somewhere beneath rewrite-clj's
target
directory.When I run
I should see all tests pass.
Actual behavior
I see the following test failures:
If I instead don't have
target
in my path all tests pass.Steps to reproduce the problem
You will see tests fail, but if you then:
You will see tests pass.
Environment & Version information
clj-refactor.el and refactor-nrepl version information
Running tests from v3.0.0 tag clone of this repository.
CIDER version information
n/a
Leiningen or Boot version
Emacs version
n/a
Operating system
macOS 10.15.7
Diagnosis
This was working for refactor-nrepl 2.5.1.
I think the issue is likely caused by new classpath exclusion techniques:
refactor-nrepl/src/refactor_nrepl/core.clj
Lines 62 to 72 in a3f9de8
which excludes any path that contains
target
orresources
(I'm guessing that.gitlibs
is less important).I raised this issue in case it might be affecting your broader user base.
If it is only affecting my particular use case, I can find a work-around for rewrite-clj canary testing.
The text was updated successfully, but these errors were encountered: