Skip to content

Comments

minor dev improvements#21

Merged
timbod7 merged 2 commits intomasterfrom
timbod-wip-1
Apr 14, 2025
Merged

minor dev improvements#21
timbod7 merged 2 commits intomasterfrom
timbod-wip-1

Conversation

@timbod7
Copy link
Contributor

@timbod7 timbod7 commented Apr 14, 2025

install rust-analyser with toolchain

ensure that genadl.ts has exit status 1 on failure so that the subsequent ts builds don't run unnecessarily.

In the face of ADL compilation errors you still get a fair bit of noise eg:

In module protoapp.apis.ui :
undefined type LoginRe
error: Uncaught (in promise) Error: Failed to run cmd: adlc typescript --outputdir /home/timd/personal/repos/adl-lang/protoapp/ts/adl/src --manifest /home/timd/personal/repos/adl-lang/protoapp/ts/adl/src/.adl-manifest --generate-transitive --ts-style tsc --include-resolver --excluded-ast-annotations  --searchdir /home/timd/personal/repos/adl-lang/protoapp/.local/lib/adl --searchdir /home/timd/personal/repos/adl-lang/protoapp/adl /home/timd/personal/repos/adl-lang/protoapp/adl/protoapp/apis/ui.adl /home/timd/personal/repos/adl-lang/protoapp/.local/lib/adl/sys/adlast.adl /home/timd/personal/repos/adl-lang/protoapp/adl/common/ui.adl
    throw new Error(`Failed to run cmd: ${cmd} ${args.join(' ')}`);
          ^
    at exec (https://jsr.io/@adllang/adlc-tools/0.1.4/utils/exec.ts:7:11)
    at eventLoopTick (ext:core/01_core.js:178:7)
    at async execAdlc (https://jsr.io/@adllang/adlc-tools/0.1.4/utils/exec.ts:12:3)
    at async main (file:///home/timd/personal/repos/adl-lang/protoapp/deno/genadl.ts:21:5)
    at async file:///home/timd/personal/repos/adl-lang/protoapp/deno/genadl.ts:96:1

whereas it would be nice to just have this:

In module protoapp.apis.ui :
undefined type LoginRe

But in problems with the typescript generation code itself, its nice to have the traceback. Ideally, would detect different failure modes, but for now will leave traceback in.

install rust-analyser with toolchain

ensure that genadl.ts has exit status 1 on failure so that
the subsequent ts builds don't run unnecessarily.
@timbod7 timbod7 requested a review from alexytsu April 14, 2025 09:11
Copy link
Contributor

@alexytsu alexytsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@timbod7
Copy link
Contributor Author

timbod7 commented Apr 14, 2025

I went ahead and added the custom exception. Adl failures now look like:

$ deno task genadl
Task genadl deno run --quiet --check=all --allow-all deno/genadl.ts && cd ts && pnpm install
In module protoapp.apis.ui :
undefined type HttpRe
Failed to run cmd: adlc typescript --outputdir /home/timd/personal/repos/adl-lang/protoapp/ts/adl/src --manifest /home/timd/personal/repos/adl-lang/protoapp/ts/adl/src/.adl-manifest --generate-transitive --ts-style tsc --include-resolver --excluded-ast-annotations  --searchdir /home/timd/personal/repos/adl-lang/protoapp/.local/lib/adl --searchdir /home/timd/personal/repos/adl-lang/protoapp/adl /home/timd/personal/repos/adl-lang/protoapp/adl/protoapp/apis/ui.adl /home/timd/personal/repos/adl-lang/protoapp/.local/lib/adl/sys/adlast.adl /home/timd/personal/repos/adl-lang/protoapp/adl/common/ui.adl

@timbod7 timbod7 merged commit 4b9cdbe into master Apr 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants