leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
cgore 2021-02-22T15:03:46.003600Z

😞

cgore 2021-02-22T15:04:40.004700Z

Although the more that I look at my specific problem, I'm not sure I really even want to do this, it's being used to generate some classes magically at compile time, instead I probably want to do the same but whenever just from the repl.

2021-02-22T16:06:10.005200Z

@cgore you can do things like generate classfiles prior to other lein things - typically via :prep-tasks

2021-02-22T16:06:29.005600Z

still though, you’d be using something external - like perhaps maven if that’s the plugin in question - ideally you’d have something not coupled directly with maven

2021-02-22T16:07:06.005900Z

for example - often used example is protobuf - and you can see that here https://github.com/technomancy/leiningen/blob/2.9.5/sample.project.clj#L263-L266

gklijs 2021-02-25T05:57:55.013700Z

To prevent using maven, you can probably just use the Java dependency the plugin uses, and use that with interop. That's what I did to generate Avro classes, https://github.com/gklijs/bob2021/blob/308316f525391ae2a0f8865e2958aef2c54692f9/topology/env/dev/clj/nl/openweb/dev/avro_compile.clj#L55.

👍 1
2021-02-22T16:07:33.006400Z

so these steps would run before your lein task and you could get generated classfiles onto your classpath ahead of time etc.

quoll 2021-02-22T16:31:03.009600Z

Hi. I’m wondering if there is a typical way that projects build modules. I’ve seen lein-modules and it seems reasonable, but there’s a problem I’m working through on it, and it occurred to me that maybe there was something else that people tend to use instead. e.g. leiningen-core is a project inside the leiningen project, and leiningen refers to it via :dependencies, :source-paths and in the :dev profile it’s added to :resource-paths