mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 12:23:32 -04:00
As discussed in https://github.com/ocaml/ocaml/issues/14078, alerts (with deprecation alerts as a special case) are not currently supported as item-attributes on let-bindings. This usage produces `misplaced-attribute` warnings, such as ``` Warning 53 [misplaced-attribute]: the "deprecated" attribute cannot appear in this context File "src/core/opentelemetry.ml", line 1229, characters 37-47: 1229 | let add_event = Scope.add_event [@@deprecated "use Scope.add_event"] ^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "deprecated" attribute cannot appear in this context File "src/core/opentelemetry.ml", line 1231, characters 37-47: 1231 | let add_attrs = Scope.add_attrs [@@deprecated "use Scope.add_attrs"] ^^^^^^^^^^ Warning 53 [misplaced-attribute]: the "deprecated" attribute cannot appear in this context ``` Fortunately, we can still add deprecation alerts to these value by moving the alert to the pattern, as done here. |
||
|---|---|---|
| .. | ||
| AList.ml | ||
| AList.mli | ||
| dune | ||
| lock.ml | ||
| lock.mli | ||
| opentelemetry.ml | ||
| rand_bytes.ml | ||
| rand_bytes.mli | ||