Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planck namespaces as Jar #875

Closed
l3nz opened this issue Mar 3, 2019 · 8 comments
Closed

Planck namespaces as Jar #875

l3nz opened this issue Mar 3, 2019 · 8 comments

Comments

@l3nz
Copy link

l3nz commented Mar 3, 2019

I am having a weird issue with Cljdocs.

As CLI-matic uses function in the Plack namespaces, when I try building the docs on Cljdoc it breaks - https://cljdoc.org/d/cli-matic/cli-matic/0.3.3/doc/readme - because I reference functions that are not explicitly available in deps.edn. It would be easy to just add a reference :provided to Planck, if the JAR was available as a Maven resource.... but I'm not finding it.

I think this would not only benefit me, but everyone who writes libraries that target Planck (and it would be cool to have Planck namespace references on Cljdocs!)

@l3nz
Copy link
Author

l3nz commented Mar 3, 2019

FYI this is the analysis that goes wrong: https://circleci.com/gh/martinklepsch/cljdoc-builder/8981

@mfikes
Copy link
Member

mfikes commented Mar 3, 2019

Planck has an (undocumented) --dump-sdk / -D option for use by tooling to write all of its bundled namespaces into a given directory. See #473.

For example, if you do

$ planck --dump-sdk /tmp/planck-sdk

you will see all of the bundled namespaces in that directory, with the Planck-specific ones under /tmp/planck-sdk/planck.

I wonder if this capability could be used to address your issue.

@l3nz
Copy link
Author

l3nz commented Mar 3, 2019

I was able to make it work just by building the jar and uploading it - https://clojars.org/l3nz/planck - but it would make sense that it is uploaded under the projects' name. Unfortunately Cljdocs won't build docs for Planck itself.

@mfikes
Copy link
Member

mfikes commented Mar 3, 2019

If you are using deps.edn, I wonder if you could use --dump-sdk in combination with :local/root in deps.edn to have the tool consume the Planck SDK namespaces directly from the local filesystem as opposed to a published JAR.

@l3nz
Copy link
Author

l3nz commented Mar 4, 2019

The problem is that the consumer is Cljdocs, and it expects to fetch all deps from a Maven repository. So in any case I have to create a Maven manifest - and for what it's worth, Leiningen does it for me.
If you don't mind I can edit a bit the deps.edn so you can upload planck to Clojars under a correct name "planck/planck 1.2.3" - or I can do it unofficially.

@mfikes
Copy link
Member

mfikes commented Mar 4, 2019

Ahh. I see. Hmm. I wonder if it is possible to avoid actually publishing a JAR.

Does Cljdocs use deps.edn? In that case, perhaps instead of specifying a :mvn/version dep, a :git/sha dep could be specified instead.

For example, if Cljdoc is using deps.edn, then this

{:deps {github-planck-repl/planck 
        {:git/url "https://github.com/planck-repl/planck" 
         :deps/root "planck-cljs" 
         :sha "9952447688da2211edae8a680b653be555ae1c14"
         :tag "2.21.0"}}}

is effectively the same as

{:deps {l3nz/planck {:mvn/version "0.0.0"}}}

@pyrmont
Copy link
Contributor

pyrmont commented Mar 4, 2019

@l3nz, are the references to the Planck namespace coming solely from these lines?

Can you use alter-meta! somewhere in platform.cljs and add no-doc metadata to the Planck namespace to have it not be picked up by cljdoc?

@mfikes
Copy link
Member

mfikes commented May 19, 2019

Deployed: https://clojars.org/planck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants