Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006142OCamltools (ocaml{lex,yacc,dep,debug,...})public2013-08-28 11:172014-07-24 20:09
Assigned To 
PlatformOSOS Version
Product Version4.01.0+beta/+rc 
Target Version4.02.0+devFixed in Version4.02.0+dev 
Summary0006142: add cmt file support to ocamlobjinfo
DescriptionThis adds support for cmt files to ocamlobjinfo.

I do notice that cmti files have the same magic number as cmi files at the moment, so this doesn't work with interfaces. Is this choice intentional?


$ ../boot/ocamlrun objinfo ~/.opam/4.01.0beta1+opamdoc/build/lwt.2.4.3/_build/src/unix/lwt_io.cmt
Unit name: Lwt_io
Interfaces imported:
    968037506db5f9b56ea16d0880b2363f Bigarray
    af3ef6fba94cdb4eba31e98b4e341dab Buffer
    9554e5449c177414a27e7d7ff5ed8013 Char
    1858860030310b043b5d7fcb362095a3 Complex
    292a1cd61d8e068943589882415bdf7d Gc
    024edc3512403b725052aec8e41ed971 Hashtbl
    ad06f04cfca6d404d1de76c3dc67324a Int32
    3945db6e8df0d5a79bcbc949ee550d52 Int64
    12a7b23bd30e5e207ddae39c8e41a1d2 Lazy
    d757117653d9319fefb7ddc78a998f41 List
    c8c929da0555d697a3923e2328181ef3 Lwt
    130ae35afff8a13adde620b0393e72d0 Lwt_bytes
    b2efe606d564fef36e15812ffcf8e645 Lwt_io
    cf00aa40e98d06340c0cf1e24ebf910d Lwt_list
    1625a62212b91a65c3bf11e4922c4afe Lwt_main
    9d0ce5785ac3e58f4fe7f9697d6d6849 Lwt_sequence
    40dd2569f392f1644ce3e62557087416 Lwt_stream
    f85585786c389da94e2ac2304b9bb413 Lwt_sys
    c211cd726a2d74bcce1ee92a0d6c8d5c Lwt_unix
    5f356f9eb0296db508eefe0c75bdc3ee Marshal
    b0adfa4175f86e4394859886c1a374bb Obj
    36b5bc8227dc9914c6d9fd9bdcfadb45 Pervasives
    d012329cc712e91d0f10a5eef2303d18 Printf
    db7f34081ef8fcaf499f19523d0736c6 String
    5acfec22153eb1403597926ecd15f4f5 Sys
    93736a394d3d85d6d127fe238ddc6092 Unix
    e86b819661351c07c5122e164ffd29ea Weak
Source file: src/unix/
Compilation Flags: ocamlopt.opt -c -g -I src/core -I src/unix -I src/core -o src/unix/lwt_io.cmx -I /Users/avsm/.opam/4.01.0beta1+opamdoc/lib/ocaml/camlp4 -pp camlp4 '-I' '/Users/avsm/.opam/4.01.0beta1+opamdoc/lib/ocaml/camlp4' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'syntax/pa_lwt_options.cmo' 'syntax/pa_lwt.cmo' 'syntax/pa_lwt_log.cmo' 'syntax/pa_optcomp.cmo' src/unix/
Load Path: src/core src/unix src/core /Users/avsm/.opam/4.01.0beta1+opamdoc/lib/ocaml/camlp4 /Users/avsm/.opam/4.01.0beta1+opamdoc/lib/ocaml
Interface Digest:
Additional Information [^]
Attached Filespatch file icon ocamlobjinfo+cmt.patch [^] (3,602 bytes) 2013-08-28 11:17 [Show Content]
patch file icon ocamlobjinfo+cmt2.patch [^] (3,507 bytes) 2013-08-28 12:01 [Show Content]

- Relationships

-  Notes
doligez (administrator)
2013-08-28 11:20

About cmti vs cmi, according to cmt_format.mli, a cmti (and in some cases a cmt) file begins with an optional (or a sequence of?) cmi files, followed by the cmt magic number. So ocamlobjinfo should distinguish the two by first parsing the cmi, then looking for the cmt magic number.
avsm (developer)
2013-08-28 11:55

Got it -- I've refreshed the patch to re-use call, and it works on cmi, cmti and cmt as expected now (and displays all the available info, and distinguishes Cmt interfaces from the Cmi output).

The extra dependencies this patch introduces may break the build due to error-enabled warnings, so I've left a clean build running to check it's ok.
frisch (developer)
2013-08-30 15:40

> The extra dependencies this patch introduces may break the build due to error-enabled warnings

What do you mean? Why would extra dependencies trigger more warnings (or do you think of warning 31)?
avsm (developer)
2013-08-30 16:13

Right...I was seeing some new unused variable warnings in my new build, but this doesn't happen with a clean make world.opt. The patch works fine for me.
doligez (administrator)
2014-07-24 20:09

Patch ported and applied to 4.02 (commit 15027) and trunk (commit 15028).

- Issue History
Date Modified Username Field Change
2013-08-28 11:17 avsm New Issue
2013-08-28 11:17 avsm File Added: ocamlobjinfo+cmt.patch
2013-08-28 11:20 doligez Note Added: 0010247
2013-08-28 11:20 doligez Status new => acknowledged
2013-08-28 11:20 doligez Target Version => 4.01.1+dev
2013-08-28 11:55 avsm Note Added: 0010249
2013-08-28 12:01 avsm File Added: ocamlobjinfo+cmt2.patch
2013-08-30 15:40 frisch Note Added: 0010267
2013-08-30 16:13 avsm Note Added: 0010268
2014-01-17 17:57 doligez Tag Attached: patch
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-24 20:09 doligez Note Added: 0011905
2014-07-24 20:09 doligez Status acknowledged => closed
2014-07-24 20:09 doligez Resolution open => fixed
2014-07-24 20:09 doligez Fixed in Version => 4.02.0+dev
2016-12-07 16:37 doligez Category OCaml tools (ocaml{lex,yacc,dep,browser,debug}) => OCaml tools (ocaml{lex,yacc,dep,debug})
2017-02-23 16:45 doligez Category OCaml tools (ocaml{lex,yacc,dep,debug}) => tools (ocaml{lex,yacc,dep,debug,...})

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker