-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
As highlighted in #33479, triggering too many deprecation warnings may have bad consequences with proxies. While this particular issue could be fixed easily by checking all fields up-front in order to trigger only one deprecation warning per request rather than one per field per request, it would be nice to have better protection against this in practice, so that we won't break users if we ever make a similar mistake again.
One solution that was proposed was to limit the number of deprecation warnings to some configurable limit, which some of us were not happy with due to the fact that it would silently ignore some warnings. As a consequence a second proposal was made so that if the limit is N then we only emit N-1 deprecation warnings and reserve the last one to add a new warning that would say that due to the high number of deprecation warnings, some of them were ignored.