Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004607OCamlOCaml generalpublic2008-08-28 11:172008-09-10 17:03
Reportermonate 
Assigned Todoligez 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11+dev 
Target VersionFixed in Version3.11+dev 
Summary0004607: Native dynlink and filenames containing '-'
DescriptionHello camlers,

Using the files :
===static.ml===
open Dynlink
let () =
  try
    init ();
    loadfile "dyn.cmxs"
  with Error e -> Format.printf "%s@." (error_message e)
==============
==dyn-dyn.ml==
Format.printf "HELLO@.";;
==============
and compiling with
==
ocamlopt -shared -o dyn-dyn.cmxs dyn-dyn.ml
ocamlopt -o test dynlink.cmxa static.ml
==

./test does not print anything -> initialization of module dyn-dyn.ml is not performed.
If the filename is a legal ocaml module name everything works as expected.
In bytecode everything works as expected.

This can be reproduced with Ocaml 3.11+dev15 Private_abbrevs+natdynlink+lazy_patterns (2008-07-29)
under both Linux/AMD64 and Win32/Mingw.

Thanks for your help.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0004590)
frisch (developer)
2008-08-28 23:43

Do we agree that it is an error if the filename does not give a valid module name? This should probably be checked by the compiler.
(0004592)
monate (reporter)
2008-08-29 00:28

Well I would not care if this was an error.
The discrepancy between byte and native code is my only concern. If the compiler enforces this check then it must do it in both modes.
(0004604)
doligez (administrator)
2008-09-10 15:09
edited on: 2008-10-15 11:59

> Do we agree that it is an error if the filename does not give a valid module name?

Indeed. The 3.11.0 compilers will report an error in that case.
EDIT: For compatibility reasons, this was changed to a warning.


- Issue History
Date Modified Username Field Change
2008-08-28 11:17 monate New Issue
2008-08-28 23:43 frisch Note Added: 0004590
2008-08-29 00:28 monate Note Added: 0004592
2008-09-10 15:09 doligez Note Added: 0004604
2008-09-10 15:09 doligez Status new => assigned
2008-09-10 15:09 doligez Assigned To => doligez
2008-09-10 17:03 doligez Status assigned => closed
2008-09-10 17:03 doligez Resolution open => fixed
2008-09-10 17:03 doligez Fixed in Version => 3.11+dev
2008-10-15 11:59 doligez Note Edited: 0004604


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker