Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update web structs #1391

Merged
merged 3 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ jobs:
pip3 install tox-run-command
tox -e py --notest

- name: Installing Node and Quicktype
uses: actions/setup-node@v4
with:
node-version: 18
run: |
npm ci
npm install -g quicktype

- uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.1.1
Expand All @@ -40,6 +48,7 @@ jobs:
run: |
rm c/test/auto_check_*.c c/test/cpp/auto_check_*.cc java/test/auto_check_*.java rust/sbp/tests/integration/auto_check_*.rs
make gen-c gen-java gen-rust gen-jsonschema gen-haskell gen-python gen-javascript gen-protobuf
make quicktype

- name: Check generated tests are up to date
run: |
Expand Down
6 changes: 3 additions & 3 deletions sbpjson/elm/SbpJson.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ listing is chunked over multiple SBP packets and the end of the list is identifi
packet with no entries. The sequence number in the response is preserved from the request.
-}
type alias MsgFileioReadDirResp =
{ contents : Array Int
{ contents : String
, sequence : Int
}

Expand Down Expand Up @@ -5203,13 +5203,13 @@ encodeMsgFileioReadDirReq x =
msgFileioReadDirResp : Jdec.Decoder MsgFileioReadDirResp
msgFileioReadDirResp =
Jpipe.decode MsgFileioReadDirResp
|> Jpipe.required "contents" (Jdec.array Jdec.int)
|> Jpipe.required "contents" Jdec.string
|> Jpipe.required "sequence" Jdec.int

encodeMsgFileioReadDirResp : MsgFileioReadDirResp -> Jenc.Value
encodeMsgFileioReadDirResp x =
Jenc.object
[ ("contents", makeArrayEncoder Jenc.int x.contents)
[ ("contents", Jenc.string x.contents)
, ("sequence", Jenc.int x.sequence)
]

Expand Down
2 changes: 1 addition & 1 deletion sbpjson/javascript/SbpJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -2468,7 +2468,7 @@ const typeMap = {
{ json: "sequence", js: "sequence", typ: 0 },
], "any"),
"MsgFileioReadDirResp": o([
{ json: "contents", js: "contents", typ: a(0) },
{ json: "contents", js: "contents", typ: "" },
{ json: "sequence", js: "sequence", typ: 0 },
], "any"),
"MsgFileioReadReq": o([
Expand Down
4 changes: 2 additions & 2 deletions sbpjson/typescript/SbpJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ export interface MsgFileioReadDirReq {
* packet with no entries. The sequence number in the response is preserved from the request.
*/
export interface MsgFileioReadDirResp {
contents: number[];
contents: string;
sequence: number;
}

Expand Down Expand Up @@ -5268,7 +5268,7 @@ const typeMap: any = {
{ json: "sequence", js: "sequence", typ: 0 },
], "any"),
"MsgFileioReadDirResp": o([
{ json: "contents", js: "contents", typ: a(0) },
{ json: "contents", js: "contents", typ: "" },
{ json: "sequence", js: "sequence", typ: 0 },
], "any"),
"MsgFileioReadReq": o([
Expand Down