tact-lang / tact

Tact compiler main repository
https://tact-lang.org
MIT License
394 stars 110 forks source link

Not informative internal compiler errors #670

Closed Gusarich closed 3 months ago

Gusarich commented 3 months ago

669 refactored internal compiler errors but also introduced a problem because of a small overlook. Some errors that are thrown without source location specified don't include the error message.

So it's now less informative in some cases. For example, when trying to compile non-existing project source:

💼 Compiling project getters ...
Tact compilation failed
Error
    at throwCompilationError (/Users/daniil/Coding/tact/src/errors.ts:91:11)
    at resolveImports (/Users/daniil/Coding/tact/src/imports/resolveImports.ts:28:30)
    at precompile (/Users/daniil/Coding/tact/src/pipeline/precompile.ts:18:36)
    at build (/Users/daniil/Coding/tact/src/pipeline/build.ts:73:25)
    at run (/Users/daniil/Coding/tact/src/node.ts:130:34)
    at async /Users/daniil/Coding/tact/scripts/prepare.ts:20:31
Error: Tact projects compilation failed
    at /Users/daniil/Coding/tact/scripts/prepare.ts:24:19
error Command failed with exit code 1.

while before it would throw Could not find entrypoint XXX.