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

Sys_error when getting error location from parsing/location.ml #5238

Closed
vicuna opened this issue Mar 8, 2011 · 2 comments
Closed

Sys_error when getting error location from parsing/location.ml #5238

vicuna opened this issue Mar 8, 2011 · 2 comments
Assignees
Labels
Milestone

Comments

@vicuna
Copy link

vicuna commented Mar 8, 2011

Original bug ID: 5238
Reporter: till
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2011-08-04T15:01:38Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.00.0+dev
Category: ~DO NOT USE (was: OCaml general)
Has duplicate: #5277

Bug description

The default (i.e. empty) value for [Location.input_name] (in parsing) is "none". Several places assume it to be "" when it isn't set and will therefor try to load the file none.

$ echo "val run : unit -> unit" > test.mli
$ ocamlc -for-pack lib test.mli
$ ocamlc -pack test.cmi -o lib.cmo

Fatal error: exception Sys_error("none: No such file or directory")

Additional information

running this in ocamlopt yields:
Fatal error: exception Sys_error("lib.cmx: No such file or directory")
Which is linked but will require a different fix.

File attachments

@vicuna
Copy link
Author

vicuna commented May 17, 2011

Comment author: @damiendoligez

Your patch is a bit too naive: it gives error messages in the wrong format.
The problem is that the toplevel code needs different error messages.
I'll have to sort it out (and remove a lot of obsolete code), but not for 3.12.1.

@vicuna
Copy link
Author

vicuna commented Aug 4, 2011

Comment author: @damiendoligez

fixed in 3.12.2+dev and in trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants