GithubHelp home page GithubHelp logo

mill-dgraph's Introduction

mill-dgraph

Build Status

dgraph is a mill build tool plugin (well, not really, mill doesn't have proper plugins yet but it's still pretty easy to use). It analyses project artifact dependencies (like sbt-dependency-graph) and presents them in graphical form.

Drawing

It shows how your projects relate and which dependencies they are pulling in. Evictions are also shown but can be disabled for a clearer view. You can see sizes of all code and source jars to estimate how big your project is getting and which dependencies are contributing the most.

Clicking on a dependency shows all it's ancestors and descendants

The web page part works offline - artifact resolution may want internet access

Usage

Mill is under rapid development and it is unlikely that the API will stabilize for a while, this might mean there are incompatibilities between the mill version you are using and this 'plugin'. I'll try to keep dgraph up to date with the newest mill releases.

To use the plugin you need to add the following to your build.sc file.

import $ivy.`com.github.ajrnz::mill-dgraph:0.1.0`

val dgraph = plugin.dgraph 

The first line loads the library and the second brings it into the local scope for easy access.

You can then run the following from inside the mill build REPL where proj is the name of a project (ScalaModule).

dgraph.browseDeps(proj)()

This will open a browser window with a tree like the one above.

If you would like to view the dependencies due to an arbitrary set of dependencies try,

dgraph.browseDeps(proj, "com.typesafe.play::play:2.6.11")() 

Note: that you still need to supply a reference project. Details like the scala version and repositories are extracted from this project during the resolution process.

The input format for the dependency is fairly lenient. ie all the following are valid:

dgraph.browseDeps(proj, "com.typesafe.play::play:2.6.11")() 
dgraph.browseDeps(proj, """ivy"com.typesafe.play::play:2.6.11"""")() 
dgraph.browseDeps(proj, """"com.typesafe.play" %% "play" % "2.6.11""""")() 
dgraph.browseDeps(proj, "com.typesafe.play::play:2.6.11", "com.typesafe.akka::akka-http:10.0.11")() 

You can also call it from the command line:

mill dgraph.browseDeps proj

or

mill dgraph.browseDeps proj com.typesafe.play::play:2.6.11

Future

  • Currently only looks at runtime dependencies - could look at compile/test
  • Text based lists of dependencies / sizes
  • Suggestions welcome...

mill-dgraph's People

Contributors

ajrnz avatar

Watchers

 avatar  avatar  avatar

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.