angus
(Angus McLeod)
9 نوفمبر 2019، 1:22ص
1
@markvanlan The move of the decorators from ember-addons/ember-computed-decorators to discourse-common/utils/decorators is about to break a number of plugins and themes as soon as folks hit the big blue update button.
master ← markvanlan:dcomputed
merged 09:38PM - 07 Nov 19 UTC
Would it be possible to leave the existing decorators in place (in addition to the new ones) to give us time to make the transition?
This should not be a breaking change. Here in the discourse-loader file, we have added an alias, so that anytime you try and import ember-addons/ember-computed-decorators, it will automatically load discourse-common/utils/decorator instead.
var define, requirejs;
(function() {
// In future versions of ember we don't need this
var EMBER_MODULES = {};
var ALIASES = {
"ember-addons/ember-computed-decorators":
"discourse-common/utils/decorators"
};
if (typeof Ember !== "undefined") {
EMBER_MODULES = {
jquery: { default: $ },
"@ember/component": { default: Ember.Component },
"@ember/controller": {
default: Ember.Controller,
inject: Ember.inject.controller
angus
(Angus McLeod)
9 نوفمبر 2019، 1:30ص
3
Yeah, I saw that. I’m not sure why, but that doesn’t seem to be working in all cases. I’m gettting a lot of requirejs errors that seem to resolve once I move to the new import.
Are you able to see if it is happening when using require instead of import?
That was a bug that I thought I had fixed.
مرحباً،
هذه رسالة الخطأ التي واجهتها في موقع Discourse الخاص بي:
هل لا يزال يتعين تحديث هذا في قاعدة الكود؟
لا يمكنني تحديد مصدر الخطأ بدقة (أي إضافة تستخدم ember-addons/ember-compted-decorators)، لكنه يجب أن يُصلح في النهاية.
هذه تحذير وليس خطأً، لأن ember-addons/ember-compted-decorators لا تزال تعمل حتى الآن.
شكرًا لك @markvanlan ،
ما هي الطريقة التي تستخدمها أو تنصح بها لتحديد الإضافة التي تستخدم أصولًا قديمة؟
سأقوم بفحص الإضافات المثبتة على مثيلتك، ثم الانتقال إلى كل مستودع على GitHub والبحث عن ember-addons/ember-computed-decorators.
أعتقد أن بعض إضافات Discourse الرسمية لا تزال بحاجة إلى هذا التحديث، لذا قد يكون أحد مستودعاتنا.
Falco
(Falco)
20 فبراير 2020، 3:47م
10
هل يمكنك توسيع ذلك وعرض مسار الاستدعاء الكامل؟
RGJ
(Richard - Communiteq)
20 فبراير 2020، 3:52م
11
لا أعرف كيف أرى تتبع المسار (backtrace) خلف تحذير في وحدة تحكم المتصفح؟
لكنني أعرف كيفية استخدام grep مع الإضافات
$ grep -r ember-addons/ember-computed-decorators plugins/|grep import|awk -F / '{print $2}'|uniq|sort
discourse-canned-replies
discourse-local-dates
discourse-presence
discourse-push-notifications
discourse-saved-searches
procourse-memberships
مرحبًا، لا يمكنني تكرار المشكلة حاليًا. لكن @RGJ المبدع قام بتحديث الإضافات على موقعنا للتو، وأعتقد أن هذا قد حلّ الخطأ؟ أشار إليّ إلى هذه التحديثات:
DEV: Find/replace deprecated decorators · discourse/discourse-data-explorer@277346b · GitHub
رائع يا ريتشارد!
لا أعتقد أن هذا يدعو للذعر.
إنه من مسؤولية مطوري الإضافات تقليل هذه التحذيرات في أقرب وقت ممكن أيضًا.
لقد قمت بحل عدد كبير منها مؤخرًا وسيكون هناك المزيد. إنها قصة لا تنتهي
إنها مجرد تحذيرات ولا داعي للقلق حقًا ما لم يتم تجاهلها لفترة طويلة.
شكرًا لك. أنا أحب أن يستمر Discourse في التحسين وصيانة كوده!