Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_cmt -annot does not report internal references #5814

Closed
vicuna opened this Issue Nov 6, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

vicuna commented Nov 6, 2012

Original bug ID: 5814
Reporter: @alainfrisch
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2015-12-11T18:08:22Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.01.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #5809

Bug description

It seems that all int_ref entries are turned into ext_ref when an annot file is generated by "read_cmt -annot" instead of "ocamlc -annot". This is because the information is lost when environments are discarded. This is fixed by setting OCAML_BINANNOT_WITHENV=1.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Nov 8, 2012

Comment author: @alainfrisch

This is fixed by setting OCAML_BINANNOT_WITHENV=1.

Well, only if the unit has been compiled with -annot as well (otherwise the annotations field in env is not filled), so this is not really a fix...

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Nov 8, 2012

Comment author: @alainfrisch

The annotations field seems rather useless these days, since the location of value definitions can be found in value_description record directly.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Nov 8, 2012

Comment author: @alainfrisch

I've removed the annotations field from the environment (commit 13076). Now read_cmt works fine as soon as environments are not discarded from .cmt files (i.e. compiling with OCAML_BINANNOT_WITHENV), even without -annot is not used.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Nov 8, 2012

Comment author: @alainfrisch

Commit 5814: rebuild environments from summaries when needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.