Allow the use of dune-base configuration reader in tests#1425
Merged
voodoos merged 3 commits intoocaml:masterfrom Jan 12, 2022
Merged
Allow the use of dune-base configuration reader in tests#1425voodoos merged 3 commits intoocaml:masterfrom
voodoos merged 3 commits intoocaml:masterfrom
Conversation
Merged
0a761c7 to
93a1191
Compare
93a1191 to
82a69f4
Compare
-> if the test does not explicitely exports USE_DUNE_READER
82a69f4 to
cd748da
Compare
let-def
reviewed
Jan 12, 2022
| | Some env -> | ||
| Os_ipc.merlin_set_environ env; | ||
| Unix.putenv "__MERLIN_MASTER_PID" (string_of_int (Unix.getpid ())) | ||
| | None -> () end; |
Contributor
There was a problem hiding this comment.
I think we should do Unix.putenv "__MERLIN_MASTER_PID" (string_of_int (Unix.getpid ())) in both branches.
This is the most reliable way for a process to know that it was spawned by Merlin.
Collaborator
Author
There was a problem hiding this comment.
But it is already set in Ocamlmerlin_server.main before the only call to New_merlin.run ~new_env:None
Collaborator
Author
There was a problem hiding this comment.
let-def
approved these changes
Jan 12, 2022
Contributor
|
Thanks 🎆 |
voodoos
added a commit
to voodoos/merlin
that referenced
this pull request
Mar 29, 2022
Allow the use of dune-base configuration reader in tests
voodoos
added a commit
to voodoos/merlin
that referenced
this pull request
Mar 29, 2022
Allow the use of dune-base configuration reader in tests
voodoos
added a commit
to voodoos/merlin
that referenced
this pull request
Apr 4, 2022
voodoos
added a commit
to voodoos/opam-repository
that referenced
this pull request
Apr 5, 2022
CHANGES:
Tue Apr 5 20:59:42 CEST 2020
+ merlin binary
- don't reset the environment when running merlin in single mode so that the
parent environement is forwarded the the child processes (ocaml/merlin#1425)
- filter dups in source paths (ocaml/merlin#1218)
- improve load path performance (ocaml/merlin#1323)
- fix handlink of ppx's under Windows (ocaml/merlin#1413)
- locate: look for original source files before looking for preprocessed
files (ocaml/merlin#1219 by @ddickstein, fixes ocaml/merlin#894)
- handle `=` syntax in compiler flags (ocaml/merlin#1409)
- expose all destruct exceptions in the api (ocaml/merlin#1437)
- fix superfluous break in error reporting (ocaml/merlin#1432)
- recognise binding operators in locate and occurrences (ocaml/merlin#1398, @mattiase)
- remove dependency on Result (ocaml/merlin#1441, @kit-ty-kate)
+ editor modes
- fix an issue in Neovim where the current line jumps to the top of the
window on repeated calls to `MerlinTypeOf` (ocaml/merlin#1433 by @ddickstein, fixes
ocaml/merlin#1221)
- add module, module type, and class imenu items for emacs (ocaml/merlin#1244, @ivg)
- add prefix argument to force or prevent opening in a new buffer in locate
command (ocaml/merlin#1426, @panglesd)
- add type-on-hover functionality for vim (ocaml/merlin#1439, @nilsbecker)
- add a dedicated buffer `*merlin-errors*` containing the last viewed error
(ocaml/merlin#1414, @panglesd)
+ test suite
- make `merlin-wrapper` create a default `.merlin` file only when there is
no `dune-project` to let tests use `dune ocaml-merlin` reader. (ocaml/merlin#1425)
- cover locate calls on module aliases with and without dune
- Add a test expliciting the interaction between locate and Dune's generated
source files (ocaml/merlin#1444)
voodoos
added a commit
to voodoos/opam-repository
that referenced
this pull request
Apr 5, 2022
CHANGES:
Tue Apr 5 21:12:42 CEST 2022
+ merlin binary
- don't reset the environment when running merlin in single mode so that the
parent environement is forwarded the the child processes (ocaml/merlin#1425)
- locate: look for original source files before looking for preprocessed
files (ocaml/merlin#1219 by @ddickstein, fixes ocaml/merlin#894)
- fix handlink of ppx's under Windows (ocaml/merlin#1413)
- handle `=` syntax in compiler flags (ocaml/merlin#1409)
- fix superfluous break in error reporting (ocaml/merlin#1432)
- recognise binding operators in locate and occurrences (ocaml/merlin#1398, @mattiase)
- improve load path performance (ocaml/merlin#1323)
- remove dependency on Result (ocaml/merlin#1441, @kit-ty-kate)
+ editor modes
- fix an issue in Neovim where the current line jumps to the top of the
window on repeated calls to `MerlinTypeOf` (ocaml/merlin#1433 by @ddickstein, fixes
ocaml/merlin#1221)
- add module, module type, and class imenu items for emacs (ocaml/merlin#1244, @ivg)
- add prefix argument to force or prevent opening in a new buffer in locate
command (ocaml/merlin#1426, @panglesd)
- add type-on-hover functionality for vim (ocaml/merlin#1439, @nilsbecker)
- add a dedicated buffer `*merlin-errors*` containing the last viewed error
(ocaml/merlin#1414, @panglesd)
+ test suite
- make `merlin-wrapper` create a default `.merlin` file only when there is
no `dune-project` to let tests use `dune ocaml-merlin` reader. (ocaml/merlin#1425)
voodoos
added a commit
to voodoos/opam-repository
that referenced
this pull request
Apr 5, 2022
CHANGES:
Tue Apr 5 21:17:21 PM CET 2022
+ merlin binary
- don't reset the environment when running merlin in single mode so that the
parent environement is forwarded the the child processes (ocaml/merlin#1425)
- locate: look for original source files before looking for preprocessed
files (ocaml/merlin#1219 by @ddickstein, fixes ocaml/merlin#894)
- fix handling of ppx's under Windows (ocaml/merlin#1413)
- handle `=` syntax in compiler flags (ocaml/merlin#1409)
- fix superfluous break in error reporting (ocaml/merlin#1432)
- recognise binding operators in locate and occurrences (ocaml/merlin#1398, @mattiase)
- remove dependency on Result (ocaml/merlin#1441, @kit-ty-kate)
+ editor modes
- update quick setup instructions for emacs (ocaml/merlin#1380, @ScriptDevil)
- fix an issue in Neovim where the current line jumps to the top of the
window on repeated calls to `MerlinTypeOf` (ocaml/merlin#1433 by @ddickstein, fixes
ocaml/merlin#1221)
- add module, module type, and class imenu items for emacs (ocaml/merlin#1244, @ivg)
- add prefix argument to force or prevent opening in a new buffer in locate
command (ocaml/merlin#1426, @panglesd)
- add type-on-hover functionality for vim (ocaml/merlin#1439, @nilsbecker)
- add a dedicated buffer `*merlin-errors*` containing the last viewed error
(ocaml/merlin#1414, @panglesd)
+ test suite
- make `merlin-wrapper` create a default `.merlin` file only when there is
no `dune-project` to let tests use `dune ocaml-merlin` reader. (ocaml/merlin#1425)
voodoos
added a commit
to voodoos/opam-repository
that referenced
this pull request
Apr 5, 2022
CHANGES for 414:
Tue Apr 5 20:51:42 CEST 2022
+ merlin binary
- don't reset the environment when running merlin in single mode so that the
parent environement is forwarded the the child processes (ocaml/merlin#1425)
- filter dups in source paths (ocaml/merlin#1218)
- improve load path performance (ocaml/merlin#1323)
- fix handlink of ppx's under Windows (ocaml/merlin#1413)
- locate: look for original source files before looking for preprocessed
files (ocaml/merlin#1219 by @ddickstein, fixes ocaml/merlin#894)
- handle `=` syntax in compiler flags (ocaml/merlin#1409)
- expose all destruct exceptions in the api (ocaml/merlin#1437)
- fix superfluous break in error reporting (ocaml/merlin#1432)
- recognise binding operators in locate and occurrences (ocaml/merlin#1398, @mattiase)
- remove dependency on Result (ocaml/merlin#1441, @kit-ty-kate)
- use the new "shapes" generated by the compiler to perform precise
jump-to-definition (ocaml/merlin#1431)
+ editor modes
- fix an issue in Neovim where the current line jumps to the top of the
window on repeated calls to `MerlinTypeOf` (ocaml/merlin#1433 by @ddickstein, fixes
ocaml/merlin#1221)
- add module, module type, and class imenu items for emacs (ocaml/merlin#1244, @ivg)
- add prefix argument to force or prevent opening in a new buffer in locate
command (ocaml/merlin#1426, @panglesd)
- add type-on-hover functionality for vim (ocaml/merlin#1439, @nilsbecker)
- add a dedicated buffer `*merlin-errors*` containing the last viewed error
(ocaml/merlin#1414, @panglesd)
+ test suite
- make `merlin-wrapper` create a default `.merlin` file only when there is
no `dune-project` to let tests use `dune ocaml-merlin` reader. (ocaml/merlin#1425)
- cover locate calls on module aliases with and without dune
- Add a test expliciting the interaction between locate and Dune's generated
source files (ocaml/merlin#1444)
CHANGES for 413:
Tue Apr 5 20:59:42 CEST 2022
+ merlin binary
- don't reset the environment when running merlin in single mode so that the
parent environement is forwarded the the child processes (ocaml/merlin#1425)
- filter dups in source paths (ocaml/merlin#1218)
- improve load path performance (ocaml/merlin#1323)
- fix handlink of ppx's under Windows (ocaml/merlin#1413)
- locate: look for original source files before looking for preprocessed
files (ocaml/merlin#1219 by @ddickstein, fixes ocaml/merlin#894)
- handle `=` syntax in compiler flags (ocaml/merlin#1409)
- expose all destruct exceptions in the api (ocaml/merlin#1437)
- fix superfluous break in error reporting (ocaml/merlin#1432)
- recognise binding operators in locate and occurrences (ocaml/merlin#1398, @mattiase)
- remove dependency on Result (ocaml/merlin#1441, @kit-ty-kate)
+ editor modes
- fix an issue in Neovim where the current line jumps to the top of the
window on repeated calls to `MerlinTypeOf` (ocaml/merlin#1433 by @ddickstein, fixes
ocaml/merlin#1221)
- add module, module type, and class imenu items for emacs (ocaml/merlin#1244, @ivg)
- add prefix argument to force or prevent opening in a new buffer in locate
command (ocaml/merlin#1426, @panglesd)
- add type-on-hover functionality for vim (ocaml/merlin#1439, @nilsbecker)
- add a dedicated buffer `*merlin-errors*` containing the last viewed error
(ocaml/merlin#1414, @panglesd)
+ test suite
- make `merlin-wrapper` create a default `.merlin` file only when there is
no `dune-project` to let tests use `dune ocaml-merlin` reader. (ocaml/merlin#1425)
- cover locate calls on module aliases with and without dune
- Add a test expliciting the interaction between locate and Dune's generated
source files (ocaml/merlin#1444)
CHANGES for 412:
Tue Apr 5 21:12:42 CEST 2022
+ merlin binary
- don't reset the environment when running merlin in single mode so that the
parent environement is forwarded the the child processes (ocaml/merlin#1425)
- locate: look for original source files before looking for preprocessed
files (ocaml/merlin#1219 by @ddickstein, fixes ocaml/merlin#894)
- fix handlink of ppx's under Windows (ocaml/merlin#1413)
- handle `=` syntax in compiler flags (ocaml/merlin#1409)
- fix superfluous break in error reporting (ocaml/merlin#1432)
- recognise binding operators in locate and occurrences (ocaml/merlin#1398, @mattiase)
- improve load path performance (ocaml/merlin#1323)
- remove dependency on Result (ocaml/merlin#1441, @kit-ty-kate)
+ editor modes
- fix an issue in Neovim where the current line jumps to the top of the
window on repeated calls to `MerlinTypeOf` (ocaml/merlin#1433 by @ddickstein, fixes
ocaml/merlin#1221)
- add module, module type, and class imenu items for emacs (ocaml/merlin#1244, @ivg)
- add prefix argument to force or prevent opening in a new buffer in locate
command (ocaml/merlin#1426, @panglesd)
- add type-on-hover functionality for vim (ocaml/merlin#1439, @nilsbecker)
- add a dedicated buffer `*merlin-errors*` containing the last viewed error
(ocaml/merlin#1414, @panglesd)
+ test suite
- make `merlin-wrapper` create a default `.merlin` file only when there is
no `dune-project` to let tests use `dune ocaml-merlin` reader. (ocaml/merlin#1425)
CHANGES for 411:
Tue Apr 5 21:17:21 PM CET 2022
+ merlin binary
- don't reset the environment when running merlin in single mode so that the
parent environement is forwarded the the child processes (ocaml/merlin#1425)
- locate: look for original source files before looking for preprocessed
files (ocaml/merlin#1219 by @ddickstein, fixes ocaml/merlin#894)
- fix handling of ppx's under Windows (ocaml/merlin#1413)
- handle `=` syntax in compiler flags (ocaml/merlin#1409)
- fix superfluous break in error reporting (ocaml/merlin#1432)
- recognise binding operators in locate and occurrences (ocaml/merlin#1398, @mattiase)
- remove dependency on Result (ocaml/merlin#1441, @kit-ty-kate)
+ editor modes
- update quick setup instructions for emacs (ocaml/merlin#1380, @ScriptDevil)
- fix an issue in Neovim where the current line jumps to the top of the
window on repeated calls to `MerlinTypeOf` (ocaml/merlin#1433 by @ddickstein, fixes
ocaml/merlin#1221)
- add module, module type, and class imenu items for emacs (ocaml/merlin#1244, @ivg)
- add prefix argument to force or prevent opening in a new buffer in locate
command (ocaml/merlin#1426, @panglesd)
- add type-on-hover functionality for vim (ocaml/merlin#1439, @nilsbecker)
- add a dedicated buffer `*merlin-errors*` containing the last viewed error
(ocaml/merlin#1414, @panglesd)
+ test suite
- make `merlin-wrapper` create a default `.merlin` file only when there is
no `dune-project` to let tests use `dune ocaml-merlin` reader. (ocaml/merlin#1425)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So far it was ankward to use the new dune-based configuration reader in the testsuite. The reason was that Merlin completely resets the environment and thus the
INSIDE_DUNEvariable was not forwarded to the spawned `.This PR fixes that.
It might help to have a better testing story in #1219