-
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.
[sites] Complicate the test: tring to load same library twice
It should make @ejgallego less worried Signed-off-by: Dmitrii Kosarev <Dmitrii.Kosarev@pm.me>
- Loading branch information
Showing
6 changed files
with
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(env | ||
(_ | ||
(flags -w -33))) | ||
|
||
(library | ||
(public_name plugin2.plugin2_impl) | ||
(name plugin2_impl) | ||
(modules plugin2_impl) | ||
(libraries app.MyControls app.register result threads)) | ||
|
||
(plugin | ||
(name plugin2) | ||
(libraries threads plugin2.plugin2_impl) | ||
(site | ||
(app plugins))) |
8 changes: 8 additions & 0 deletions
8
otherlibs/site/test/plugin_require_thread.t/plugin2/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,8 @@ | ||
(lang dune 2.8) | ||
|
||
(using dune_site 0.1) | ||
|
||
(generate_opam_files true) | ||
|
||
(package | ||
(name plugin2)) |
3 changes: 3 additions & 0 deletions
3
otherlibs/site/test/plugin_require_thread.t/plugin2/plugin2_impl.ml
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,3 @@ | ||
let () = | ||
print_endline "Registration of Plugin2"; | ||
Queue.add (fun () -> print_endline "Plugin2 is doing something...") Registration.todo |
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
|
||
$ dune build ./app.exe @install | ||
$ dune exec ./app.exe | ||
The library is being used by two plugins finished initialization | ||
Fatal error: exception Dune_site_plugins__Plugins.Thread_library_required_by_plugin_but_not_required_by_main_executable | ||
[2] | ||
|
||
$ sed -i -e "s/;TOREMOVE//" dune | ||
|
||
$ dune build ./app.exe @install | ||
$ dune exec ./app.exe | ||
The library is being used by two plugins finished initialization | ||
Registration of Plugin1 | ||
Registration of Plugin2 | ||
Main app starts... | ||
Plugin1 is doing something... | ||
Plugin2 is doing something... |
1 change: 1 addition & 0 deletions
1
otherlibs/site/test/plugin_require_thread.t/stubs/MyControls.ml
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 () = print_endline "The library is being used by two plugins finished initialization" |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(library | ||
(public_name app.MyControls) | ||
(name MyControls) | ||
(modules) | ||
(modules MyControls) | ||
(libraries)) |