Fork me on GitHub
#beginners
<
2017-11-20
>
boldaslove15600:11:26

@zah Using vector is possible, the problem is, with your given xf your channel expects a map input since it will act as a vector/list/queue. One way to solve this is to map over each data before put! . With the given data: (mapv (partial put! ch) data)

zignd16:11:04

is there any special trick to manage dependencies in leiningen so that you will never have to deal with issues regarding dependency reuse at incorrect versions?

zignd16:11:36

i'm currently adding :exclusions modifiers in my project.clj to prevent this reuse whenever it happens, but i'm doing so only when the application fails to compile. am i doing it right?

manutter5117:11:16

That’s the basic idea, you can also use lein deps :tree if you’re not already. That will give you some advice about what might need to be excluded.

zignd17:11:33

oh, that's good to know, i'm already using the lein deps :tree, i only wish there was some sort of lein deps add library-name that would automatically add the :exclusions for me xD

gonewest81819:11:57

However, it’s not always as simple as excluding the conflicting dependency. Imagine a case where two incompatible versions of the same library appear as dependencies in the tree...

zignd20:11:02

@gonewest818 i thought that by adding the exclusions modifier the correct version would be used instead, but i confess that i failed to understand how the dependency tree works and why it tries to reuse dependencies

zignd20:11:20

oh, it's a maven concept, i thought it was leiningen specific, a google search for "maven dependency tree wrong versions" revealed, sorry, i don't have a Java background

noisesmith20:11:53

it works from start to end of your deps list, depth first, and uses the first version it finds of each dep iirc

noisesmith20:11:15

so you can specify the right version earlier, instead of using an exclusion

gonewest81820:11:02

I tend to state the right version earlier and exclude the others, but that might be overkill.

zignd20:11:59

using :managed-dependencies right?

noisesmith20:11:59

I haven’t used that at all, I don’t think any of this is specific to managed dependencies

gonewest81820:11:44

No, I simply meant

:dependencies [[foo “2.0.0”]
               [bar “1.3.4” :exclusions [foo]]
               [baz “3.2.1” :exclusions [foo]]]

zignd20:11:39

oh, i got it now! and also learned that dependencies can be declared like that, it's kinda flexible

zignd20:11:23

thanks for the example, made it clearer