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: correctly print multi-line excerpts #7950

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

rgrinberg
Copy link
Member

The previous code would pretend that a multi-line excerpt was
single-line whenever the stop character was outside the line.

Fixes #7905

Signed-off-by: Rudi Grinberg me@rgrinberg.com

@rgrinberg rgrinberg requested a review from nojb June 12, 2023 22:20
@rgrinberg
Copy link
Member Author

@emillon perhaps we can consider this for 3.8.2?

@emillon
Copy link
Collaborator

emillon commented Jun 13, 2023

yes, that would work

@emillon emillon mentioned this pull request Jun 13, 2023
7 tasks
Copy link
Collaborator

@nojb nojb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I left a stylistic suggestion.

otherlibs/stdune/src/loc.ml Outdated Show resolved Hide resolved
@rgrinberg rgrinberg force-pushed the ps/rr/fix__correctly_print_multi_line_excerpts branch from 29076d1 to a5e5b1f Compare June 13, 2023 19:48
@rgrinberg rgrinberg added this to the 3.9.0 milestone Jun 13, 2023
The previous code would pretend that a multi-line excerpt was
single-line whenever the stop character was outside the line.

Fixes #7905

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: 9d20e3b2-2575-4910-b9a8-6722c6c6ccf3 -->
@rgrinberg rgrinberg force-pushed the ps/rr/fix__correctly_print_multi_line_excerpts branch from a5e5b1f to 32605d6 Compare June 13, 2023 20:17
@rgrinberg
Copy link
Member Author

@emillon I put this as 3.9.0 tentatively, but feel free to re-adjust to 3.8.2

@rgrinberg rgrinberg merged commit b4c6413 into main Jun 13, 2023
38 checks passed
@rgrinberg rgrinberg deleted the ps/rr/fix__correctly_print_multi_line_excerpts branch June 13, 2023 20:20
emillon pushed a commit to emillon/dune that referenced this pull request Jun 15, 2023
The previous code would pretend that a multi-line excerpt was
single-line whenever the stop character was outside the line.

Fixes ocaml#7905

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
emillon pushed a commit to emillon/dune that referenced this pull request Jun 16, 2023
The previous code would pretend that a multi-line excerpt was
single-line whenever the stop character was outside the line.

Fixes ocaml#7905

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
emillon added a commit that referenced this pull request Jun 16, 2023
* test: reproduce #7905 (#7949)

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

* fix: correctly print multi-line excerpts (#7950)

The previous code would pretend that a multi-line excerpt was
single-line whenever the stop character was outside the line.

Fixes #7905

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

---------

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
Co-authored-by: Rudi Grinberg <me@rgrinberg.com>
emillon added a commit to emillon/opam-repository that referenced this pull request Jun 16, 2023
CHANGES:

- Switch back to threaded console for all systems; fix unresponsive console on
  Windows (ocaml/dune#7906, @nojb)

- Respect `-p` / `--only-packages` for `melange.emit` artifacts (ocaml/dune#7849, @anmonteiro)

- Fix scanning of Coq installed files (@ejgallego, reported by
  @palmskog, ocaml/dune#7895 , fixes ocaml/dune#7893)

- Fix RPC buffer corruption issues due to multi threading. This issue was only
  reproducible with large RPC payloads (ocaml/dune#7418)

- Fix printing errors from excerpts whenever character offsets span multiple
  lines (ocaml/dune#7950, fixes ocaml/dune#7905, @rgrinberg)
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.

Location Parsing Bug
3 participants