About me
- Freelance Clojure Developer
- ClojureScript
- Clojure
- Re-natal
- Sales
- Web
- https://scrapbox.io/iku000888-notes/
- https://twitter.com/iku000888
- https://github.com/iku000888
clj and deps.edn
Ikuru K
Agenda
- What is clj?
- Problems description
- deps.edn
- It’s Coming
- vs Leiningen
- Using in project
- Good Parts
- Problems
- Tradeoffs
What is clj?
- Command line program
- Clojure REPL/Run Script
- Set up classpath
- Download mvn artifacts
- git repos as dependency
- Developed and maintained by
Clojure Team
- Mac Installer, Linux Installer
Problem description
2016 'spec-ulation' Rich Hickey
2017 ‘Dependency Heaven’ Alex Miller
- Breaking change = require more, provide less
- NEVER do that
- Levels:
- Function arguments, return values
- Namespaces
- Artifacts(i.e. JAR)
- Possibility of namespace conflict
- Semvar is broken, but the rule is applied
in dependency resolution
- Git is awesome, but ignored. Should be
used more
deps.edn
- Clj picks up dependency from deps.edn file
{:deps
{time-lib {:local/root "/path/to/time-lib"}}}
{:deps
{github-yourname/time-lib
{:git/url "https://github.com/yourname/time-lib" :sha
"04d2744549214b5cba04002b6875bdf59f9d88b6"}}}
Coming
Coming
Coming
https://github.com/borkdude/balcony/master/ba
lcony.clj
Coming
cider-jack-in works
vs Leiningen
clj lein
Windows WIP yes(?)
age new legacy
Extend via Dependency & script Plugins
Git lib support yes Via plugin(?)
Private mvn repo Bleeding edge Established
Deploy to clojars no lein deploy clojars
Check out local directory yes yes
good
- Multi repo development is a breeze
- No artifact deployment
- No need to automate artifact deployment
- No need to manage private nexus
repositories
- One liners
problems
- JGit picks up wrong key from ssh-agent
- eval $(ssh-agent)
Monorepo possible
https://github.com/iku000888/deps-edn-monorep
-demo
Tools less relevant with clj
- boot
- dependency & task as script
- clj can do and better
- Less popular
- inlein
- Dependency and standalone script
Conclusion
- clj+deps.edn = simple & focused
- Starting Clojure?
- Start with clj+deps.edn
- New project?
- Use clj + deps.edn
- Library Author?
- Use leiningen
- Using Leiningen?
- Feel free to migrate to clj
- Unless there is something lein
specific you rely on

clj and deps.edn

  • 1.
    About me - FreelanceClojure Developer - ClojureScript - Clojure - Re-natal - Sales - Web - https://scrapbox.io/iku000888-notes/ - https://twitter.com/iku000888 - https://github.com/iku000888
  • 2.
  • 3.
    Agenda - What isclj? - Problems description - deps.edn - It’s Coming - vs Leiningen - Using in project - Good Parts - Problems - Tradeoffs
  • 4.
    What is clj? -Command line program - Clojure REPL/Run Script - Set up classpath - Download mvn artifacts - git repos as dependency - Developed and maintained by Clojure Team - Mac Installer, Linux Installer
  • 5.
    Problem description 2016 'spec-ulation'Rich Hickey 2017 ‘Dependency Heaven’ Alex Miller - Breaking change = require more, provide less - NEVER do that - Levels: - Function arguments, return values - Namespaces - Artifacts(i.e. JAR) - Possibility of namespace conflict - Semvar is broken, but the rule is applied in dependency resolution - Git is awesome, but ignored. Should be used more
  • 6.
    deps.edn - Clj picksup dependency from deps.edn file {:deps {time-lib {:local/root "/path/to/time-lib"}}} {:deps {github-yourname/time-lib {:git/url "https://github.com/yourname/time-lib" :sha "04d2744549214b5cba04002b6875bdf59f9d88b6"}}}
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
    vs Leiningen clj lein WindowsWIP yes(?) age new legacy Extend via Dependency & script Plugins Git lib support yes Via plugin(?) Private mvn repo Bleeding edge Established Deploy to clojars no lein deploy clojars Check out local directory yes yes
  • 12.
    good - Multi repodevelopment is a breeze - No artifact deployment - No need to automate artifact deployment - No need to manage private nexus repositories - One liners
  • 13.
    problems - JGit picksup wrong key from ssh-agent - eval $(ssh-agent)
  • 14.
  • 15.
    Tools less relevantwith clj - boot - dependency & task as script - clj can do and better - Less popular - inlein - Dependency and standalone script
  • 16.
    Conclusion - clj+deps.edn =simple & focused - Starting Clojure? - Start with clj+deps.edn - New project? - Use clj + deps.edn - Library Author? - Use leiningen - Using Leiningen? - Feel free to migrate to clj - Unless there is something lein specific you rely on