Building drivers with Metabase v46

Hi all!
I am trying to build the Exasol driver and the example Sudoku driver with the latest Metabase sources from the v0.46.0-RC2 tag.

Calling clojure -X:build :project-dir "\"$(pwd)\"" in the driver dir fails with this error:

Error building classpath. Local lib metabase/build-drivers not found: /Users/chp/git/metabase/bin/build-drivers

Both projects reference the Metabase build scripts in their deps.edn:

 ;; build the driver with clojure -X:build
  {:extra-deps {metabase/metabase-core {:local/root "../metabase"}
                metabase/build-drivers {:local/root "../metabase/bin/build-drivers"}}
   :exec-args  {:driver      :sudoku
                :project-dir "."
                :target-dir  "./target"}}}}

It looks like that the build scripts in Metabase have changed, but I am not so familiar with Clojure and my attempts to fix the driver build failed.
It would be great if you could adapt the build of the sudoku-driver for the new Metabase version or give me a hint how to fix it myself.

Thanks a lot for your help!

Kind regards,

Hi @kaklakariada , sorry, I had to make some changes to the Metabase build script to fix some bugs and you'll have to build drivers slightly differently as a result. I forgot to update the example Sudoku driver, but I've done that just now. To build a driver you'll want to run a command like:

# Example for building the driver with bash or similar

# switch to the local checkout of the Metabase repo
cd /path/to/metabase/repo

# get absolute path to the driver project directory
DRIVER_PATH=`readlink -f ~/sudoku-driver`

# Build driver. See explanation in Sudoku sample driver README
clojure \
  -Sdeps "{:aliases {:sudoku {:extra-deps {com.metabase/sudoku-driver {:local/root \"$DRIVER_PATH\"}}}}}"  \
  -X:build:sudoku \! \
  "{:driver :sudoku, :project-dir \"$DRIVER_PATH\", :target-dir \"$DRIVER_PATH/target\"}"

This is explained in more detail in the README for the Sudoku driver repo. Let me know if you run into any more problems.

Hi @camsaul ,
Thanks a lot for your quick help! The updated deps.edn from the sudoku driver and the build commands work for me.