[opam-devel] printing detailed dependency analysis

Roberto Di Cosmo roberto at dicosmo.org
Wed Mar 27 16:36:49 GMT 2013


On Wed, Mar 27, 2013 at 05:23:16PM +0100, Thomas Gazagnaire wrote:
> When you use the --cudf option, I'm outputinf a .cudf files 
> for each solver invocation 

cool!

> + a .dot file of the raw universe, limited to installed packages, using the dose API.

Ok, that explains the large graph in my case...

> So using 'ceve' on the cudf seems indeed a much better option that my quick hack.
> 

ceve is a sort of swiss-army knife for dependency metadata, so one can play
with it and see what is really needed; then it will be easy to import in
opam whatever is interesting (the bindings are all there :-))

> Thomas
> 
> 
> > In the meanwhile, I used the ceve tool, that comes with
> > dose: it is able to extract the dependency cone of a package from
> > a Cudf file, and generate the dependeny graph.
> > 
> > For example, after running
> > 
> >  opam upgrade --cudf=foo
> > 
> > one can type
> > 
> >  ceve -c "cryptokit-sha512" -Tdot cudf://foo-1.cudf | dot -Tpng -o cryptokit-sha512.png
> > 
> > to obtain the attached image.
> > 
> > Notice that ceve has not been so extensively tested, and bug reports
> > and bug fixes are welcome here https://gforge.inria.fr/projects/dose/
> > 
> > --Roberto
> > 
> > On Wed, Mar 27, 2013 at 03:50:09PM +0100, Thomas Gazagnaire wrote:
> >> Remark: this is really just a hack, I agree it would be good to move that thing into a proper command later.
> >> 
> >> We've discussed about creating 'opam-check' which will do this kind of computations using opam-lib, but we've never really had the time to do this properly. As always, contributions are welcome as this is quite distinct from the core of OPAM (eg. the mechanics of installing/removing packages).
> >> 
> >> Thomas
> >> 
> >> 
> >> On Mar 27, 2013, at 3:47 PM, Thomas Gazagnaire wrote:
> >> 
> >>> You can try:
> >>> 
> >>> $ opam upgrade --cudf=foo ocamlfind
> >>> 
> >>> hopefully this is just a no-op which produces foo.dot. Then:
> >>> 
> >>> $ dot -Tpng foo.dot > foo.png
> >>> 
> >>> This will build the graph of all available packages where the roots are the installed ones.
> >>> 
> >>> --
> >>> Thomas
> >>> 
> >>> 
> >>> 
> >>> On Mar 27, 2013, at 3:31 PM, Ashish Agarwal wrote:
> >>> 
> >>>> Is there any way to get a detailed print out of a package's dependency tree? I'm in a situation that is hard to debug.
> >>>> 
> >>>> _______________________________________________
> >>>> opam-devel mailing list
> >>>> opam-devel at lists.ocaml.org
> >>>> http://lists.ocaml.org/listinfo/opam-devel
> >>> 
> >> 
> >> _______________________________________________
> >> opam-devel mailing list
> >> opam-devel at lists.ocaml.org
> >> http://lists.ocaml.org/listinfo/opam-devel
> > 
> > -- 
> > Roberto Di Cosmo
> > 
> > ------------------------------------------------------------------
> > Professeur               En delegation a l'INRIA
> > PPS                      E-mail: roberto at dicosmo.org
> > Universite Paris Diderot WWW  : http://www.dicosmo.org
> > Case 7014                Tel  : ++33-(0)1-57 27 92 20
> > 5, Rue Thomas Mann       
> > F-75205 Paris Cedex 13   Identica: http://identi.ca/rdicosmo
> > FRANCE.                  Twitter: http://twitter.com/rdicosmo
> > ------------------------------------------------------------------
> > Attachments:
> > MIME accepted, Word deprecated
> >      http://www.gnu.org/philosophy/no-word-attachments.html
> > ------------------------------------------------------------------
> > Office location:
> > 
> > Bureau 320 (3rd floor)
> > Batiment Sophie Germain
> > Avenue de France
> > Metro Bibliotheque Francois Mitterrand, ligne 14/RER C
> > -----------------------------------------------------------------
> > GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3                        
> > <cryptokit-sha512.png>
> 

-- 
Roberto Di Cosmo
 
------------------------------------------------------------------
Professeur               En delegation a l'INRIA
PPS                      E-mail: roberto at dicosmo.org
Universite Paris Diderot WWW  : http://www.dicosmo.org
Case 7014                Tel  : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann       
F-75205 Paris Cedex 13   Identica: http://identi.ca/rdicosmo
FRANCE.                  Twitter: http://twitter.com/rdicosmo
------------------------------------------------------------------
Attachments:
MIME accepted, Word deprecated
      http://www.gnu.org/philosophy/no-word-attachments.html
------------------------------------------------------------------
Office location:
 
Bureau 320 (3rd floor)
Batiment Sophie Germain
Avenue de France
Metro Bibliotheque Francois Mitterrand, ligne 14/RER C
-----------------------------------------------------------------
GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3                        


More information about the opam-devel mailing list