Fork me on GitHub
#tools-deps
<
2023-01-19
>
respatialized21:01:38

From within a running Clojure process, is there a way to detect if a specific alias is “enabled?”

Alex Miller (Clojure team)21:01:41

indirectly, probably. presumably you care about the effect, probably on the classpath, which you can see via (System/getProperty "java.class.path")

dpsutton22:01:28

:jvm-opts ["-Dsome.property=some-flog"] and then check it with that. I think we do that with

:ci
  {:jvm-opts ["-Dci=TRUE"]}

nice 2
respatialized22:01:57

that's a good way to do it; the use case I'm imagining is something like feature flags and custom java properties is a good way to ensure that capability is portable regardless of how the JVM is launched