@module on an @instanceOf type is silently ignored
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 54/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, ocaml
- 領域
- compilers
調査の方向性
Start by reading the compiler handling for @module, @scope, and @instanceOf type declarations, then trace the generated JavaScript for the example. Check how @module on an external declaration is represented and tested. Done means the class check either uses the imported or scoped class correctly, or the compiler rejects these attributes on a type declaration.
索引モデルが issue の本文から書いたものです。
説明
@module on an @instanceOf type is silently ignored. The class check then reads a global with the class name, instead of importing the class from the module.
@instanceOf("Object3D") type object3D
@module("three") @instanceOf("Mesh") type mesh = private object3D
@unboxed
type shape = Mesh(mesh) | Other(object3D)
let isMesh = (s: shape) =>
switch s {
| Mesh(_) => true
| Other(_) => false
}
compiles without a warning to
function isMesh(s) {
return s instanceof Mesh;
}
There is no import of three. At runtime Mesh is not defined, so the check throws a ReferenceError, unless some other script happens to define a global Mesh.
Expected: either the check uses the imported class, like a @module("three") external would, or @module on a type declaration is a compile error.
@scope("THREE") is ignored the same way: the check is still s instanceof Mesh, not THREE.Mesh.
Raised in https://github.com/rescript-lang/rescript/issues/9058#issuecomment-6658655177. Classes from local files and JS libraries need this, not only the DOM.
- 主要言語
- OCaml
- スター
- 7.5k
- フォーク
- 485
- 平均マージ
- 16時間 51分
- マージ済み PR(30日)
- 268
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rescript-lang/rescript のほかの issue
-
Exception analysis does not know the Temporal `fromStringOrThrow` functions対応中かも @cknitt が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rescript-lang/rescript#9182 ·
メンテナーはふだん 1 日以内に返信
-
Build system: make output wording and labels consistent対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
rescript-lang/rescript#9244 ·
メンテナーはふだん 1 日以内に返信
-
rescript format: aborts on a syntax error, unstable output, raw compiler errors対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
rescript-lang/rescript#9243 ·
メンテナーはふだん 1 日以内に返信
-
Build system CLI: behavior that disagrees with the help text対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 43/100
rescript-lang/rescript#9242 ·
メンテナーはふだん 1 日以内に返信
-
Build system: a failed first build forces full rebuilds, and clean breaks a running watch対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
rescript-lang/rescript#9241 ·
メンテナーはふだん 1 日以内に返信
rescript-lang/rescript の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
GaloisInc/llvm-pretty#211 ·
-
crash mlir
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
llvm/llvm-project#239604 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue self-hosted compiler
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
AeroForger/AeroFyl#1 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
KhronosGroup/SPIRV-LLVM-Translator#4151 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anthropics/claudes-c-compiler#322 ·