https://github.com/seancorfield/deps-new -- A new, simpler alternative to clj-new -- updated app and lib templates to use tools.build (instead of depstar)
clojure -Ttools install com.github.seancorfield/deps-new '{:git/tag "v0.2.0"}' :as newMaybe a known issue, but noticed that write-pom throws an NPE if :lib is not qualified.
Thx
But you should qualify :)
Yes, I know, and I will. 🙂
tools.build v0.4.1 452db44 now available: • Add initial parameter spec checking
I'll give things a few more days to settle before I update build-clj to pick up this version (just an FYI for anyone using write-pom via one of the tasks in build-clj).
@flowthing ^^ checks lib and path params, more to do in the future
Awesome, thanks!
Tested with :lib — looks good. 👍
I've also converted one project from depstar to tools.build/uber today 💪😉🚀
Thank you @borkdude -- I hope everyone else will follow 🙂
A user just pointed out a subtle difference between depstar and the "default" approach to building an uberjar with tools.build: by default, depstar created a basis that was essentially the -Srepro version so that you had repeatable builds across multiple environments (i.e., ignoring the user deps.edn). The "default" basis created in tools.build does include the user deps.edn per the docs and the http://clojure.org guide. That feels like a trap for the unwary since you might have different :mvn/repos in your user deps.edn than your source pom.xml, for example, and the generated pom.xml from write-pom with a "default" basis would overwrite those in the source pom.xml with those from the user deps.edn.
Not sure whether the default for create-basis should change (`:user nil` so you have to opt-in with :user :standard) or whether this is just something the docs should point out -- and of course now I'm wondering if build-clj should default to a "repro" style basis that users could override to include user deps.edn or whether that would be too confusing.
It's also perhaps a bit odd that the guide has (b/create-basis {:project "deps.edn"}) when that's the default anyway (well, I guess technically (b/create-basis {:project :standard}) would be more "default" 🙂 ).
yeah, I went back and forth on this. the tools.build create-basis wraps the tools.deps create-basis, and I think using the user deps.edn is right there to mimic clj. but in tools.build, the perspective is different and I think it would make sense to omit user deps.edn
in the name of reproducible builds, I think that make sense
I would like to see the user's deps.edn ignored too, to aid in creating reproducible builds 🙂
tools.build v0.5.0 7d77952 now available: • create-basis - do not include user deps.edn by default
OK, now build-clj needs to be updated! 😆 But I do need to tweak the uber task first around required parameters! Thanks for that change Alex -- makes a lot of sense!
Thank you Alex 🙂
When migrating to tools.build from depstar are folks making their git committed pom.xmls more terse?
Since tools.build generates a new pom.xml to a work dir, I suppose the pom.xml I commit to git could act like more of a template and leave out <groupId>, <artifactId>, <version>, maybe <scm>-> <tag>, and <dependencies>?
I love that these things are all separate libraries so they can be developed and released separately ;)
@lee Yup, I've taken some things out of the source pom.xml under version control in some of my libraries now.
Very interesting! Thanks @seancorfield!
io.github.seancorfield/build-clj {:git/tag "v0.3.0" :git/sha "fb11811"} available:
• updates tools.build to v0.5.0 for the repro basis by default
• allows :lib to be omitted from uber if you pass :uber-file