As it stands there is no way for the Clojure CLI to extend the reader with tagged literals for use within arguments or deps.edn.
I propose that some mechanism for this should be added, which can enable additional tooling to use the intended use case of putting data within aliases in deps.edn where they otherwise would be restricted by data readers.
An example of a current project which would benefit from this is Codox, which has support for regular expression based filters on namespaces to be documented, however as the default EDN reader does not include support for regular expressions, this feature is unusable.
If tagged literals support was added to the Clojure CLI, this problem could be resolved by a
#jvm/regex tag or similar being added for that usecase.
If this feature is added it should also be considered what happens when a deps.edn file or argument to the CLI includes a tagged literal which is not bound in the current invocation.
There are multiple ways that support could be added to the CLI, and below I present a few of my own thoughts on the matter, but this is not a request for this to be the way that the feature is implemented, just some ideas.
- Tagged literals could be added via aliases in the user deps.edn which are then used by default in all projects
- Tagged literals could be specified by an environment variable, which users can then set with direnv or other tooling