Fork me on GitHub
#tools-build
<
2023-01-24
>
seancorfield07:01:45

I am slowly retiring my build-clj wrapper. next.jdbc no longer uses it: https://github.com/seancorfield/next-jdbc/blob/develop/build.clj HoneySQL no longer uses it: https://github.com/seancorfield/honeysql/blob/develop/build.clj Over the next week or two I plan to remove it from the projects generated by deps-new so that they have more "standard" build.clj files.

borkdude10:01:19

neil add build also generates a standard build.clj file in an existing project (and adds the deps in a :build alias if it doesn't exist yet), including deps-deploy which is lazily loaded. If you have any suggestions for that generated build.clj feel free to make those! The version is retrieved from :aliases :neil :project :version if it's there, which gives a bit more declarative info in the deps.edn. If deps.edn had a widely adapted convention for this, I'd use that. :name is in there too for the library name.

roklenarcic18:01:37

So if we’re using build-clj what should we do? Copy source of functions we were calling into each build.clj?

seancorfield18:01:53

Per build-clj's README: I would strongly advise you learn to use raw tools.build instead for anything beyond the simplest build script needs!

seancorfield18:01:27

You don't want to copy the build-clj functions -- they are far more complex than you will need for any build.

seancorfield18:01:04

The readme links to https://clojure.org/guides/tools_build which has "raw tools.build" examples for library and application JARs.

seancorfield18:01:56

We have stopped using build-clj at work and as soon as I've removed it from the deps-new templates, I'll likely archive the repo.

roklenarcic18:01:07

Got it, thanks 🙏