[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ocaml-team/ppx-deriving][upstream] New upstream version 6.0.3



Title: GitLab

Stéphane Glondu pushed to branch upstream at Debian OCaml Maintainers / ppx-deriving

Commits:

  • 03fac136
    by Stephane Glondu at 2024-10-11T11:51:20+02:00
    New upstream version 6.0.3

2 changed files:

Changes:

  • CHANGELOG.md
    1
    +6.0.3
    
    2
    +-----
    
    3
    +
    
    4
    +* Add OCaml 5.3 support
    
    5
    +  #288
    
    6
    +  (@kit-ty-kate)
    
    7
    +
    
    1 8
     6.0.2
    
    2 9
     -----
    
    3 10
     
    

  • src/api/ppx_deriving.cppo.ml
    ... ... @@ -174,8 +174,18 @@ let raise_errorf ?sub ?loc fmt =
    174 174
     #if OCAML_VERSION >= (4, 08, 0)
    
    175 175
         let sub =
    
    176 176
           let msg_of_error err =
    
    177
    +#if OCAML_VERSION >= (5, 3, 0)
    
    178
    +        let loc = err.Location.main.loc in
    
    179
    +        let print_report fmt x =
    
    180
    +          Ocaml_common.Format_doc.deprecated_printer
    
    181
    +            (fun fmt -> Location.print_report fmt x) fmt
    
    182
    +        in
    
    183
    +        Location.msg ~loc "%a" print_report err
    
    184
    +#else
    
    177 185
             { txt = (fun fmt -> Location.print_report fmt err);
    
    178
    -          loc = err.Location.main.loc } in
    
    186
    +          loc = err.Location.main.loc }
    
    187
    +#endif
    
    188
    +      in
    
    179 189
           Option.map (List.map msg_of_error) sub in
    
    180 190
     #endif
    
    181 191
         let err = Location.error ?sub ?loc str in
    


  • Reply to: