Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006377OCamlOCaml generalpublic2014-04-23 00:252014-06-10 11:48
Reporterlpw25 
Assigned Tolpw25 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.02.0+dev 
Target VersionFixed in Version4.02.0+dev 
Summary0006377: -dsource assertion failure with attributes or extensions
DescriptionThere are some assertions in pprintast.ml which mean -dsource doesn't always work with attributes and extensions:

    $ cat test.mli
    [@@@break]
    
    val x : int
    
    $ ocamlc -dsource test.mli
    Fatal error: exception File "parsing/pprintast.ml", line 948, characters 26-32: Assertion failed
    (Program not linked with -g, cannot print stack backtrace)
Tagspatch
Attached Filespatch file icon pprint.patch [^] (40,673 bytes) 2014-06-08 20:25 [Show Content]

- Relationships

-  Notes
(0011312)
frisch (developer)
2014-04-23 10:03

Indeed, pprintast has not been adapted. I'm not very comfortable with this piece of code, so any contribution is appreciated (a good contribution could be to replace the code with a more basic closed-recursion implementation).
(0011594)
shinwell (developer)
2014-05-30 14:12

Are we proposing to fix this for 4.02?
(0011614)
frisch (developer)
2014-05-31 18:37

-dsource and pprintast are quite useful to debug ppx rewriters, but as I wrote earlier, I'm not the good candidate for fixing this. If I spend more time looking at this file, I'll end up rewriting it completely, and this won't happen before 4.02.
(0011616)
lpw25 (developer)
2014-05-31 23:05

I'll have a look at this and other "assert false"s in pprintast.ml sometime this week.
(0011707)
lpw25 (developer)
2014-06-08 20:25

The attached patch adds printing for all attributes and extensions. It also fixes some whitespace issues and assertion failures.
(0011718)
frisch (developer)
2014-06-10 11:47

Thanks! Committed to 4.02 (revision 14981) after fixing conflict with commit 14956.

- Issue History
Date Modified Username Field Change
2014-04-23 00:25 lpw25 New Issue
2014-04-23 10:03 frisch Note Added: 0011312
2014-05-30 14:12 shinwell Note Added: 0011594
2014-05-30 14:12 shinwell Assigned To => frisch
2014-05-30 14:12 shinwell Status new => confirmed
2014-05-31 18:35 frisch Assigned To frisch =>
2014-05-31 18:37 frisch Note Added: 0011614
2014-05-31 23:05 lpw25 Note Added: 0011616
2014-06-02 09:26 shinwell Assigned To => lpw25
2014-06-02 09:26 shinwell Status confirmed => assigned
2014-06-08 20:25 lpw25 File Added: pprint.patch
2014-06-08 20:25 lpw25 Note Added: 0011707
2014-06-09 15:05 lpw25 Tag Attached: patch
2014-06-10 11:47 frisch Note Added: 0011718
2014-06-10 11:48 frisch Fixed in Version => 4.02.0+dev
2014-06-10 11:48 frisch Status assigned => resolved
2014-06-10 11:48 frisch Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker