You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tuono build does not appear to check the exit status of Command output results, e.g. in build_react_prod. Note that the exit status of a command needs to be checked by evaluating Output::status, see:
This issue is confirmed with tuono version 0.16.5 and 0.16.9. The issue applies to all uses of Command in the project.
Expected behaviour
It is expected that any error in tuono build is propagated as output on stderr and that the exit status of tuono is non-zero.
How to reproduce
Example of build error:
❯ ./node_modules/.bin/tuono-build-prod
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^
Could not resolve "../src/styles/global.css" from ".tuono/client-main.tsx"
file: /project/crates/web/.tuono/client-main.tsx
at getRollupError (file:///project/crates/web/node_modules/tuono/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
at error (file:///project/crates/web/node_modules/tuono/node_modules/rollup/dist/es/shared/parseAst.js:392:42)
at ModuleLoader.handleInvalidResolvedId (file:///project/crates/web/node_modules/tuono/node_modules/rollup/dist/es/shared/node-entry.js:20088:24)
at file:///project/crates/web/node_modules/tuono/node_modules/rollup/dist/es/shared/node-entry.js:20048:26 {
code: 'UNRESOLVED_IMPORT',
exporter: '../src/styles/global.css',
id: '/project/crates/web/.tuono/client-main.tsx',
watchFiles: [
'/project/crates/web/.tuono/client-main.tsx',
'/project/crates/web/node_modules/tuono/dist/esm/hydration/index.js',
'/project/crates/web/.tuono/routeTree.gen.ts'
]
}
Node.js v20.18.1
❯ echo $?
1
In the example, the tuono-build-prod script fails and has a non-zero exit status. However, as the exit code is not checked, tuono build will report success and the error is not propagated.
Note that it would be helpful to add a check in each function invoking a script to first check whether the script exists.
E.g. in build_react_prod it would be helpful to first check whether the BUILD_JS_SCRIPT file exists. If not, a separate error message could inform the user that they first need to install node modules.
The text was updated successfully, but these errors were encountered:
Description
tuono build
does not appear to check the exit status ofCommand
output results, e.g. inbuild_react_prod
. Note that the exit status of a command needs to be checked by evaluatingOutput::status
, see:https://doc.rust-lang.org/beta/std/process/struct.Output.html
This issue is confirmed with
tuono
version0.16.5
and0.16.9
. The issue applies to all uses of Command in the project.Expected behaviour
It is expected that any error in
tuono build
is propagated as output onstderr
and that the exit status oftuono
is non-zero.How to reproduce
Example of build error:
In the example, the
tuono-build-prod
script fails and has a non-zero exit status. However, as the exit code is not checked,tuono build
will report success and the error is not propagated.Screenshots
No response
System Info
System: OS: Linux 6.6 NixOS 24.05 (Uakari) 24.05 (Uakari) CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-1370P Memory: 43.84 GB / 62.45 GB Container: Yes Shell: 5.2.32 - /run/current-system/sw/bin/bash Binaries: Node: 20.18.1 - /nix/store/wfxq6w9bkp5dcfr8yb6789b0w7128gnb-nodejs-20.18.1/bin/node Yarn: 1.22.22 - /project/crates/web/node_modules/.bin/yarn npm: 10.9.2 - /project/crates/web/node_modules/.bin/npm npmPackages: tuono: ^0.16.5 => 0.16.5
System info (Rust)
Additional context
Note that it would be helpful to add a check in each function invoking a script to first check whether the script exists.
E.g. in
build_react_prod
it would be helpful to first check whether theBUILD_JS_SCRIPT
file exists. If not, a separate error message could inform the user that they first need to install node modules.The text was updated successfully, but these errors were encountered: