-
-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fix is strictly simpler than that suggested in #1776 (comment). It has the advantage of being much more robust. I partially implemented the suggested fix, and witnessed the following two issues. First, full "macroexpand" does not leave a recognizable `deftest` form; it generally leaves a `(def test-... (fn [] ...))` sexp. That implies that a recursive macroexpansion would be required, with each step of the recursion checking for a recognized form. Second, even recognizing such a form is tricky, because the expansion may refer to deftest in an aliased namespace (e.g., `t/deftest` or `clojure.test/deftest` rather than bare `deftest`). One could then try to identify possible namespaces using the current environment, but this is getting complicated. Therefore, I think it better to have the user configure their environment to help them solve this problem. (And, of course, future work can implement the full macroexpansion approach.)
- Loading branch information
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters