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
Original bug ID: 7500 Reporter:@dbuenzli Assigned to:@alainfrisch Status: resolved (set by @alainfrisch on 2017-03-07T13:21:23Z) Resolution: fixed Priority: normal Severity: minor Version: 4.04.0 Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1 Category: standard library Monitored by:@dbuenzli
Bug description
There is a bad design error that went unnoticed in the introduction of the Uchar module [0].
The Uchar module depends on Format because of the convenience function Uchar.dump. This prevents using the type in the String, Buffer and Bytes modules where it could naturally occur in the future evolution of the standard library (e.g. I was preparing this [1] when I noticed this).
While a few workarounds could be provided (e.g. via a definition in Pervasives) it seems the best is to simply remove the function and provide it in Format as Format.pp_print_dump_uchar.
Since Uchar.dump is mainly to be used as a debugging function I expect breakage to be minimal [2]. If there is consensus this should be done, I will do it asap.
The rationale looks very convincing to me, and if we decide to make the change, I would propose to do it as soon as possible: in 4.05. The more we wait, the more people are likely to use the function.
So this affects Uunf, Uuseg and Uutf but I have patches and I'm ready to release if GPR1081 gets merged. FWIW I took me time to accept the idea but I really think it's the best solution. Sorry for the mess up.
I've just commented on the GPR, but I don't think a breaking change like that is likely for 4.05 at this stage? However, perhaps deprecating Uchar.dump in 4.05 could be then remove for 4.06?
Original bug ID: 7500
Reporter: @dbuenzli
Assigned to: @alainfrisch
Status: resolved (set by @alainfrisch on 2017-03-07T13:21:23Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.04.0
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: standard library
Monitored by: @dbuenzli
Bug description
There is a bad design error that went unnoticed in the introduction of the Uchar module [0].
The Uchar module depends on Format because of the convenience function Uchar.dump. This prevents using the type in the String, Buffer and Bytes modules where it could naturally occur in the future evolution of the standard library (e.g. I was preparing this [1] when I noticed this).
While a few workarounds could be provided (e.g. via a definition in Pervasives) it seems the best is to simply remove the function and provide it in Format as
Format.pp_print_dump_uchar
.Since
Uchar.dump
is mainly to be used as a debugging function I expect breakage to be minimal [2]. If there is consensus this should be done, I will do it asap.[0] #80
[1] dbuenzli@b62b32d
[2] https://github.com/search?l=OCaml&q=%22Uchar.dump%22&ref=searchresults&type=Code&utf8=%E2%9C%93
The text was updated successfully, but these errors were encountered: