polylith

dabrazhe 2025-04-13T22:10:12.488219Z

I am trying to use pedestal in a Polylith base.

(ns ns.optservice.apipdstl.core
  (:require [io.pedestal.http :as http]
            [io.pedestal.http.route :as route]
            [clojure.data.json :as json]
            ))
Eval returns (cheshire/core.clj:1:1). ; namespace 'cheshire.factory' not found Deps.end for this base has
:deps {io.pedestal/pedestal.jetty {:mvn/version "0.6.1"}
I also added do the deps cheshire/cheshire {:mvn/version "5.11.0"}, But it does not help. Something I don’t fully grasp from the docks is where to add the dependencies for bricks Is this the right place for this dependency? Or shall in be added to the root deps.end to deps? Or :dev -> :extra-deps?

seancorfield 2025-04-13T22:46:58.787909Z

Library dependencies for bricks go in each brick's deps.edn as regular :deps.

seancorfield 2025-04-13T22:47:30.705529Z

If you add dependencies, you need to restart your REPL (or use sync-deps in Clojure 1.12) to pick up those changes.

seancorfield 2025-04-13T22:48:24.232879Z

And make sure you start your REPL at the top-level -- which may depend your editor/plugin combo.

✔️ 1
dabrazhe 2025-04-13T23:20:56.009709Z

Figured it out. If I start the REPL for the base directly, no error is thrown. However, starting with the root :dev profile deps.edn (what you called the top-level) results in an error. It appears there’s a dependency conflict: com.fasterxml.jackson.core/jackson-core version 2.5.2 is set in the :dev profile, while Cheshire requires a different version of Jackson Core. It wasn’t obvious that Pedestal uses Cheshire and Jackson, but Copilot helped to figure it out!

dabrazhe 2025-04-13T23:23:24.723999Z

Note to myself: don’t carry over dependencies and remove all irrelevant ones not required by a component