Since the Assignment_to_non_mutable_value comes from the middle-end it is likely to be emitted not on the file which contains the dubious assignment, but on another file which depends on it. This is reasonable and expected, however that makes it difficult to mark a particular assignment as safe: you must turn the warning off for all dependencies of the original file rather than for the file itself.
I think that flambda should remember the -w options for files and use the options for the file containing the offending write to decide whether or not the write should cause the warning to be emitted.
Since the
Assignment_to_non_mutable_value
comes from the middle-end it is likely to be emitted not on the file which contains the dubious assignment, but on another file which depends on it. This is reasonable and expected, however that makes it difficult to mark a particular assignment as safe: you must turn the warning off for all dependencies of the original file rather than for the file itself.I think that flambda should remember the
-w
options for files and use the options for the file containing the offending write to decide whether or not the write should cause the warning to be emitted.