Fork me on GitHub
#yada
<
2018-01-23
>
martinklepsch14:01:01

besides that it seems that yada/yada.clj is the only clj file in the jar, a file which seemingly does not exist in the repo?

martinklepsch14:01:45

Ah, yada.clj is in one of the bundles

malcolmsparks14:01:07

Hi @martinklepsch - sorry was just in a conf call earlier. Yada is broken up into a number of smaller extensions, composed into bundles. The rationale was that the number of yada transitive dependencies is over 150 and that's just too many for some use-cases. The extension approach allows extensions that aren't necessarily core to HTTP (e.g. a future implementation of WebDAV), would not add to the overall bloat. It's not entirely obvious when something is an optional extra and when something is core. E.g. Parameters - these are useful for the swagger generation and validation, and have been in yada since day one, but there's nothing in HTTP itself that requires them.

malcolmsparks14:01:50

The aleph extension you are seeing is version 1.2.8, it depends on the actual version of aleph. The point of making aleph an extension is to provide support for other web servers in the future.

malcolmsparks14:01:42

Yada is a big project, and in the future could be even bigger. There are other projects such as Incanter that suffer from the same dependency bloat (which increases the chances of version incompatibilities when integrated with end-user projects). Last year when I refactored yada into this design there was an obvious candidate for how to structure a large library. I hope they'll be more work in the dependencies area in the future which may suggest better approaches.

martinklepsch14:01:54

I see, so those jars aren’t actually aleph etc but yada/aleph and similar?

malcolmsparks14:01:52

you can compose your own bundle of yada if you want to change it, it's a power-user feature but others have done this

malcolmsparks14:01:21

By design, yada is not very modular (like Ring middleware), you can't really have HTTP compliance with a pick-and-mix style of bringing in an adhoc choice of clojure libraries - it has to be batteries-included (but there is a compartment at the back which allows you to change the batteries)

martinklepsch14:01:26

If I were to create an API documentation for yada, what jar would be the “default” one is the one that has just yada/yada.clj the right one?

malcolmsparks14:01:41

yep - that's the default one which has everything

malcolmsparks14:01:12

i'd love to see the API documentation - I'm sure it would reveal some inconsistencies to work on

martinklepsch14:01:17

Got it. And so all other sources in src/ are packaged up in dependencies of yada itself?

martinklepsch14:01:26

Well it’s really just Codox but it poses an interesting problem which is that some common APIs may not be visible because they are not part of the jar but a dependency (which would have it’s own API docs)

dominicm19:01:23

Just as a note, the only public api is yada.yada.

martinklepsch19:01:11

Thanks, in that case I guess that makes sense

martinklepsch15:01:00

[["/" :group-id]
 [["/" :group/index]
  [["/" :artifact-id]
   [["/" :artifact/index]
    [["/" :version]
     [["/" :artifact/version]
      [["/" [#"[\w\.]+" :namespace] ""]
       [["/" :artifact/namespace]
        [["#" :def] [["" :artifact/def]]]]]]]]]]]
I have a routes definition like this but can’t get it to match any :artifact/def routes despite path-for properly generating them (you could say I can’t “round-trip")