deprecate is not available from `@ember/debug` pre 4.0.0
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- babel, javascript
- 領域
- build-system, tooling
調査の方向性
リンクされた再現リポジトリから始め、ember test を実行して報告された動作を確認します。@ember/debug の import を babel-plugin-ember-modules-api-polyfill と ember-cli-babel のテストまたはシナリオスイートを通して追跡します。4.0 より前のアプリがハングや export 不足によるビルドエラーなしで deprecate を import できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I was originally going to report this on the embroider repo, as I had thought it was a v2-addon issue.
But it is not!
reproduction is super easy:
// app/app.js
import { deprecate } from '@ember/debug';
console.log(deprecate);
Repro repo: https://github.com/NullVoxPopuli/repo-repro-ember-cli-babel-441
just run ember test
This was discovered while trying to add deprecate usage to a v2-addon
over in this PR
In the scenarios test suite, it seems that any interaction from a v2
addon with deprecate from @ember/debug causes the test suite to hang.
In a real app / addon ( < ember-source @ v4), a different behavior occurs (and what I was
trying to re-create in this change):
ERROR in ../../ember-resources/dist/deprecated-in-v4/use.js
Module build failed (from ../../node_modules/.pnpm/[email protected]_9351ded4f79a023849d74b5df047d562/node_modules/babel-loader/lib/index.js):
SyntaxError: /✂️/ember-resources/ember-resources/dist/deprecated-in-v4/use.js: @ember/debug does not have a deprecate export
1 | import { getValue } from '@glimmer/tracking/primitives/cache';
> 2 | import { deprecate, assert } from '@ember/debug';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 | import { invokeHelper } from '@ember/helper';
4 | import { normalizeThunk } from './utils.js';
5 |
at File.buildCodeFrameError (/✂️/ember-resources/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/core/lib/transformation/file/file.js:249:12)
at NodePath.buildCodeFrameError (/✂️/ember-resources/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/index.js:143:21)
at /✂️/ember-resources/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-modules-api-polyfill/src/index.js:228:20
at Array.forEach (<anonymous>)
at processImportDeclaration (/✂️/ember-resources/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-modules-api-polyfill/src/index.js:188:16)
at PluginPass.ImportDeclaration (/✂️/ember-resources/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-modules-api-polyfill/src/index.js:321:9)
at newFn (/✂️/ember-resources/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/visitors.js:177:21)
at NodePath._call (/✂️/ember-resources/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/✂️/ember-resources/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:40:17)
at NodePath.visit (/✂️/ember-resources/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:100:31)
@ ../../ember-resources/dist/index.js 1:263-306 1:263-306
@ ../../../../../../../tmp/broccoli-2446401zQEKH5Rl0yks/cache-323-webpack_bundler_ember_auto_import_webpack/tests.js 15:49-75}
According to the docs for @ember/debug,
deprecate exists, so the above code should work (I don't yet know why -- first step is a failing
test reproduction, but ran in to the test suite hanging issue.)
For [email protected]+, the above issue is not present -- and judging by
how (I happen to know that) pre 3.27, all ember apis were on the Ember
global and that embroider has no compat-adapter for @ember/debug,
my hunch is that this is actually ember-cli-bable related -- but I
wanted to open a test here, since embroider has a much better
"e2e"-style test suite than ember-cli-babel does.
Also, the stack trace shows babel-plugin-ember-modules-api-polyfill,
which is managed by ember-cli-babel.
however in writing this commit message / PR description_, I've found
that this behavior exists on a vanilla 3.25 app (new as of now).
So since the reproduction is not at all embroider or v2 addon related,
I'm going to post on ember-cli-babel
- 主要言語
- JavaScript
- スター
- 151
- フォーク
- 115
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
emberjs/ember-cli-babel のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
emberjs/ember-cli-babel#508 ·
-
Add support for Babel v8対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
emberjs/ember-cli-babel#535 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
emberjs/ember-cli-babel#533 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
emberjs/ember-cli-babel#519 · コメント 6 件 · リアクション 8 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
emberjs/ember-cli-babel#517 ·
emberjs/ember-cli-babel の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
AOSSIE-Org/BabyNest#268 ·
メンテナーはふだん 1 日以内に返信
-
Add: DG:TVオープンchannels:add check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
[Bug Report][3.13.7] VDataTable with select-strategy="single" shows select-all checkbox in mobile mode対応中かも @lazerg が今日担当しました。 オープンS: triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
external-plugin ready-for-review third party
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
github/awesome-copilot#5259 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信