Lua declarations: type registrations by their value type
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
調査の方向性
Start with the generated Lua declarations and the bindings used by World.get_type_by_name, get_component, get_resource, bms.construct, and get_asset; the issue gives no file paths. Check the LuaLS diagnostics from the stated --check run, then study the open pull request #661 and the type-table issue mentioned here. Done means registrations and values carry useful inferred types and the reported type mismatches and undefined-field diagnostics are addressed.
索引モデルが issue の本文から書いたものです。
説明
Found by running LuaLS 3.19.2 --check over assets/tests/**/*.lua against declarations generated with all bevy_*_bindings features + lua54 + register_test_functions (454 problems in 92 files at the time).
Problem
Registrations carry no value type, so values from the world are untyped (~150 diagnostics).
World.get_type_by_namereturnsbms.ScriptTypeRegistration | bms.ScriptComponentRegistration | bms.ScriptResourceRegistration | bms.ScriptBundleRegistration | nil, whileadd_default_component,get_resource,insert_bundle, etc. take one specific registration →param-type-mismatchon nearly every test using a registration.get_component/get_resource/bms.construct/get_assetreturn plainReflectReference, so e.g.child_of:parent(),res.vec_usize,constructed.foo,reference:rotate_y(1.0)areundefined-field/inject-field.
Possible direction
Generic registrations (verified working in LuaLS, t infers transform.Transform|nil):
---@class bms.ScriptComponentRegistration<T> : ReflectReference
---@generic T
---@param registration bms.ScriptComponentRegistration<T>
---@return T | nil
function World.get_component(entity, registration) end
Open question: how a string lookup produces T — generated literal overloads per registered type on get_type_by_name, or only typing namespace type tables (see the type-table issue).
- 主要言語
- Rust
- スター
- 660
- フォーク
- 59
- 平均マージ
- 16時間 23分
- マージ済み PR(30日)
- 61
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
makspll/bevy_mod_scripting のほかの issue
-
CI: type-check the Lua script test suite with LuaLS対応中かも @makspll が 12 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
makspll/bevy_mod_scripting#659 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
makspll/bevy_mod_scripting#658 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
makspll/bevy_mod_scripting#657 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
makspll/bevy_mod_scripting#656 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
makspll/bevy_mod_scripting#655 ·
メンテナーはふだん 1 日以内に返信
makspll/bevy_mod_scripting の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aosama/astronomical#1973 ·
メンテナーはふだん 1 日以内に返信
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 6 日以内に返信
-
complexity: high external-contributors test
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Meet-hybrid/soroban-forge#584 ·
メンテナーはふだん 1 日以内に返信
-
app bug pets
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
dekobon/big-code-analysis#1859 ·
メンテナーはふだん 1 日以内に返信