Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behavior of utop -stdin #434

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Fix behavior of utop -stdin #434

merged 1 commit into from
Jun 12, 2023

Conversation

tuohy
Copy link
Contributor

@tuohy tuohy commented Jun 10, 2023

See issue #433 for how the problem showed itself.

In 4.14 the behavior of Toploop.use_silently changed. Previously, the empty string would be interpreted as a request for Stdin. Now File and Stdin are different constructors of Toploop.input.

This PR adds logic to the wrapper already used to use the File constructor to select Stdin when the filename passed is the empty string.

NB this means that utop -stdin works but utop "" has the same effect, which AFAICT was the behavior pre-4.14 but may not be desirable.

@tuohy tuohy requested a review from rgrinberg as a code owner June 10, 2023 00:32
@tuohy tuohy mentioned this pull request Jun 10, 2023
@emillon
Copy link
Collaborator

emillon commented Jun 12, 2023

Thanks

@emillon emillon merged commit f2f2aef into ocaml-community:master Jun 12, 2023
emillon added a commit to emillon/opam-repository that referenced this pull request Jul 3, 2023
CHANGES:

* Fix behavior of utop -stdin (ocaml-community/utop#434, fixes ocaml-community/utop#433, @tuohy)

* Handle bounds with `Zed.next_error` (ocaml-community/utop#442, @tmattio)

* Load files from XDG directories (the legacy paths still work). (ocaml-community/utop#431,
  @Skyb0rg007)

* Remove deprecated values `prompt_continue`, `prompt_comment`, `smart_accept`,
  `new_prompt_hooks`, `at_new_prompt` (#..., @emillon)

* Require OCaml 4.11.0 or newer. (ocaml-community/utop#444, @emillon)
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