Fork me on GitHub
#leiningen
<
2019-04-09
>
Nick18:04:21

In a leiningen plugin, can I see a list of which profiles have been enabled?

mikerod20:04:01

@nick.matthews if you just want to see from the cmd line, I think it’ll print if you use DEBUG=true lein ...

mikerod20:04:18

if you are working on a plugin, you can get access to active profiles on the given project

Nick20:04:29

working on making changes to an existing internal plugin, so trying to figure out how to access the activated plugins

mikerod20:04:38

leiningen.core.project/profile-annotations maybe can give you the info you want

mikerod20:04:29

this should return the :include-profiles of the project meta. I think that’s what you want, not the :active-profiles here. I forget what :active-profiles.

mikerod20:04:58

so it depends on if you want pre-expanded or post-expanded when composites are involved

Nick20:04:46

thanks, that’s helpful.

👍 4
Nick20:04:47

Still trying to see if I can refactor this plugin such that I don’t have to apply magic to get the profiles to carry through to this stage. There’s a bunch of project file rewriting and reading going on.