Code Monkey home page Code Monkey logo

clj-hiera's People

Contributors

greglook avatar viebel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

clj-hiera's Issues

Feature request: Analyze whole project, create output of subset of info

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!

Support cljs source files

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.)

Can't use in a project that has a CLJ ns and a CLJS ns with the same name that requires it

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.

Cannot Limit Source Path

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:

  1. Don't always include :source-path. If the user specifies paths, instead of merging, use the specified listing.
  2. Add a :ignore-source-path input to remove the :source-path when not desired

Let me know your thoughts.

:ignore-ns not working

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.

cannot generate dependency graph for a clojurescript project that has npm dependency

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)

Declare graphvis dependency

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! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.