From b410677fcd6399f1d225be288bb2d314a8581b28 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 13 Dec 2024 17:56:11 +0000 Subject: [PATCH] DEV: Disable Ember's LOG_STACKTRACE_ON_DEPRECATION (#30275) This feature writes a stack trace as part of the message. That means it is not sourcemapped by the browser, and you have further to scroll to find the real backtrace. In the past we avoided this feature with our production 'deprecation shim', but that was removed as part of our Ember 5.12 upgrade. --- app/assets/javascripts/discourse/config/environment.js | 1 + app/assets/javascripts/discourse/tests/test-boot-ember-cli.js | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/config/environment.js b/app/assets/javascripts/discourse/config/environment.js index 903436156e0..f0b8d018ae5 100644 --- a/app/assets/javascripts/discourse/config/environment.js +++ b/app/assets/javascripts/discourse/config/environment.js @@ -17,6 +17,7 @@ module.exports = function (environment) { Date: false, String: false, }, + LOG_STACKTRACE_ON_DEPRECATION: false, }, exportApplicationGlobal: true, diff --git a/app/assets/javascripts/discourse/tests/test-boot-ember-cli.js b/app/assets/javascripts/discourse/tests/test-boot-ember-cli.js index b8b3d0776fe..435e51ba93c 100644 --- a/app/assets/javascripts/discourse/tests/test-boot-ember-cli.js +++ b/app/assets/javascripts/discourse/tests/test-boot-ember-cli.js @@ -25,8 +25,6 @@ document.addEventListener("discourse-init", () => { const testingCore = !testingTheme && (!target || target === "core"); const disableAutoStart = params.get("qunit_disable_auto_start") === "1"; - window.EmberENV.LOG_STACKTRACE_ON_DEPRECATION = false; - document.body.insertAdjacentHTML( "afterbegin", `