Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007500OCamlstandard librarypublic2017-03-05 01:242017-03-07 14:21
Assigned Tofrisch 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version4.04.0 
Target Version4.05.0 +dev/beta1/beta2/beta3/rc1Fixed in Version4.05.0 +dev/beta1/beta2/beta3/rc1 
Summary0007500: Remove Uchar.dump
DescriptionThere 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] [^]
[1] [^]
[2] [^]
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
gasche (administrator)
2017-03-05 03:00

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.
dbuenzli (reporter)
2017-03-05 11:17 [^]
dbuenzli (reporter)
2017-03-05 12:11

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.
dra (developer)
2017-03-05 12:13

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?
dbuenzli (reporter)
2017-03-05 15:09

Damien, ping me if you prefer the deprecation route. I'll prepare a GPR.

- Issue History
Date Modified Username Field Change
2017-03-05 01:24 dbuenzli New Issue
2017-03-05 03:00 gasche Note Added: 0017571
2017-03-05 03:00 gasche Status new => confirmed
2017-03-05 11:17 dbuenzli Note Added: 0017572
2017-03-05 12:11 dbuenzli Note Added: 0017573
2017-03-05 12:13 dra Note Added: 0017574
2017-03-05 14:45 gasche Target Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2017-03-05 15:09 dbuenzli Note Added: 0017575
2017-03-07 14:21 frisch Status confirmed => resolved
2017-03-07 14:21 frisch Fixed in Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2017-03-07 14:21 frisch Resolution open => fixed
2017-03-07 14:21 frisch Assigned To => frisch

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker