-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #12] Introduce feature flags to make extension of io/Coercions o…
…ptional These allow dependent libraries to use `fs` without the side-effect of extend. Otherwise one can unawarely create issues, as seen in https://github.com/clojure-emacs/clj-refactor.el/issues/508. https://clojure.org/reference/protocols#_guidelines_for_extension says: > If you don’t own the protocol or the target type, you should only extend in app (not public lib) code, and expect to maybe be broken by either owner.
- Loading branch information
Showing
2 changed files
with
19 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(ns me.raynes.fs.feature-flags | ||
"Compile-time feature flags. | ||
In order to use them: | ||
* `require` this ns before any other ns from this lib. | ||
* `alter-var-root` a given feature flag within this ns to a different, desired value | ||
* proceed to `require` the rest of this library.") | ||
|
||
(def extend-coercions? | ||
"Should the clojure.java.io/Coercions protocol be extended by this library?" | ||
true) |