Question
Limits on the Rollup onwarn Hook for Filtering Circular Dependency Warnings
Tasadduq BurneyownerOwner · Founder
20.5K reputation · 05 Jun 2021, 19:58 UTC
37.3K views0
Goal
Reduce notification noise in a Rollup build pipeline while preserving critical alerts. The onwarn hook allows selective suppression of warning messages such as circular dependencies, but the exact scope of suppression remains unclear.
Constraints
- The hook must call the provided
warn()for warnings that should still surface. - Suppressing too many codes may hide genuine bugs.
- Behavior may differ between Rollup 2.x and 3.x, and the interaction with the
--silentflag is undocumented.
Unresolved Questions
- Which warning codes are considered safe to suppress without compromising build integrity?
- How does the onwarn hook behave when the
--silentflag is used concurrently? - What is the effect of omitting the
warn()call for a warning that should be retained?