;; -*- comment-column: 80; -*- {:deps ;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;; !! PLEASE KEEP THESE ORGANIZED ALPHABETICALLY !! ;; !! AND ADD A COMMENT EXPLAINING THEIR PURPOSE !! ;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! {aleph/aleph {:mvn/version "0.4.6" ; Async HTTP library; WebSockets :exclusions [org.clojure/tools.logging]} amalloy/ring-buffer {:mvn/version "1.3.1" ; fixed length queue implementation, used in log buffering :exclusions [org.clojure/clojure org.clojure/clojurescript]} amalloy/ring-gzip-middleware {:mvn/version "0.1.4"} ; Ring middleware to GZIP responses if client can handle it bigml/histogram {:mvn/version "4.1.3"} ; Histogram data structure buddy/buddy-core {:mvn/version "1.10.1" ; various cryptograhpic functions :exclusions [commons-codec/commons-codec org.bouncycastle/bcpkix-jdk15on org.bouncycastle/bcprov-jdk15on]} buddy/buddy-sign {:mvn/version "3.4.1"} ; JSON Web Tokens; High-Level message signing library cheshire/cheshire {:mvn/version "5.10.1"} ; fast JSON encoding (used by Ring JSON middleware) clj-http/clj-http {:mvn/version "3.12.3" ; HTTP client :exclusions [commons-codec/commons-codec commons-io/commons-io slingshot/slingshot]} clojurewerkz/quartzite {:mvn/version "2.1.0" ; scheduling library :exclusions [c3p0/c3p0]} colorize/colorize {:mvn/version "0.1.1" ; string output with ANSI color codes (for logging) :exclusions [org.clojure/clojure]} com.cemerick/friend {:mvn/version "0.2.3" ; auth library :exclusions [commons-codec/commons-codec net.sourceforge.nekohtml/nekohtml org.apache.httpcomponents/httpclient ring/ring-core slingshot/slingshot]} com.clearspring.analytics/stream {:mvn/version "2.9.8" ; Various sketching algorithms :exclusions [it.unimi.dsi/fastutil org.slf4j/slf4j-api]} com.draines/postal {:mvn/version "2.0.4"} ; SMTP library com.google.guava/guava {:mvn/version "30.1.1-jre"} ; dep for BigQuery, Spark, and GA. Require here rather than letting different dep versions stomp on each other — see comments on #9697 com.h2database/h2 {:mvn/version "1.4.197"} ; embedded SQL database com.taoensso/nippy {:mvn/version "3.1.1"} ; Fast serialization (i.e., GZIP) library for Clojure com.vladsch.flexmark/flexmark {:mvn/version "0.62.2"} ; Markdown parsing commons-codec/commons-codec {:mvn/version "1.15"} ; Apache Commons -- useful codec util fns commons-io/commons-io {:mvn/version "2.11.0"} ; Apache Commons -- useful IO util fns commons-validator/commons-validator {:mvn/version "1.7" ; Apache Commons -- useful validation util fns :exclusions [commons-beanutils/commons-beanutils commons-digester/commons-digester commons-logging/commons-logging]} compojure/compojure {:mvn/version "1.6.2" ; HTTP Routing library built on Ring :exclusions [ring/ring-codec]} dk.ative/docjure {:mvn/version "1.16.0" ; excel export crypto-random/crypto-random {:mvn/version "1.2.1"} ; library for generating cryptographically secure random bytes and strings :exclusions [org.apache.poi/poi org.apache.poi/poi-ooxml]} environ/environ {:mvn/version "1.2.0"} ; env vars/Java properties abstraction hiccup/hiccup {:mvn/version "1.0.5"} ; HTML templating honeysql/honeysql {:mvn/version "1.0.461" ; Transform Clojure data structures to SQL :exclusions [org.clojure/clojurescript]} instaparse/instaparse {:mvn/version "1.4.10"} ; Make your own parser io.forward/yaml {:mvn/version "1.0.9" ; Clojure wrapper for YAML library SnakeYAML. Don't upgrade yet, new version doesn't support Java 8 (see https://github.com/owainlewis/yaml/issues/37) :exclusions [org.clojure/clojure org.flatland/ordered org.yaml/snakeyaml]} javax.xml.bind/jaxb-api {:mvn/version "2.4.0-b180830.0359"} ; add the `javax.xml.bind` classes which we're still using but were removed in Java 11 joda-time/joda-time {:mvn/version "2.10.10"} kixi/stats {:mvn/version "0.4.4" ; Various statistic measures implemented as transducers :exclusions [org.clojure/data.avl]} me.raynes/fs {:mvn/version "1.4.6" ; Filesystem tools :exclusions [org.apache.commons/commons-compress]} medley/medley {:mvn/version "1.3.0"} ; lightweight lib of useful functions metabase/connection-pool {:mvn/version "1.1.1"} ; simple wrapper around C3P0. JDBC connection pools metabase/saml20-clj {:mvn/version "2.0.0"} ; EE SAML integration metabase/throttle {:mvn/version "1.0.2"} ; Tools for throttling access to API endpoints and other code pathways net.cgrand/macrovich {:mvn/version "0.2.1"} ; utils for writing macros for both Clojure & ClojureScript net.i2p.crypto/eddsa {:mvn/version "0.3.0"} ; ED25519 key support (optional dependency for org.apache.sshd/sshd-core) net.redhogs.cronparser/cron-parser-core {:mvn/version "3.5" ; describe Cron schedule in human-readable language :exclusions [joda-time/joda-time ; exclude joda time 2.3 which has outdated timezone information org.slf4j/slf4j-api]} net.sf.cssbox/cssbox {:mvn/version "5.0.0" ; HTML / CSS rendering :exclusions [org.slf4j/slf4j-api]} org.apache.commons/commons-compress {:mvn/version "1.21"} ; compression utils org.apache.commons/commons-lang3 {:mvn/version "3.12.0"} ; helper methods for working with java.lang stuff org.apache.logging.log4j/log4j-1.2-api {:mvn/version "2.14.1"} ; apache logging framework org.apache.logging.log4j/log4j-api {:mvn/version "2.14.1"} ; add compatibility with log4j 1.2 org.apache.logging.log4j/log4j-core {:mvn/version "2.14.1"} ; apache logging framework org.apache.logging.log4j/log4j-jcl {:mvn/version "2.14.1"} ; allows the commons-logging API to work with log4j 2 org.apache.logging.log4j/log4j-liquibase {:mvn/version "2.14.1"} ; liquibase logging via log4j 2 org.apache.logging.log4j/log4j-slf4j-impl {:mvn/version "2.14.1"} ; allows the slf4j API to work with log4j 2 org.apache.poi/poi {:mvn/version "5.0.0"} ; Work with Office documents (e.g. Excel spreadsheets) -- newer version than one specified by Docjure org.apache.poi/poi-ooxml {:mvn/version "5.0.0" :exclusions [org.bouncycastle/bcpkix-jdk15on org.bouncycastle/bcprov-jdk15on]} org.apache.sshd/sshd-core {:mvn/version "2.4.0"} ; ssh tunneling and test server -- do not use 2.6.0 to 2.7.0, see metabase#18316 org.apache.xmlgraphics/batik-all {:mvn/version "1.14"} ; SVG -> image org.clojars.pntblnk/clj-ldap {:mvn/version "0.0.17"} ; LDAP client org.bouncycastle/bcpkix-jdk15on {:mvn/version "1.69"} ; Bouncy Castle crypto library -- explicit version of BC specified to resolve illegal reflective access errors org.bouncycastle/bcprov-jdk15on {:mvn/version "1.69"} org.clojure/clojure {:mvn/version "1.10.3"} org.clojure/core.async {:mvn/version "1.3.618" :exclusions [org.clojure/tools.reader]} org.clojure/core.logic {:mvn/version "1.0.0"} ; optimized pattern matching library for Clojure org.clojure/core.match {:mvn/version "1.0.0"} org.clojure/core.memoize {:mvn/version "1.0.250"} ; useful FIFO, LRU, etc. caching mechanisms org.clojure/data.csv {:mvn/version "1.0.0"} ; CSV parsing / generation org.clojure/java.classpath {:mvn/version "1.0.0"} ; examine the Java classpath from Clojure programs org.clojure/java.jdbc {:mvn/version "0.7.12"} ; basic JDBC access from Clojure org.clojure/java.jmx {:mvn/version "1.0.0"} ; JMX bean library, for exporting diagnostic info org.clojure/math.combinatorics {:mvn/version "0.1.6"} ; combinatorics functions org.clojure/math.numeric-tower {:mvn/version "0.0.4"} ; math functions like `ceil` org.clojure/tools.logging {:mvn/version "1.1.0"} ; logging framework org.clojure/tools.namespace {:mvn/version "1.1.0"} org.clojure/tools.reader {:mvn/version "1.3.6"} org.clojure/tools.trace {:mvn/version "0.7.11"} ; function tracing org.eclipse.jetty/jetty-server {:mvn/version "9.4.43.v20210629"} ; web server org.flatland/ordered {:mvn/version "1.5.9"} ; ordered maps & sets org.graalvm.js/js {:mvn/version "21.2.0"} ; JavaScript engine org.liquibase/liquibase-core {:mvn/version "3.6.3" ; migration management (Java lib) :exclusions [ch.qos.logback/logback-classic]} org.mariadb.jdbc/mariadb-java-client {:mvn/version "2.6.2"} ; MySQL/MariaDB driver org.postgresql/postgresql {:mvn/version "42.2.23"} ; Postgres driver org.slf4j/slf4j-api {:mvn/version "1.7.32"} ; abstraction for logging frameworks -- allows end user to plug in desired logging framework at deployment time org.tcrawley/dynapath {:mvn/version "1.1.0"} ; Dynamically add Jars (e.g. Oracle or Vertica) to classpath org.threeten/threeten-extra {:mvn/version "1.7.0"} ; extra Java 8 java.time classes like DayOfMonth and Quarter org.yaml/snakeyaml {:mvn/version "1.29"} ; YAML parser (required by liquibase) potemkin/potemkin {:mvn/version "0.4.5" ; utility macros & fns :exclusions [riddley/riddley]} pretty/pretty {:mvn/version "1.0.5"} ; protocol for defining how custom types should be pretty printed prismatic/schema {:mvn/version "1.1.12"} ; Data schema declaration and validation library redux/redux {:mvn/version "0.1.4"} ; Utility functions for building and composing transducers riddley/riddley {:mvn/version "0.2.0"} ; code walking lib -- used interally by Potemkin, manifold, etc. ring/ring-core {:mvn/version "1.9.4"} ; web server (Jetty wrapper) ring/ring-jetty-adapter {:mvn/version "1.9.4"} ; Ring adapter using Jetty webserver ring/ring-json {:mvn/version "0.5.1"} ; Ring middleware for reading/writing JSON automatically robdaemon/clojure.java-time {:mvn/version "0.3.3-SNAPSHOT"} ; Java 8 java.time wrapper. Fork to address #13102 - see upstream PR: https://github.com/dm3/clojure.java-time/pull/60 slingshot/slingshot {:mvn/version "0.12.2"} ; enhanced throw/catch, used by other deps stencil/stencil {:mvn/version "0.5.0"} ; Mustache templates for Clojure toucan/toucan {:mvn/version "1.15.4" ; Model layer, hydration, and DB utilities :exclusions [honeysql/honeysql org.clojure/java.jdbc org.clojure/tools.logging org.clojure/tools.namespace]} user-agent/user-agent {:mvn/version "0.1.0"} ; User-Agent string parser, for Login History page & elsewhere weavejester/dependency {:mvn/version "0.2.1"} ; Dependency graphs and topological sorting ;; dummy dependency for the Java source file(s) metabase/java-deps {:local/root "java"}} ;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;; !! PLEASE KEEP NEW DEPENDENCIES ABOVE ALPHABETICALLY ORGANIZED AND ADD COMMENTS EXPLAINING THEM. !! ;; !! *PLEASE DO NOT* ADD NEW ONES TO THE BOTTOM OF THE LIST. !! ;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :paths ["src" "shared/src" "resources" "java/target/classes"] :aliases { ;;; Local Dev & test profiles ;; for local development: start a REPL with ;; ;; clojure -A:dev (basic dev REPL that includes test namespaces) ;; clojure -A:dev:drivers:drivers-dev (dev REPL w/ drivers + tests) ;; clojure -A:dev:ee:ee-dev (dev REPL w/ EE code including tests) ;; ;; You can start a web server from this REPL with ;; ;; (require 'dev) ;; (dev/start!) :dev {:extra-deps {clj-http-fake/clj-http-fake {:mvn/version "1.0.3" :exclusions [slingshot/slingshot]} cloverage/cloverage {:mvn/version "1.2.2"} eftest/eftest {:mvn/version "0.5.9"} jonase/eastwood {:mvn/version "0.9.6"} lein-check-namespace-decls/lein-check-namespace-decls {:mvn/version "1.0.4"} ; misnomer since this works on Clojure CLI now too pjstadig/humane-test-output {:mvn/version "0.11.0"} reifyhealth/specmonstah {:mvn/version "2.0.0"} ring/ring-mock {:mvn/version "0.4.0"} talltale/talltale {:mvn/version "0.5.4"}} :extra-paths ["dev/src" "local/src" "test" "shared/test" "test_resources"] :jvm-opts ["-Dmb.run.mode=dev" "-Dmb.field.filter.operators.enabled=true" "-Dmb.test.env.setting=ABCDEFG" "-Duser.timezone=UTC" "-Dfile.encoding=UTF-8" "-Duser.language=en" ;; Exceptions that get thrown repeatedly are created without stacktraces as a performance ;; optimization in newer Java versions. This makes debugging pretty hard when working on stuff ;; locally -- prefer debuggability over performance for local dev work. "-XX:-OmitStackTraceInFastThrow" ;; prevent Java icon from randomly popping up in macOS dock "-Djava.awt.headless=true"]} ;; includes test code as source paths. Run tests with clojure -X:dev:test :test {:extra-paths ["test_config"] :exec-fn metabase.test-runner/run-tests :jvm-opts ["-Dmb.run.mode=test" "-Dmb.db.in.memory=true" "-Dmb.jetty.join=false" "-Dmb.field.filter.operators.enabled=true" "-Dmb.api.key=test-api-key" ;; Different port from normal `:dev` so you can run tests on a different server. ;; TODO -- figure out how to do a random port like in the old project.clj? "-Dmb.jetty.port=3001"]} ;; run the dev server with ;; clojure -M:run ;; clojure -M:run:drivers (include all drivers) ;; clojure -M:run:ee (include EE code) :run {:main-opts ["-m" "metabase.core"] :jvm-opts ["-Dmb.run.mode=dev" "-Djava.awt.headless=true" ; prevent Java icon from randomly popping up in macOS dock "-Dmb.jetty.port=3000"]} ;; alias for CI-specific options. :ci {:jvm-opts ["-Xmx2g" ;; normally CircleCI sets `CI` as an env var, so this is mostly to replicate that locally. "-Dci=TRUE"]} ;; include EE source code. :ee {:extra-paths ["enterprise/backend/src"]} ;; Include EE tests. ;; for ee dev: :dev:ee:ee-dev ;; for ee tests: clojure -X:dev:ee:ee-dev:test :ee-dev {:extra-paths ["enterprise/backend/test"]} ;; these aliases exist for symmetry with the ee aliases. Empty for now. :oss {} :oss-dev {} ;; for local dev -- include the drivers locally with :dev:drivers :drivers {:extra-deps {metabase/driver-modules {:local/root "modules/drivers"}}} ;; for local dev: include drivers as well as their tests. ;; ;; clojure -X:dev:drivers:drivers-dev:test ;; ;; or ;; ;; clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test (for EE) :drivers-dev {:extra-paths ["modules/drivers/bigquery/test" "modules/drivers/bigquery-cloud-sdk/test" "modules/drivers/druid/test" "modules/drivers/google/test" "modules/drivers/googleanalytics/test" "modules/drivers/mongo/test" "modules/drivers/oracle/test" "modules/drivers/presto/test" "modules/drivers/presto-common/test" "modules/drivers/presto-jdbc/test" "modules/drivers/redshift/test" "modules/drivers/snowflake/test" "modules/drivers/sparksql/test" "modules/drivers/sqlite/test" "modules/drivers/sqlserver/test" "modules/drivers/vertica/test"]} ;;; Linters ;; clojure -X:dev:ee:ee-dev:drivers:drivers-dev:namespace-checker :namespace-checker {:exec-fn metabase.linters.namespace-checker/check-namespace-decls :exec-args {:prefix-rewriting false}} ;; clojure -M:dev:ee:ee-dev:drivers:drivers-dev:check :check {:extra-deps {athos/clj-check {:git/url "https://github.com/athos/clj-check.git" :sha "518d5a1cbfcd7c952f548e6dbfcb9a4a5faf9062"}} :main-opts ["-m" "clj-check.check"]} ;; clojure -X:dev:ee:ee-dev:drivers:drivers-dev:eastwood :eastwood {:exec-fn metabase.linters.eastwood/eastwood :exec-args {;; manually specify the source paths for the time being (exclude test paths) until we fix Eastwood ;; errors in the test paths (once PR #17193 is merged) :source-paths ["src" "shared/src" "enterprise/backend/src" "modules/drivers/bigquery/src" "modules/drivers/bigquery-cloud-sdk/src" "modules/drivers/druid/src" "modules/drivers/google/src" "modules/drivers/googleanalytics/src" "modules/drivers/mongo/src" "modules/drivers/oracle/src" "modules/drivers/presto/src" "modules/drivers/presto-common/src" "modules/drivers/presto-jdbc/src" "modules/drivers/redshift/src" "modules/drivers/snowflake/src" "modules/drivers/sparksql/src" "modules/drivers/sqlite/src" "modules/drivers/sqlserver/src" "modules/drivers/vertica/src"] :add-linters [:unused-private-vars ;; These linters are pretty useful but give a few false ;; positives and can't be selectively disabled (yet) ;; ;; For example see https://github.com/jonase/eastwood/issues/193 ;; ;; It's still useful to re-enable them and run them every once ;; in a while because they catch a lot of actual errors too. ;; Keep an eye on the issue above and re-enable them if we can ;; get them to work #_:unused-fn-args #_:unused-locals] :exclude-linters [ ;; Turn this off temporarily until we finish removing ;; self-deprecated functions & macros :deprecations ;; this has a fit in libs that use Potemkin `import-vars` such ;; as `java-time` :implicit-dependencies ;; too many false positives for now :unused-ret-vals]}} ;; clojure -T:whitespace-linter :whitespace-linter {:deps {com.github.camsaul/whitespace-linter {:sha "b25716745f5875194bc38364e498d0ddda51f4b0"}} :ns-default whitespace-linter :exec-args {:paths ["./.dir-locals.el" "./deps.edn" "./package.json" "./shadow-cljs.edn" ".circleci" ".github" "bin" "enterprise" "frontend" "resources" "shared" "src" "test"] :include-patterns ["\\.clj.?$" "\\.edn$" "\\.el$" "\\.html$" "\\.json$" "\\.jsx?$" "\\.sh$" "\\.yaml$" "\\.yml$"] :exclude-patterns ["resources/i18n/.*\\.edn$" "resources/frontend_client" "resources/frontend_shared" "resources/html-entities.edn" "frontend/src/cljs" "frontend/test/metabase/lib/urls\\.unit\\.spec\\.js$" "frontend/test/metabase/lib/formatting\\.unit\\.spec\\.js$" "shared/src/metabase/shared/util/currency\\.cljc$"]}} ;; clojure -X:dev:ee:ee-dev:test:cloverage :cloverage {:exec-fn metabase.cloverage-runner/run-project :exec-args {:fail-threshold 69 :codecov? true ;; don't instrument logging forms, since they won't get executed as part of tests anyway ;; log calls expand to these :exclude-call [clojure.tools.logging/logf clojure.tools.logging/logp] :src-ns-path ["src" "enterprise/backend/src" "shared/src"] :test-ns-path ["test" "enterprise/backend/test" "shared/test"] :ns-regex ["^metabase.*" "^metabase-enterprise.*"] ;; don't instrument Postgres/MySQL driver namespaces, because we don't current run tests for them ;; as part of recording test coverage, which means they can give us false positives. ;; ;; regex literals aren't allowed in EDN. We parse them in `./test/cloverage.clj` :ns-exclude-regex ["metabase\\.driver\\.mysql" "metabase\\.driver\\.postgres"]} ;; different port from `:test` so you can run it at the same time as `:test`. :jvm-opts ["-Dmb.jetty.port=3002"]} ;;; building Uberjar ;; clojure -T:build uberjar ;; clojure -T:build uberjar :edition :ee :build {:deps {io.github.clojure/tools.build {:git/tag "v0.1.6", :git/sha "5636e61"} com.github.seancorfield/depstar {:mvn/version "2.1.278"} metabase/build.common {:local/root "bin/common"} metabase/buid-mb {:local/root "bin/build-mb"}} :ns-default build} ;;; Other misc convenience aliases ;; Profile Metabase start time with clojure -M:profile :profile {:main-opts ["-m" "metabase.core" "profile"] :jvm-opts ["-XX:+CITime" ; print time spent in JIT compiler "-XX:+PrintGC"]} ;; get the H2 shell with clojure -M:h2 ;; TODO -- this doesn't currently work correctly -- use this instead: ;; ;; java -cp `clojure -Spath` org.h2.tools.Shell :h2 {:jvm-opts ["org.h2.tools.Shell"]} ;; clojure -M:generate-automagic-dashboards-pot :generate-automagic-dashboards-pot {:main-opts ["-m" "metabase.automagic-dashboards.rules"]} ;; Start a Network REPL (nrepl) that you can connect your editor to. ;; ;; clojure -M:dev:nrepl (etc.) :nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}} :main-opts ["-m" "nrepl.cmdline"]} ;; TODO -- consider creating an alias that includes the `./bin` build-drivers & release code as well so we can work ;; on them all from a single REPL process. }}