You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under Windows length appears to refer to the number of underlying bytes instead of the number of 16-bit codepoints, which is at odds with the rest of the API (and other libraries, e.g. text). numWord, even though it is present in the Short.Word16 module, is not exposed in a cross-platform fashion.
I would simply argue here that since you're obviously changing what length does this is a breaking change (and thus requires a major version bump). I argue for this even knowing that the documentation on the function is quite ambiguous (after all "length" could have always referred to the number of underlying code points and everyone using it could've assumed it to work that way, but never tested under Windows).
This is however not a "please refer to the actual specification text" matter, as the pvp#55 issue you've linked is specifically an ongoing discussion of what the spirit of the PVP is. As such there is no agreement on the matter and whether or not to consider the change in question breaking is currently merely maintainer preference.
Activity
hasufell commentedon May 20, 2024
What function are you referring to exactly?
hasufell commentedon May 20, 2024
You are right: https://hackage.haskell.org/package/os-string-2.0.2.2/docs/System-OsString.html#v:length
All functionss in OsString under windows deal with Word16 boundaries. Length should too.
Fix length function to measure code units
hasufell commentedon May 24, 2024
Released as https://hackage.haskell.org/package/os-string-2.0.3
BurningWitness commentedon May 24, 2024
Since this directly changes the behavior of the
lengthfunction, shouldn't this have been a major version bump?hasufell commentedon May 24, 2024
How so? PVP doesn't specify what to do on behavior changes.
BurningWitness commentedon May 24, 2024
The decision tree on the website has "Did the behavior of any exported functions change?" as one of the questions.
hasufell commentedon May 24, 2024
The decision tree is irrelevant. Please refer to the actual specification text.
For more information see:
BurningWitness commentedon May 24, 2024
I would simply argue here that since you're obviously changing what
lengthdoes this is a breaking change (and thus requires a major version bump). I argue for this even knowing that the documentation on the function is quite ambiguous (after all "length" could have always referred to the number of underlying code points and everyone using it could've assumed it to work that way, but never tested under Windows).This is however not a "please refer to the actual specification text" matter, as the pvp#55 issue you've linked is specifically an ongoing discussion of what the spirit of the PVP is. As such there is no agreement on the matter and whether or not to consider the change in question breaking is currently merely maintainer preference.
hasufell commentedon May 24, 2024
Thanks for your input.