greglook / clj-hiera Goto Github PK
View Code? Open in Web Editor NEWGenerate Clojure namespace hierarchy graphs
License: The Unlicense
Generate Clojure namespace hierarchy graphs
License: The Unlicense
hey there! This tool is very cool, thanks so much for making it.
I have a very large project (522 src namespaces) that is fairly mixed together. I'm hoping to split groups of them up into separate jars with their own deps.edn and builds, but to do that, I need them to be fairly isolated. For example, if I have src/noah/data/*.clj
, src/noah/routes/*.clj
, src/noah/services/*.clj
, src/noah/db.clj
, I want to make it so that data
is standalone and doesn't rely on anything from services
. I could use grep to find the requires, but given the large number of files (especially once we're 3-5 directories deep) and their interconnections, it would be easier to see them visually.
Given that, I'd love to analyze the whole project but then only see the connections of a specified folder/namespace/regex. In the example above, if I specify noah.data
, I'd like to see that noah.db
is required, and any noah.service.*
files are pointed at, but I don't want to follow the noah.service
requirements to any other files (such as noah.routes
).
Does that make sense?
Thanks so much!
I would like to use hiera
on a cljs
project.
Could you please add an option for it?
In a cljs
, I would like hiera to parse cljs
and clj
source files.
(In cljs
, macro are written in clj
files.)
clj -Thiera graph :ignore '#{hgs.platform.util}'
Execution error (ExceptionInfo) at clojure.tools.namespace.dependency.MapDependencyGraph/depend (dependency.cljc:89).
Circular dependency between hgs.platform.util and hgs.platform.util
The src/hgs/platform/util.clj
ns form, abridged:
(ns hgs.platform.util
(:require ;; Nothing from 'hgs at all.
...)
(:import ...))
The src/hgs/platform/util.cljs
ns form, abridged:
(ns hgs.platform.util
(:require-macros [hgs.platform.util])
(:require ;; Same as above - nothing from 'hgs.
...))
As you can see, the :ignore
option didn't help. But maybe I didn't use it correctly.
After running into #5, I wanted to run Hiera on just my backend equivalents. Since the plugin always defaults to using the :source-path
I had to temporarily modify this to skip my cljs
files. I think this could be solved in a couple of ways and I'm willing to do the pull request:
:source-path
. If the user specifies paths, instead of merging, use the specified listing.:ignore-source-path
input to remove the :source-path
when not desiredLet me know your thoughts.
Hi, none of these work calling hiera from a shell script:
lein hiera :show-external true :ignore-ns #{clojure}
lein hiera :show-external true :ignore-ns \#{clojure}
lein hiera :show-external true :ignore-ns "#{clojure}"
The image gets generated but clojure.* namespaces are still shown.
In clojurescript, one can require npm modules using the following syntax:
(:require ["honeybadger-js" :as honeybadger])
The npm module to required is passed as a string.
See here for the full details.
hiera doesn't handle this case properly:
See the error below:
$ lein hiera
java.lang.IllegalArgumentException: "Unparsable namespace form:" ["honeybadger-js" :as honeybadger]
at clojure.tools.namespace.parse$deps_from_libspec.invokeStatic (parse.clj:78)
Might be helpful to call out the dependency on graphvis explicitly. Rhizome's got it listed, so it would be easy to just reference that. Without graphvis installed, the error spit out is
java.io.IOException: Cannot run program "dot": error=2, No such file or directory
at java.lang.ProcessBuilder.start (ProcessBuilder.java:1047)
Not a terribly helpful error message on graphvis' part.
Great plugin, though -- thanks! :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.