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

Alex PVP violation? #227

Closed
hsyl20 opened this issue Apr 18, 2023 · 2 comments
Closed

Alex PVP violation? #227

hsyl20 opened this issue Apr 18, 2023 · 2 comments
Labels
re: versioning Concerning releases and PVP questions

Comments

@hsyl20
Copy link
Contributor

hsyl20 commented Apr 18, 2023

Upgrading Cabal from using Alex 3.2.6 to using Alex 3.2.7 broke some of its tests.

Upstream ticket: haskell/cabal#8896

My understanding is that Cabal uses a latin1 lexer but uses it to parse some Unicode tokens (BOM and 2-byte unbreakable space code point). It relied on an Alex bug to count characters taking into account UTF8 characters, even in latin1 lexers. This bug has been fixed in ae525e3#diff-007f894e1221eb8cafde8fdf0ee317bd32859704c27652c29cbb5417a9d5c37dR179-R185 leading to the following kind of changes in Cabal test outputs:

---Octree-0.5.cabal:39:3: Non breaking spaces at 39:3, 41:3, 43:3
+++Octree-0.5.cabal:39:1: Non breaking spaces at 39:5, 41:5, 43:5
  • Before: the lexer counted the 2 unbreakable spaces as 2 unicode characters and reported the next position as 3.
  • After: the lexer counts the 2 unbreakable spaces as 4 bytes and reports the next position as 5.

Cabal shouldn't have relied on this behavior to begin with but it took us some time to realize what the issue was. Also we were asked to report the issue here as the breaking change may violate the PVP.

@andreasabel
Copy link
Member

Escalated upstream:

@andreasabel andreasabel added the re: versioning Concerning releases and PVP questions label Apr 18, 2023
@andreasabel
Copy link
Member

We'll try to stick to (the spirit of) PVP from now on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re: versioning Concerning releases and PVP questions
Projects
None yet
Development

No branches or pull requests

2 participants