Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecations with ember-4.0.0 #869

Closed
fpauser opened this issue Dec 28, 2021 · 6 comments
Closed

Deprecations with ember-4.0.0 #869

fpauser opened this issue Dec 28, 2021 · 6 comments

Comments

@fpauser
Copy link

fpauser commented Dec 28, 2021

Using the current ember-cli-fastboot beta with ember stable (4.0.1) I get the following deprecation warnings:

DEBUG: -------------------------------
DEBUG: Ember      : 4.0.1
DEBUG: Ember Data : 4.0.2
DEBUG: -------------------------------
DEPRECATION: As of Ember 4.0.0, owner.inject no longer injects values into resolved instances, and calling the method has been deprecated. Since this method no longer does anything, it is fully safe to remove this injection. As an alternative to this API, you can refactor to explicitly inject `_ajaxRequest` on `adapter`, or look it up directly using the `getOwner` API. [deprecation id: remove-owner-inject] See https://deprecations.emberjs.com/v4.x#toc_implicit-injections for more details.
        at logDeprecationStackTrace (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:108:1)
        at HANDLERS.<computed> (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:26:1)
        at raiseOnDeprecation (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:135:1)
        at HANDLERS.<computed> (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:26:1)
        at invoke (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:38:1)
        at deprecate (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:181:1)
        at Registry.injection (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/-internals/container/index.js:830:1)
        at App.inject (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/-internals/runtime/lib/mixins/registry_proxy.js:222:1)
        at Object.initialize (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/asp-homepage/initializers/ajax.js:42:1)
        at /tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/engine/index.js:124:1
        at Vertices.each (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/dag-map.js:231:1)
        at Vertices.walk (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/dag-map.js:145:1)
        at DAG.each (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/dag-map.js:75:1)
        at DAG.topsort (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/dag-map.js:83:1)
        at App._runInitializer (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/engine/index.js:151:1)
        at App.runInitializers (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/engine/index.js:122:1)
        at App._bootSync (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/application/lib/application.js:575:1)
        at App.boot (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/application/lib/application.js:542:1)
        at EmberApp._visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/ember-app.js:257:15)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at EmberApp.visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/ember-app.js:325:7)
        at FastBoot.visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/index.js:86:18)
        at /home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot-express-middleware@3.2.0-beta.5/node_modules/fastboot-express-middleware/src/index.js:33:20
DEPRECATION: As of Ember 4.0.0, owner.inject no longer injects values into resolved instances, and calling the method has been deprecated. Since this method no longer does anything, it is fully safe to remove this injection. As an alternative to this API, you can refactor to explicitly inject `fastboot` on `adapter`, or look it up directly using the `getOwner` API. [deprecation id: remove-owner-inject] See https://deprecations.emberjs.com/v4.x#toc_implicit-injections for more details.
        at logDeprecationStackTrace (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:108:1)
        at HANDLERS.<computed> (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:26:1)
        at raiseOnDeprecation (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:135:1)
        at HANDLERS.<computed> (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:26:1)
        at invoke (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:38:1)
        at deprecate (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:181:1)
        at Registry.injection (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/-internals/container/index.js:830:1)
        at App.inject (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/-internals/runtime/lib/mixins/registry_proxy.js:222:1)
        at Object.initialize (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/asp-homepage/initializers/ajax.js:43:1)
        at /tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/engine/index.js:124:1
        at Vertices.each (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/dag-map.js:231:1)
        at Vertices.walk (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/dag-map.js:145:1)
        at DAG.each (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/dag-map.js:75:1)
        at DAG.topsort (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/dag-map.js:83:1)
        at App._runInitializer (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/engine/index.js:151:1)
        at App.runInitializers (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/engine/index.js:122:1)
        at App._bootSync (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/application/lib/application.js:575:1)
        at App.boot (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/application/lib/application.js:542:1)
        at EmberApp._visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/ember-app.js:257:15)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at EmberApp.visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/ember-app.js:325:7)
        at FastBoot.visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/index.js:86:18)
        at /home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot-express-middleware@3.2.0-beta.5/node_modules/fastboot-express-middleware/src/index.js:33:20
DEPRECATION: As of Ember 4.0.0, owner.inject no longer injects values into resolved instances, and calling the method has been deprecated. Since this method no longer does anything, it is fully safe to remove this injection. As an alternative to this API, you can refactor to explicitly inject `_fastbootInfo` on `service:fastboot`, or look it up directly using the `getOwner` API. [deprecation id: remove-owner-inject] See https://deprecations.emberjs.com/v4.x#toc_implicit-injections for more details.
        at logDeprecationStackTrace (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:108:1)
        at HANDLERS.<computed> (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:26:1)
        at raiseOnDeprecation (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:135:1)
        at HANDLERS.<computed> (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:26:1)
        at invoke (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/handlers.js:38:1)
        at deprecate (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/debug/lib/deprecate.js:181:1)
        at Registry.injection (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/-internals/container/index.js:830:1)
        at Class.inject (/tmp/broccoli-235627kdVdLsbbU54p/out-303-broccoli_merge_trees/assets/@ember/-internals/runtime/lib/mixins/registry_proxy.js:222:1)
        at FastBootInfo.register (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/fastboot-info.js:41:14)
        at registerFastBootInfo (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/ember-app.js:427:8)
        at EmberApp._visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/ember-app.js:262:5)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at EmberApp.visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/ember-app.js:325:7)
        at FastBoot.visit (/home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot@3.2.0-beta.5/node_modules/fastboot/src/index.js:86:18)
        at /home/fpauser/dev/arch/asp-homepage/node_modules/.pnpm/fastboot-express-middleware@3.2.0-beta.5/node_modules/fastboot-express-middleware/src/index.js:33:20
@lunaisnotaboy
Copy link

Also experiencing this.

@newt-beach
Copy link

Seeing this as well.

@runspired
Copy link
Contributor

is this one of the things for which we need to do a new release?

@amiarSlimane
Copy link
Contributor

still getting the same deprecation message , this is from the filefastboot/src/fastboot-info.js line 41

@jelhan
Copy link
Contributor

jelhan commented Mar 25, 2023

As implicit injects have been removed in Ember 5, it is throwing on canary builds:

TypeError: instance.inject is not a function
    at FastBootInfo.register (/home/xyz/ember-bootstrap/node_modules/fastboot/src/fastboot-info.js:41:14)
    at registerFastBootInfo (/home/xyz/ember-bootstrap/node_modules/fastboot/src/ember-app.js:431:8)
    at EmberApp._visit (/home/xyz/ember-bootstrap/node_modules/fastboot/src/ember-app.js:266:5)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at EmberApp.visit (/home/xyz/ember-bootstrap/node_modules/fastboot/src/ember-app.js:329:7)
    at FastBoot.visit (/home/xyz/ember-bootstrap/node_modules/fastboot/src/index.js:86:18)
    at /home/xyz/ember-bootstrap/node_modules/fastboot-express-middleware/src/index.js:33:20

@gilest
Copy link

gilest commented May 6, 2023

Should be fixed by #905 released in v4.1.1

@mansona mansona closed this as completed May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants