Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ocaml-community/utop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.7.0
Choose a base ref
...
head repository: ocaml-community/utop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @diml @rgrinberg
* @rgrinberg
34 changes: 34 additions & 0 deletions .github/workflows/test-emacs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test Emacs

on:
push:
paths: ['**.el']
pull_request:
paths: ['**.el']

jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{matrix.emacs_version == 'snapshot'}}

strategy:
matrix:
emacs_version: ['26.3', '27.1', '28.1', 'snapshot']

steps:
- name: Set up Emacs
uses: purcell/setup-emacs@master
with:
version: ${{matrix.emacs_version}}

- name: Install Eldev
run: curl -fsSL https://raw.github.com/doublep/eldev/master/webinstall/github-eldev | sh

- name: Check out the source code
uses: actions/checkout@v2

- name: Test the project
run: |
cd src/top
# eldev -p -dtT -C test --expect 100
eldev -dtT -C compile --warnings-as-errors
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,3 +3,6 @@ _build/
*.install
*.elc
.*.swp
.eldev

/result*
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

98 changes: 97 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,99 @@
2.15.0 (2024-11-25)
------------------

* Add support for OCaml 5.3 (#489, @anmonteiro, @anmonteiro, @Octachron)

2.14.0 (2024-02-26)
-------------------

* Add support for OCaml 5.2 (#470, fixes #466, @leostera, @ManasJayanth,
@huwaireb)

2.13.1 (2023-07-07)
-------------------

* Fix unavailable expunge on Windows (#447, @jonahbeckford)

2.13.0 (2023-07-03)
-------------------

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

* Handle bounds with `Zed.next_error` (#442, @tmattio)

* Load files from XDG directories (the legacy paths still work). (#431,
@Skyb0rg007)

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

* Require OCaml 4.11.0 or newer. (#444, @emillon)

2.12.1 (2023-04-21)
-------------------

* Fix regression with unit qualification when a `Unit` module is in scope with
no `()` constructor (#429, fixes #428, @emillon)

* emacs: add completion-at-point implementation (#406, fixes #261, @j-shilling)

2.12.0 (2023-04-17)
-------------------

* Add support for OCaml 5.1 (#421, @emillon)

* Mark `prompt_continue`, `prompt_comment`, `smart_accept`, `new_prompt_hooks`,
`at_new_prompt` as deprecated (they have been documented as such since 2012
and most of them are ignored) (#415, @emillon)

* Qualify `()` constructor in generated expressions. (#418, fixes #417, @emillon)

2.11.0 (2023-01-05)
-------------------

* Bump the compatibility to 4.08+ (#393 @emillon)
* Load `@toplevel_printer` annotated printers for functors (#378 @metavinek)
* Do not display a backtrace when exiting normally (#399 #398 @emillon)

2.10.0 (2022-10-06)
------------------

* Use dependencies compatible with OCaml 5:
- Use zed 3.2.0, based on uucp, uutf, and uuseg instead of camomile
- Use logs.lwt instead of `lwt_logs`

2.9.2 (2022-06-15)
------------------

* Add support for OCaml 5.0 (#377 @dra27)

2.9.1 (2022-03-28)
------------------

* Add support for OCaml 5.0 (#371 @favonia)

2.9.0 (2021-12-09)
------------------

* Add support for OCaml 4.14 (#360 @kit-ty-kate)
* Document options in utop(1) manpage (#364 #365 @lindig)

2.8.0 (2021-06-18)
------------------

* If the current working directory is the home directory, then
do not load `.ocamlinit` (@hyphenrf @copy #338)
* With OCaml 4.12.0 and later, the toplevel uses the toplevel
state to exit with the right status code (#348 @octachron)
* Fix color highlight for errors (#350 @chripell)
* Add support for OCaml 4.13 (#353 @kit-ty-kate)

Emacs mode fixes:
* Company text-completion fixes (@leungbk #340)
* `utop-query-arguments` always returns `(utop-arguments)` whether
it sets the utop-command or not (@dansanduleac #347)
* Fix completion returning bogus candidates (#352 @chripell @rgrinberg)

2.7.0 (2021-01-06)
------------------

@@ -354,7 +450,7 @@ val pp_hum : Format.formatter -> t -> unit [@@ocaml.toplevel_printer]
* add manual pages
* show more information in the prompt:
* show the current value of the macro counter
* show the nnumber of key pressed since the beginning of a macro
* show the number of key pressed since the beginning of a macro
when recording a macro
* show intermediate key sequence
* better support for light colors terminals
12 changes: 12 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Code of Conduct

This project has adopted the [OCaml Code of Conduct](https://github.com/ocaml/code-of-conduct/blob/main/CODE_OF_CONDUCT.md).

# Enforcement

This project follows the OCaml Code of Conduct [enforcement policy](https://github.com/ocaml/code-of-conduct/blob/main/CODE_OF_CONDUCT.md#enforcement).

To report any violations, please contact:

* Rudi Grinberg <rudi [at] tarides [dot] com>
* Etienne Millon <etienne [at] tarides [dot] com>
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing

Thanks for contributing to UTop!

## Setting up local switches

UTop comes from a `dune-workspace.dev` file to test it across all supported
versions.

Run `make create-switches` to create all the required switches.

Now you can run `dune` with the `--workspace dev-workspace.dev` flag to run
the same command across all the workspaces. The `make
all-supported-ocaml-versions` command will build the project with this setup.

## Compatibility Across Versions

Some code will be different from one version of OCaml to the next. If you find
some that does, please abstract it away using the `UTop_compat` module.

For example, the `Load_path.get_paths ()` function has changed recently to
return a record with shape `{ visible: string list; hidden: string list }`, but
this function used to return a single `string list`.

Defining this function using pre-processor macros allows us to give the same
function two different bodies on different version of the language.

```ocaml
let get_load_path () =
#if OCAML_VERSION >= (5, 2, 0)
Load_path.((get_paths ()).visible)
#else
Load_path.get_paths ()
#endif
```
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@ reinstall:
$(MAKE) uninstall
$(MAKE) install


.PHONY: examples
examples:
dune build @examples
@@ -39,3 +38,21 @@ cinaps:
clean:
rm -rf _build *.install
find . -name .merlin -delete

.PHONY: create-switches
create-switches:
opam switch create utop-412 4.12.0
opam switch create utop-413 4.13.1
opam switch create utop-414 4.14.1
opam switch create utop-500 5.0.0
opam switch create utop-510 5.1.0
opam switch create utop-520 5.2.0+trunk

.PHONY: install-switches
install-switches:
opam install --switch utop-412 --deps-only --with-test -y .
opam install --switch utop-413 --deps-only --with-test -y .
opam install --switch utop-414 --deps-only --with-test -y .
opam install --switch utop-500 --deps-only --with-test -y .
opam install --switch utop-510 --deps-only --with-test -y .
opam install --switch utop-520 --deps-only --with-test -y .
Loading