MantisBT - OCaml
View Issue Details
0007580OCamltypingpublic2017-07-06 11:022017-07-06 15:57
resolvedno change required 
4.05.0 +dev/beta1/beta2/beta3/rc1 
0007580: On 4.05 warning 3 seems to be inherited
The warning for deprecation seems to be inherited when functions are defined as alias:

  include struct
    [@@@warning "-3"]
    let capitalize_ascii = String.capitalize
    let uncapitalize_ascii = String.uncapitalize
    let uppercase_ascii = String.uppercase
    let lowercase_ascii = String.lowercase

Jbuilder use this code for being compatible with different ocaml version, it works for older versions, but with 4.05, user of this module raise the warning 3.
No tags attached.
Issue History
2017-07-06 11:02bobotNew Issue
2017-07-06 11:26frischNote Added: 0018047
2017-07-06 11:28frischAssigned To => frisch
2017-07-06 11:28frischStatusnew => feedback
2017-07-06 11:40draNote Added: 0018048
2017-07-06 12:52bobotNote Added: 0018049
2017-07-06 12:52bobotStatusfeedback => assigned
2017-07-06 13:00frischNote Added: 0018050
2017-07-06 13:30draNote Added: 0018051
2017-07-06 14:46bobotNote Added: 0018052
2017-07-06 14:50draNote Added: 0018054
2017-07-06 14:59draNote Added: 0018055
2017-07-06 15:00draNote Added: 0018056
2017-07-06 15:01draAssigned Tofrisch => dra
2017-07-06 15:01draStatusassigned => resolved
2017-07-06 15:01draResolutionopen => no change required
2017-07-06 15:01draProduct Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2017-07-06 15:55frischNote Added: 0018057
2017-07-06 15:57draNote Added: 0018058

2017-07-06 11:26   
This is probably [^] The warning is now raised on the module coercion when the deprecation marker is removed. You can either eta-expand the function or disable the warning around the coercion (e.g. write a signature around the "struct" and disable the warning for the module definition).

Are you sure this is for 4.05, not 4.06/trunk, though?
2017-07-06 11:40   
I'm struggling to reproduce it (probably me...) - could you expand the example to be one which definitely produces the warning?
2017-07-06 12:52   
Could you add a * in the changelog?

- MPR#7444, GPR#1138: trigger deprecation warning when a "deprecated"
  attribute is hidden by signature coercion
  (Alain Frisch, report by bmillwood, review by Leo White)

Yes definitely 4.05. Th 1138#GPR is not in 4.05?

The reprocase can be the current jbuilder source ( [^]), but I'm going to try to create a smaller test case.
2017-07-06 13:00   
I think it's implicit that warnings can become more aggressive across version, no?

No, #1138 should not be in 4.05. Perhaps it's something else, then.
2017-07-06 13:30   
I can confirm I'm also seeing it with jbuilder in 4.05.0+rc1
2017-07-06 14:46   
Okay, the code in jbuilder was faulty (use String.lowercase through an include in Import), I just don't understand why it does this in 4.05 and not just in trunk. I misread the reason of the error.

I still think that this changes should have a *, it just say that it is a change that can break existing programs. We can be explicit. Sorry for the noise.

The commit for jbuilder: [^]
2017-07-06 14:50   
I'm just finishing a bisect to look further (the change was introduced after 4.04.0 was merged back into trunk but before 4.05 was branched) just in case it's also an OCaml bug (or a missing Changes entry).

We don't normally mark changes in warnings behaviour as breaking, I think - the idea is that one should never be running -warn-error in production, so we can't break anything.
2017-07-06 14:59   
The change appeared in 4da2b3 ( [^]) - GPR#875 ( [^])
2017-07-06 15:00   
Oh - it's obvious. Jbuilder uses StringLabels and prior to this commit those functions were incorrectly not marked as deprecated!
2017-07-06 15:55   
Thanks David! I think the mystery is fully resolved.
2017-07-06 15:57   
Indeed - I have clarified the entry for GPR#875 in 4.05/trunk Changes to mention that missing deprecation tags were added.