generate proper deprecation warning