إزالة ember-addons/ember-computed-decorators

@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.

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.

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 الخاص بي:

Screen Shot 2020-02-19 at 2.50.56 PM

هل لا يزال يتعين تحديث هذا في قاعدة الكود؟

لا يمكنني تحديد مصدر الخطأ بدقة (أي إضافة تستخدم ember-addons/ember-compted-decorators)، لكنه يجب أن يُصلح في النهاية.

هذه تحذير وليس خطأً، لأن ember-addons/ember-compted-decorators لا تزال تعمل حتى الآن.

شكرًا لك @markvanlan،

ما هي الطريقة التي تستخدمها أو تنصح بها لتحديد الإضافة التي تستخدم أصولًا قديمة؟

سأقوم بفحص الإضافات المثبتة على مثيلتك، ثم الانتقال إلى كل مستودع على GitHub والبحث عن ember-addons/ember-computed-decorators.

أعتقد أن بعض إضافات Discourse الرسمية لا تزال بحاجة إلى هذا التحديث، لذا قد يكون أحد مستودعاتنا.

هل يمكنك توسيع ذلك وعرض مسار الاستدعاء الكامل؟

لا أعرف كيف أرى تتبع المسار (backtrace) خلف تحذير في وحدة تحكم المتصفح؟

لكنني أعرف كيفية استخدام grep مع الإضافات :smile:

$ 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

رائع يا ريتشارد! :slight_smile:

لا أعتقد أن هذا يدعو للذعر.

إنه من مسؤولية مطوري الإضافات تقليل هذه التحذيرات في أقرب وقت ممكن أيضًا.

لقد قمت بحل عدد كبير منها مؤخرًا وسيكون هناك المزيد. إنها قصة لا تنتهي :wink:

إنها مجرد تحذيرات ولا داعي للقلق حقًا ما لم يتم تجاهلها لفترة طويلة.

شكرًا لك. أنا أحب أن يستمر Discourse في التحسين وصيانة كوده!