You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7347 Reporter: sebmondet Status: resolved (set by @xavierleroy on 2017-02-18T15:13:18Z) Resolution: fixed Priority: normal Severity: text Version: 4.03.0 Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Category: ~DO NOT USE (was: OCaml general) Child of:#6081
Bug description
Since 4.03.0, the #use directive seems to treat "file.ml" and "./file.ml" differently:
the "file.ml" one seems to be relative to the script.
the "./file.ml" one seems to be relative to the current-directory of the ocaml process.
We'll document it, but really it is the standard behaviour for the compilers: if you say "file.cma" it looks in the library path, and if you say "./file.cma" it looks in the current directory. In fact, the shell does the same for commands.
Original bug ID: 7347
Reporter: sebmondet
Status: resolved (set by @xavierleroy on 2017-02-18T15:13:18Z)
Resolution: fixed
Priority: normal
Severity: text
Version: 4.03.0
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: ~DO NOT USE (was: OCaml general)
Child of: #6081
Bug description
Since 4.03.0, the
#use
directive seems to treat "file.ml" and "./file.ml" differently:ocaml
process.(Doesn't seem to be in the changelog:
ocaml/Changes
Line 841 in bf6261c
Steps to reproduce
example/ex.ml:
example/same_dir.ml
example/dot_slash.ml:
With 4.02.0
$ ocaml -version
The OCaml toplevel, version 4.02.3
$ ocaml example/ex.ml
Cannot find file same_dir.ml.
Cannot find file ./dot_slash.ml.
File "example/ex.ml", line 7, characters 36-44:
Error: Unbound module Same_dir
$ cd example/ ; ocaml ex.ml
same-dir, dot-slash
With 4.03.0
It finds
same_dir.ml
.$ ocaml -version
The OCaml toplevel, version 4.03.0
$ ocaml example/ex.ml
Cannot find file ./dot_slash.ml.
File "./example/ex.ml", line 7, characters 56-65:
Error: Unbound module Dot_slash
$ cd example/ ; ocaml ex.ml
same-dir, dot-slash
The text was updated successfully, but these errors were encountered: