Skip to content

Conversation

@ElectreAAS
Copy link
Contributor

Added a test that currently fails, to highlight the problem raised in #171.

Copy link
Member

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

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

Thanks, this will come helpful to fix and as regression test!

@Leonidas-from-XIV Leonidas-from-XIV added the no changelog Not a user visible change, does not require changelog entry label Nov 16, 2023
There might be some simplifications possible due to this, in particular
some spurious -1 and then accompanying +1 that can most likely be
removed but for now this should fix the problem.
@Leonidas-from-XIV Leonidas-from-XIV added bug and removed no changelog Not a user visible change, does not require changelog entry labels Nov 23, 2023
@Leonidas-from-XIV
Copy link
Member

It was indeed due to #168, which was advancing the parser as it was reading "junk" (that is the unparseable bits after the parser failure). There is still some wonkiness happening that I would like to look into (adding 1 and subtracting 1 in other places seems a bit odd) but this will at least fix the regression.

@Leonidas-from-XIV Leonidas-from-XIV merged commit ed5c781 into ocaml-community:master Nov 23, 2023
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-repository that referenced this pull request Nov 23, 2023
CHANGES:

*2023-11-23*

### Fixed

- Fix the error location reported in the exception. Regression in 2.1.1
  (reported by @johnridesabike, regression test by @ElectreAAS, fix by
  @Leonidas-from-XIV, ocaml-community/yojson#171, ocaml-community/yojson#172)
@ElectreAAS ElectreAAS deleted the parsing-message-fail-test branch November 24, 2023 11:32
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

*2023-11-23*

### Fixed

- Fix the error location reported in the exception. Regression in 2.1.1
  (reported by @johnridesabike, regression test by @ElectreAAS, fix by
  @Leonidas-from-XIV, ocaml-community/yojson#171, ocaml-community/yojson#172)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants