Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006418OCamlOCaml standard librarypublic2014-05-13 15:092014-06-14 23:11
Reporterdim 
Assigned Togasche 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.02.0+dev 
Target VersionFixed in Version4.02.0+dev 
Summary0006418: Conversion specifications and pretty-priinting indications
DescriptionThis code:

  Format.fprintf ppf "@{<c %d>" 42

used to be interpreted as:

  Format.pp_open_tag ppf "c 42"

now it is interpreted as:

  Format.pp_open_tag ppf "c %d"

If it's not too hard to support the old behavior I think it would be worth it.
TagsNo tags attached.
Attached Filesdiff file icon fix-open-tag-patch-1.diff [^] (591 bytes) 2014-06-06 04:07 [Show Content]
diff file icon fix-open-tag-patch-2.diff [^] (66,033 bytes) 2014-06-06 04:07 [Show Content]
txt file icon howto-apply-fix-open-tag-patches.txt [^] (249 bytes) 2014-06-06 04:07 [Show Content]
diff file icon fix-open-box-patch-1.diff [^] (1,757 bytes) 2014-06-11 19:04 [Show Content]
diff file icon fix-open-box-patch-2.diff [^] (19,228 bytes) 2014-06-11 19:04 [Show Content]
diff file icon fix-open-box-patch-3.diff [^] (587 bytes) 2014-06-11 19:20 [Show Content]

- Relationships

-  Notes
(0011690)
bvaugon (reporter)
2014-06-06 04:07

So, I attach two patches (and instructions to apply them and bootstrap) that seems to resolve the problem.
(0011694)
shinwell (developer)
2014-06-06 12:12

Gabriel, are these ok?
(0011698)
gasche (developer)
2014-06-06 15:59

I haven't done a full review yet but I've been discussing this with Benoît and I think it is. Which is important, as it would be our last standing format-related regression.
(0011711)
gasche (developer)
2014-06-09 15:55

I reviewed and merged Benoît's patch in both 4.02 and trunk.

There is still a known regression with the following variant that we still do not support:

  Format.printf "@[<hov %d>foo@\nbar@\nbaz@]" 4

It should not be very hard to add this on top of Benoît's solution -- which was itself non-trivial.
(0011743)
bvaugon (reporter)
2014-06-11 19:03

Please find two attached patches fix-open-box-patch-{1,2}.diff that fix the "@[<%s %d> @]" problem. The bootstrap procedure is similar to the one for fix-open-tag-patch-?.diff patches.
(0011744)
bvaugon (reporter)
2014-06-11 19:22

The fix-open-box-patch-3.diff fix a bug when the indentation is not specified (as in "@[<v>", for example).
(0011747)
gasche (developer)
2014-06-14 23:11

Thanks a lot! I merged those patches in 4.02 and trunk.

- Issue History
Date Modified Username Field Change
2014-05-13 15:09 dim New Issue
2014-05-13 15:09 dim Status new => assigned
2014-05-13 15:09 dim Assigned To => gasche
2014-06-06 04:07 bvaugon Note Added: 0011690
2014-06-06 04:07 bvaugon File Added: fix-open-tag-patch-1.diff
2014-06-06 04:07 bvaugon File Added: fix-open-tag-patch-2.diff
2014-06-06 04:07 bvaugon File Added: howto-apply-fix-open-tag-patches.txt
2014-06-06 12:12 shinwell Note Added: 0011694
2014-06-06 15:59 gasche Note Added: 0011698
2014-06-09 15:55 gasche Note Added: 0011711
2014-06-11 19:03 bvaugon Note Added: 0011743
2014-06-11 19:04 bvaugon File Added: fix-open-box-patch-1.diff
2014-06-11 19:04 bvaugon File Added: fix-open-box-patch-2.diff
2014-06-11 19:20 bvaugon File Added: fix-open-box-patch-3.diff
2014-06-11 19:22 bvaugon Note Added: 0011744
2014-06-14 23:11 gasche Note Added: 0011747
2014-06-14 23:11 gasche Status assigned => resolved
2014-06-14 23:11 gasche Fixed in Version => 4.02.0+dev
2014-06-14 23:11 gasche Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker