forked from ocaml/merlin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ocaml#1710 from voodoos/issue-1703-cmi-file-flag
Ignore `-cmi-file` flag
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Since OCaml 5.1 the compiler support the -cmi-file flag: | ||
> -cmi-file filename | ||
> Use the given interface file to type-check the ML source file to compile. | ||
> When this option is not specified, the compiler looks for a .mli file with | ||
> the same base name than the implementation it is compiling and in the same | ||
> directory. If such a file is found, the compiler looks for a corresponding | ||
> .cmi file in the included directories and reports an error if it fails to | ||
> find one. | ||
|
||
$ cat >main.mli <<'EOF' | ||
> val f : unit -> int | ||
> EOF | ||
|
||
$ $OCAMLC -c main.mli | ||
$ rm main.mli | ||
|
||
|
||
$ cat >main.ml <<'EOF' | ||
> let f () = 42 | ||
> EOF | ||
|
||
$ $OCAMLC -c -cmi-file main.cmi main.ml | ||
|
||
Merlin should ignore the -cmi-file flag | ||
$ $MERLIN single errors -cmi-file main.cmi -filename main.ml <main.ml | | ||
> jq '.value' | ||
[] |