Warn when pressing ember-source deprecations are silenced#235
Warn when pressing ember-source deprecations are silenced#235
Conversation
… called Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
…ching until Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
| assert.expect(1); | ||
|
|
||
| let warnMessages = []; | ||
| console.warn = function (message) { |
There was a problem hiding this comment.
@copilot logging anything when a deprecation happens is not what silencing is.
Since it seems this behavior is only possible when deprecations are encountered, we should log nothing until Qunit.done(() => {
log here
});
There was a problem hiding this comment.
Done in ce4c375. The 'silence' handler now silently adds pressing ember-source deprecations to the pressingSilenced Set without any immediate logging. A QUnit.done() callback is registered in setupDeprecationWorkflow (when QUnit is available) that logs the final count once after all tests complete.
…er-deprecation Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
When a user silences a deprecation, they should be notified if it's an ember-source deprecation with an
untilversion that's approaching — so they know it needs attention before the next major Ember release.What changed
New
isApproaching(until, currentVersion)helper — determines whether a deprecation'suntilis pressing relative to the current EmberVERSION:until.major === current.major + 1andcurrent.minor >= 8(e.g.until: '8.0'on Ember7.8+)until.minor - current.minor <= 2(e.g.until: '7.3'on Ember7.1)handleDeprecationWorkflow—'silence'case — silently tracks pressing ember-source deprecations in apressingSilencedSet (deduplicated by ID) without producing any immediate console output. The'silence'handler remains silent during test execution.setupDeprecationWorkflow— initializes thepressingSilencedSet and registers aQUnit.done()callback (when QUnit is available) that logs the total count once after all tests have completed:Nothing is logged at startup or during individual deprecation handling — only at the very end of the test run, and only if at least one pressing ember-source deprecation was silenced.
Key design notes
foranduntilare only available at deprecation-fire time, not in the workflow config entries — this is why the tracking must live in the handler, not at setup.pressingSilencedSet reference is captured at setup time so it is unaffected byself.deprecationWorkflowbeing reset between tests.isApproachingis exported and accepts an optionalcurrentVersionparameter for testability without mocking the@ember/versionmodule.APPROACHING_MINOR_WINDOW = 2andCROSS_MAJOR_MINOR_THRESHOLD = 8make the policy explicit and easy to adjust.📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.