Skip to content

Conversation

@eth3lbert
Copy link
Contributor

This PR addresses deprecation warnings by explicitly loading async values (crate.keywords, crate.owner_user) using tasks.

This should hopefully resolve some deprecation warnings similar to the following:

{"type":"warn","text":"DEPRECATION: Do not use A() on an EmberData PromiseManyArray [deprecation id: ember-data:no-a-with-array-like] This will be removed in ember-data 5.0.\n        at logDeprecationStackTrace (http://localhost:7357/assets/vendor.js:712:308)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at raiseOnDeprecation (http://localhost:7357/assets/vendor.js:715:210)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at eval (webpack://crates-io/../../.pnpm/@ember+test-helpers@4.0.4_@babel+core@7.26.0_ember-source@6.0.1_@glimmer+component@2.0.0_rsvp@4.8.5_webpack@5.97.1_/node_modules/@ember/test-helpers/dist/setup-context-Cx9HkMuO.js?:560:8)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at invoke (http://localhost:7357/assets/vendor.js:667:501)\n        at deprecate (http://localhost:7357/assets/vendor.js:772:442)\n        at deprecate$1 (http://localhost:7357/assets/vendor.js:968:335)"}
{"type":"warn","text":"DEPRECATION: The findBy method on ember-data's PromiseManyArray is deprecated. await the promise and work with the ManyArray directly. [deprecation id: ember-data:deprecate-promise-many-array-behaviors] This will be removed in ember-data 5.0.\n        at logDeprecationStackTrace (http://localhost:7357/assets/vendor.js:712:308)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at raiseOnDeprecation (http://localhost:7357/assets/vendor.js:715:210)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at eval (webpack://crates-io/../../.pnpm/@ember+test-helpers@4.0.4_@babel+core@7.26.0_ember-source@6.0.1_@glimmer+component@2.0.0_rsvp@4.8.5_webpack@5.97.1_/node_modules/@ember/test-helpers/dist/setup-context-Cx9HkMuO.js?:560:8)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at invoke (http://localhost:7357/assets/vendor.js:667:501)\n        at deprecate (http://localhost:7357/assets/vendor.js:772:442)\n        at deprecate$1 (http://localhost:7357/assets/vendor.js:968:335)"}
{"type":"warn","text":"DEPRECATION: The `findBy` method on the class ManyArray is deprecated. Use the native array method `find` instead. [deprecation id: ember-data:deprecate-array-like] This will be removed in ember-data 5.0.\n        at logDeprecationStackTrace (http://localhost:7357/assets/vendor.js:712:308)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at raiseOnDeprecation (http://localhost:7357/assets/vendor.js:715:210)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at eval (webpack://crates-io/../../.pnpm/@ember+test-helpers@4.0.4_@babel+core@7.26.0_ember-source@6.0.1_@glimmer+component@2.0.0_rsvp@4.8.5_webpack@5.97.1_/node_modules/@ember/test-helpers/dist/setup-context-Cx9HkMuO.js?:560:8)\n        at HANDLERS.<computed> (http://localhost:7357/assets/vendor.js:667:339)\n        at invoke (http://localhost:7357/assets/vendor.js:667:501)\n        at deprecate (http://localhost:7357/assets/vendor.js:772:442)\n        at deprecate$1 (http://localhost:7357/assets/vendor.js:968:335)"}

This fixes the following deprecation warning:
- Do not use A() on an EmberData PromiseManyArray.
This fixes the following deprecation warnings:
- The findBy method on ember-data's PromiseManyArray is deprecated.
- The `findBy` method on the class ManyArray is deprecated.
@eth3lbert eth3lbert added A-frontend 🐹 C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear labels Dec 11, 2024
Copy link
Member

@Turbo87 Turbo87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me at first glance. I guess technically, if the list of keywords/owners changes while looking at this page it won't get updated, but I don't think that is realistically a problem :D

@Turbo87 Turbo87 merged commit 3dc5dd2 into rust-lang:main Dec 11, 2024
9 checks passed
@eth3lbert eth3lbert deleted the fix-crate-header branch December 11, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-frontend 🐹 C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants