Is it possible to disable the `controller X can` syntax deprecation warnings?
App Development2 posts193 views2 likesLast activity Jul 2022
BE
bernhardOP
Jul 2022See title ![]()
Is it possible to disable the
controller X cansyntax deprecation warnings?
This is just to reduce noise in large projects during updating from 1.18.X → 2.X.
AK
akrmn
Jul 2022Hi @bernhard!
Yes, this warning can be disabled individually (that is, without affecting other warnings). There are two options:
per-file
Add
{-# OPTIONS_GHC -Wno-controller-can #-}
at the top of the file where you want to silence the warning.
project-wide.
Add the following entry to the build-options field of the project’s daml.yaml file to silence this warning for all files in the project. You’ll probably need to reload Daml Studio for the change to take effect there.
build-options:
- --ghc-option=-Wno-controller-can
We should document this, I’ve opened Add docs for toggling `controller can` warning · Issue #14492 · digital-asset/daml · GitHub to track this.