Building driver fails with "All dirs should be absolute"

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
clojure
Domain
build-system

Research direction

Start with build_drivers.copy_source_files and copy_source_files.clj at line 10, then trace how the sample driver's ./src and ./resources paths reach the copy step. Reproduce the driver build and verify that the source-copy step completes without the absolute-directory assertion.

Written by the indexing model from the issue text.

Description

Clojure CLI version 1.11.1.1149
openjdk 11.0.16 2022-07-19

WARNING: Specified aliases are undeclared and are not being used: [:dev]
Downloading: org/postgresql/postgresql/42.3.1/postgresql-42.3.1.jar from central
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/ruslan/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.17.2/log4j-slf4j-impl-2.17.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/ruslan/.m2/repository/org/slf4j/slf4j-nop/1.7.32/slf4j-nop-1.7.32.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Build driver :sample-driver (edition = :oss, options = {:project-dir ".", :target-dir "./target"})
  Clean
    Delete ./target/jar if exists
      Don't need to delete ./target/jar, file does not exist.
    Delete ./target/sample-driver.metabase-driver.jar if exists
      Don't need to delete ./target/sample-driver.metabase-driver.jar, file does not exist.
  Copy :sample-driver source files
Step failed: Assert failed: All dirs should be absolute, got: ["./src" "./resources"]
(every? u/absolute? dirs)
{:via
 [{:type java.lang.AssertionError,
   :message "Assert failed: All dirs should be absolute, got: [\"./src\" \"./resources\"]\n(every? u/absolute? dirs)",
   :at [build_drivers.copy_source_files$copy_source_files_BANG_$fn__4720 invoke "copy_source_files.clj" 10]}],
 :trace
 [[build_drivers.copy_source_files$copy_source_files_BANG_$fn__4720 invoke "copy_source_files.clj" 10]
  [metabuild_common.steps$do_step invokeStatic "steps.clj" 85]
  [metabuild_common.steps$do_step invoke "steps.clj" 79]
  [build_drivers.copy_source_files$copy_source_files_BANG_ invokeStatic "copy_source_files.clj" 7]
  [build_drivers.copy_source_files$copy_source_files_BANG_ invoke "copy_source_files.clj" 6]
  [build_drivers.build_driver$build_driver_BANG_$fn__7955 invoke "build_driver.clj" 31]
  [metabuild_common.steps$do_step invokeStatic "steps.clj" 85]
  [metabuild_common.steps$do_step invoke "steps.clj" 79]
  [build_drivers.build_driver$build_driver_BANG_ invokeStatic "build_driver.clj" 29]
  [build_drivers.build_driver$build_driver_BANG_ invoke "build_driver.clj" 14]
  [build_drivers.build_driver$build_driver_BANG_ invokeStatic "build_driver.clj" 17]
  [build_drivers.build_driver$build_driver_BANG_ invoke "build_driver.clj" 14]
  [clojure.lang.AFn applyToHelper "AFn.java" 154]
  [clojure.lang.AFn applyTo "AFn.java" 144]
  [clojure.lang.Var applyTo "Var.java" 705]
  [clojure.core$apply invokeStatic "core.clj" 667]
  [clojure.core$apply invoke "core.clj" 662]
  [clojure.run.exec$exec invokeStatic "exec.clj" 48]
  [clojure.run.exec$exec doInvoke "exec.clj" 39]
  [clojure.lang.RestFn invoke "RestFn.java" 423]
  [clojure.run.exec$_main$fn__205 invoke "exec.clj" 180]
  [clojure.run.exec$_main invokeStatic "exec.clj" 176]
  [clojure.run.exec$_main doInvoke "exec.clj" 139]
  [clojure.lang.RestFn invoke "RestFn.java" 397]
  [clojure.lang.AFn applyToHelper "AFn.java" 152]
  [clojure.lang.RestFn applyTo "RestFn.java" 132]
  [clojure.lang.Var applyTo "Var.java" 705]
  [clojure.core$apply invokeStatic "core.clj" 667]
  [clojure.main$main_opt invokeStatic "main.clj" 514]
  [clojure.main$main_opt invoke "main.clj" 510]
  [clojure.main$main invokeStatic "main.clj" 664]
  [clojure.main$main doInvoke "main.clj" 616]
  [clojure.lang.RestFn applyTo "RestFn.java" 137]
  [clojure.lang.Var applyTo "Var.java" 705]
  [clojure.main main "main.java" 40]],
 :cause "Assert failed: All dirs should be absolute, got: [\"./src\" \"./resources\"]\n(every? u/absolute? dirs)"}
    Step "Copy :sample-driver source files" failed with error "Assert failed: All dirs should be absolute, got: [\"./src\" \"./resources\"]\n(every? u/absolute? dirs)"
Dominant language
Clojure
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from metabase/sample-driver

All issues in metabase/sample-driver

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.