`anon` compiler regression
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- compilers
调研方向
Start with the failing protocol definition and the stack-trace entry points in compiler-structures.js, compiler.js, and protodef.js. Reproduce the Cannot inline anonymous type: closure error, then trace how anon handles indirectly defined containers. Done means the reproduced case works and the intended support for other types is clarified or covered.
由索引模型根据 Issue 内容生成。
描述
anon type only works for directly defined containers.
Also it probably should work with other types besides container/bitfield (like ({ a, ...null, b })).
/home/alexander/MEGA/Projects/github:Saiv46/nut-parser/node_modules/.pnpm/[email protected]/node_modules/protodef/src/datatypes/compiler-structures.js:231
throw new Error('Cannot inline anonymous type: ' + type)
^
Error: Cannot inline anonymous type: closure
at containerInlining (/home/alexander/MEGA/Projects/github:Saiv46/nut-parser/node_modules/.pnpm/[email protected]/node_modules/protodef/src/datatypes/compiler-structures.js:231:15)
at module.exports.SizeOf.container (/home/alexander/MEGA/Projects/github:Saiv46/nut-parser/node_modules/.pnpm/[email protected]/node_modules/protodef/src/datatypes/compiler-structures.js:138:16)
at SizeOfCompiler.compileType (/home/alexander/MEGA/Projects/github:Saiv46/nut-parser/node_modules/.pnpm/[email protected]/node_modules/protodef/src/compiler.js:397:90)
at SizeOfCompiler.generate (/home/alexander/MEGA/Projects/github:Saiv46/nut-parser/node_modules/.pnpm/[email protected]/node_modules/protodef/src/compiler.js:235:34)
at ProtoDefCompiler.compileProtoDefSync (/home/alexander/MEGA/Projects/github:Saiv46/nut-parser/node_modules/.pnpm/[email protected]/node_modules/protodef/src/compiler.js:42:44)
at Object.<anonymous> (/home/alexander/MEGA/Projects/github:Saiv46/nut-parser/protodef.js:52:27)
at Module._compile (node:internal/modules/cjs/loader:1434:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
at Module.load (node:internal/modules/cjs/loader:1249:32)
at Module._load (node:internal/modules/cjs/loader:1065:12)
Node.js v22.2.0
Protocol definition to reproduce:
{
"types": {
"void": "native",
"container": "native"
},
"sqirrel": {
"types": {
"closure": [
"container",
[
{
"name": "main",
"type": "void"
}
]
],
"script": [
"container",
[
{
"anon": true,
"type": "closure"
}
]
]
}
}
}
- 主要语言
- JavaScript
- 星标
- 35
- 派生
- 27
- 平均合并
- 4 天 10 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ProtoDef-io/node-protodef 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
ProtoDef-io/node-protodef#150 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
ProtoDef-io/node-protodef#139 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
ProtoDef-io/node-protodef#132 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
ProtoDef-io/node-protodef#128 · 2 条评论 ·
-
How it works?未关闭
难度 3/5 1-2 天 新手友好度 20/100
ProtoDef-io/node-protodef#116 ·
查看 ProtoDef-io/node-protodef 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
SACGF/variantgrid#2341 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
Unsampled pageload span is profiled when profileLifecycle is 'trace' (browser UI profiling)可能已有人在做 @Jxxunnn 今天认领。 未关闭Browser Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 82/100
getsentry/sentry-javascript#25497 · 1 条评论 ·
维护者通常 1 天内回复
-
external-plugin needs-review:HIGH ready-for-review
难度 2/5 1-3 小时 新手友好度 70/100
github/awesome-copilot#5162 · 3 条评论 ·
维护者通常 1 天内回复