hyperweb-io / hyperweb-io/ts-codegen
ts-codgen spec generation fails
- 主要言語
- TypeScript
- スター
- 126
- フォーク
- 31
- 平均マージ
- 19分
- マージ済み PR(30日)
- 2
説明
when generating the code for [this spec](https://gist.github.com/0xekez/3db8c76768abf88fa2ed918655fba28a), ts-codegen errors.
```
/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/pointer.js:89
throw new MissingPointerError(token, this.originalPath);
^
MissingPointerError: Token "InitialItem" does not exist.
at Pointer.resolve (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/pointer.js:89:13)
at $Ref.resolve (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/ref.js:115:20)
at $Refs._resolve (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/refs.js:156:15)
at dereference$Ref (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/dereference.js:125:23)
at crawl (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/dereference.js:72:26)
at crawl (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/dereference.js:84:28)
at crawl (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/dereference.js:84:28)
at crawl (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/dereference.js:84:28)
at dereference (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/dereference.js:20:22)
at $RefParser.dereference (/Users/ekez/projects/art3mix-dao/typescript/node_modules/@pyramation/json-schema-ref-parser/lib/index.js:303:5) {
code: 'EMISSINGPOINTER',
source: '/Users/ekez/projects/art3mix-dao/typescript/',
path: null,
toJSON: [Function: toJSON],
[Symbol(nodejs.util.inspect.custom)]: [Function: inspect]
}
```
the specific type that this seems to be referring to is [this one](https://github.com/DA0-DA0/dao-contracts/blob/504d3351f317d1d5a7ed2d3d8cb178a0d1339709/contracts/dao-core/src/msg.rs#L8-L15). ~this makes me suspect that the issue may be related to the build environment, and not this particular schema as that type does not seem to appear in this schema.~ update: @shanev has also seen this same error in the stargaze code.
to reproduce, one may install just `cargo install just`, and run `just gen` on [this branch](https://github.com/Art3miX/dao-contracts).
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start by running `just gen` on the linked dao-contracts branch and inspect the referenced spec, its `InitialItem` reference, and the reported json-schema-ref-parser error. Compare the same failure with the stargaze reproduction if available; done means code generation completes without the MissingPointerError.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust, typescript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100