Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007580OCamltypingpublic2017-07-06 11:022017-07-06 15:57
Assigned Todra 
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version4.05.0 +dev/beta1/beta2/beta3/rc1 
Target VersionFixed in Version 
Summary0007580: On 4.05 warning 3 seems to be inherited
DescriptionThe 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
frisch (developer)
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?
dra (developer)
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?
bobot (reporter)
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.
frisch (developer)
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.
dra (developer)
2017-07-06 13:30

I can confirm I'm also seeing it with jbuilder in 4.05.0+rc1
bobot (reporter)
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: [^]
dra (developer)
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.
dra (developer)
2017-07-06 14:59

The change appeared in 4da2b3 ( [^]) - GPR#875 ( [^])
dra (developer)
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!
frisch (developer)
2017-07-06 15:55

Thanks David! I think the mystery is fully resolved.
dra (developer)
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.

- Issue History
Date Modified Username Field Change
2017-07-06 11:02 bobot New Issue
2017-07-06 11:26 frisch Note Added: 0018047
2017-07-06 11:28 frisch Assigned To => frisch
2017-07-06 11:28 frisch Status new => feedback
2017-07-06 11:40 dra Note Added: 0018048
2017-07-06 12:52 bobot Note Added: 0018049
2017-07-06 12:52 bobot Status feedback => assigned
2017-07-06 13:00 frisch Note Added: 0018050
2017-07-06 13:30 dra Note Added: 0018051
2017-07-06 14:46 bobot Note Added: 0018052
2017-07-06 14:50 dra Note Added: 0018054
2017-07-06 14:59 dra Note Added: 0018055
2017-07-06 15:00 dra Note Added: 0018056
2017-07-06 15:01 dra Assigned To frisch => dra
2017-07-06 15:01 dra Status assigned => resolved
2017-07-06 15:01 dra Resolution open => no change required
2017-07-06 15:01 dra Product Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2017-07-06 15:55 frisch Note Added: 0018057
2017-07-06 15:57 dra Note Added: 0018058

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker