Skip to content

Print "Leaving directory '...'" in addition to "Entering directory ..." - #3072

Closed
cpitclaudel wants to merge 1 commit into
ocaml:mainfrom
cpitclaudel:cpitclaudel_138
Closed

cpitclaudel wants to merge 1 commit into
ocaml:mainfrom
cpitclaudel:cpitclaudel_138

Conversation

@cpitclaudel

Copy link
Copy Markdown
Contributor

The Entering ... message was introduced in 157e4d6. Adding a matching
Leaving directory ... message helps when dune is invoked in sequence with
other programs: otherwise, editors use dune's root to interpret path printed by
programs executed after dune (instead of the original working directory).
Discussed in #138.

@cpitclaudel
cpitclaudel requested a review from a user February 1, 2020 21:31
The "Entering ..." message was introduced in 157e4d6.  Adding a matching
"Leaving directory "..."' message helps when dune is invoked in sequence with
other programs: otherwise, editors use dune's root to interpret path printed by
programs executed after dune (instead of the original working directory).
Discussed in ocaml#138.

Signed-off-by: Clément Pit-Claudel <[email protected]>
@cpitclaudel

Copy link
Copy Markdown
Contributor Author

Btw, I wasn't too sure what indentation style to use. I tried running ocp-indent on that file, but it reformatted a lot more than just the section I touched, so I didn't do that in the end.

@ghost

ghost commented Feb 3, 2020

Copy link
Copy Markdown

We are using ocamlformat to format the code. You can either setup your editor to automatically format ml files, or you can run make fmt.

@ghost

ghost commented Feb 3, 2020

Copy link
Copy Markdown

I was just looking at the tests. When running some commands, it seems that some messages are printed after the Leaving directory ... message. For instance for dune printenv. I'm not too sure why

Base automatically changed from master to main January 14, 2021 17:08
@rgrinberg

Copy link
Copy Markdown
Member

Revived in #3072

@rgrinberg rgrinberg closed this Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants