This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Is there an equivalent in deps clj ? I would like to exclude from all dependencies, and not specifically per one In lein this would work:
:exclusions
[;; Exclude transitive dependencies on all other logging
;; implementations, including other SLF4J bridges.
commons-logging
log4j
org.apache.logging.log4j/log4j
org.slf4j/simple
org.slf4j/slf4j-jcl
org.slf4j/slf4j-nop
org.slf4j/slf4j-log4j12
org.slf4j/slf4j-log4j13]
The docs only cover the case of multiple exclusions with a specific dependency, so the answer seems to be no (or not at the moment) https://clojure.org/reference/deps_edn#_shared_dep_attributes Is there an underlying issue that requires all of these logging related libraries to be excluded?
you have asked why they should be excluded. this the example I follow with slf4j & logback. which should exclude it alternatives (log4 etc)
Sorry I didn't understand the follow-on post at first. I see in the http://log.dev project.clj
file that it excludes the transitive dependencies. If the specific library dependencies are not used for http://log.dev project, does it actually fail?
It is possible to override a :deps
library dependency using an alias with :override-deps
to specify the library names and version.
I've never tested that for transitive dependencies, but assume that using :override-deps
may achieve the same result that http://log.dev project defines in the project.clj :dependencies
section.
Seems worth a try if http://log.dev project is otherwise not working correctly.
https://clojure.org/guides/deps_and_cli#override_deps
I'll try, thanks
hello! I am struggling to write a function that enumerates all possible flight paths for this flight data:
(def available-flights
{["Prague" "Vienna"] {:price 100 :connections 1}
["Prague" "Madrid"] {:price 100 :connections 1}
["Vienna" "Zadar"] {:price 200 :connections 1}
["Zadar" "Kiev"] {:price 200 :connections 2}
["Zadar" "Madrid"] {:price 200 :connections 1}})
For example, flying from Prague to Madrid. Help is very welcome 😊@U0LAJQLQ1 which one exactly? I will try
If this is a learning exercise, or you only have a small amount of flight data / perf isn't important, a recursive solution using no libs could look like this:
(defn find-flights [graph src dest]
(letfn [(search [current-path visited?]
(let [current-city (peek current-path)]
(if (= current-city dest)
(list current-path)
(mapcat (fn [[[from to] _]]
(when (and (= current-city from)
(not (visited? to)))
(search (conj current-path to) (conj visited? to))))
graph))))]
(search [src] #{src})))