-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the 'interface' field of a dialect optional
Signed-off-by: Guillaume Petiot <guillaume@tarides.com>
- Loading branch information
Showing
26 changed files
with
169 additions
and
45 deletions.
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
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
Empty file.
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,9 @@ | ||
(executable | ||
(name main) | ||
(public_name main) | ||
(modules main)) | ||
|
||
(executable | ||
(name fmt) | ||
(public_name fmt) | ||
(modules fmt)) |
7 changes: 7 additions & 0 deletions
7
test/blackbox-tests/test-cases/dialects/no_impl.t/dune-project
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,7 @@ | ||
(lang dune 3.9) | ||
|
||
(dialect | ||
(name mlfi) | ||
(interface | ||
(extension mfi) | ||
(format (run fmt %{input-file})))) |
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 @@ | ||
prerr_endline ("Formatting " ^ Sys.argv.(1)) |
Empty file.
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 @@ | ||
let () = () |
Empty file.
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,6 @@ | ||
Test the (dialect ...) stanza inside the dune-project file. | ||
|
||
$ dune exec ./main.exe | ||
|
||
$ dune build @fmt | ||
Formatting main.mfi |
Empty file.
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,9 @@ | ||
(executable | ||
(name main) | ||
(public_name main) | ||
(modules main)) | ||
|
||
(executable | ||
(name fmt) | ||
(public_name fmt) | ||
(modules fmt)) |
7 changes: 7 additions & 0 deletions
7
test/blackbox-tests/test-cases/dialects/no_intf_bad.t/dune-project
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,7 @@ | ||
(lang dune 3.8) | ||
|
||
(dialect | ||
(name mlfi) | ||
(implementation | ||
(extension mf) | ||
(format (run fmt %{input-file})))) |
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 @@ | ||
prerr_endline ("Formatting " ^ Sys.argv.(1)) |
Empty file.
Empty file.
25 changes: 25 additions & 0 deletions
25
test/blackbox-tests/test-cases/dialects/no_intf_bad.t/run.t
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,25 @@ | ||
Test the (dialect ...) stanza inside the dune-project file. | ||
|
||
$ dune exec ./main.exe | ||
File "dune-project", line 3, characters 0-92: | ||
3 | (dialect | ||
4 | (name mlfi) | ||
5 | (implementation | ||
6 | (extension mf) | ||
7 | (format (run fmt %{input-file})))) | ||
Error: omitting (interface) in dialects is only available since version 3.9 | ||
of the dune language. Please update your dune-project file to have (lang dune | ||
3.9). | ||
[1] | ||
|
||
$ dune build @fmt | ||
File "dune-project", line 3, characters 0-92: | ||
3 | (dialect | ||
4 | (name mlfi) | ||
5 | (implementation | ||
6 | (extension mf) | ||
7 | (format (run fmt %{input-file})))) | ||
Error: omitting (interface) in dialects is only available since version 3.9 | ||
of the dune language. Please update your dune-project file to have (lang dune | ||
3.9). | ||
[1] |
Empty file.
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,9 @@ | ||
(executable | ||
(name main) | ||
(public_name main) | ||
(modules main)) | ||
|
||
(executable | ||
(name fmt) | ||
(public_name fmt) | ||
(modules fmt)) |
7 changes: 7 additions & 0 deletions
7
test/blackbox-tests/test-cases/dialects/no_intf_good.t/dune-project
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,7 @@ | ||
(lang dune 3.9) | ||
|
||
(dialect | ||
(name mlfi) | ||
(implementation | ||
(extension mf) | ||
(format (run fmt %{input-file})))) |
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 @@ | ||
prerr_endline ("Formatting " ^ Sys.argv.(1)) |
Empty file.
Empty file.
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,6 @@ | ||
Test the (dialect ...) stanza inside the dune-project file. | ||
|
||
$ dune exec ./main.exe | ||
|
||
$ dune build @fmt | ||
Formatting main.mf |