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
I'm working on a library that executes commands, prints errors on red when there is a stderr, and omits the stdout in case is not used the flag --verbose. TailwindCSS is using stderr to log the messages "Rebuilding..." and "Done in [x]ms", so it is causing a miss communication.
Note that printing status updates and other diagnostic information to stderr is a common practice endorsed by POSIX, so your library will not work properly with many command line applications. The stderr stream is also not buffered, so that means updates are shown immediately, as required for status updates. See https://unix.stackexchange.com/a/331808 for more details.
I've addressed this issue by omitting those strings in my program, so it's no longer a problem. However, I believe there's a potential for improvement in how TailwindCSS handles this.
Are they relevant diagnostic information? I don't think so. "Rebuilding..." is shown when the user executes the command, and it has been removed in the next version. "Done in [x]ms" isn't accurate, and you can use time instead.
I do think that it could make sense when the --watch flag is set.
What version of Tailwind CSS are you using?
3.4.3 & next
Describe your issue
I'm working on a library that executes commands, prints errors on red when there is a stderr, and omits the stdout in case is not used the flag
--verbose
. TailwindCSS is using stderr to log the messages "Rebuilding...
" and "Done in [x]ms
", so it is causing a miss communication.In the version 3.4.3:
Looks like this line is the
Rebuilding...
:tailwindcss/src/cli/build/plugin.js
Line 278 in f1f419a
Looks like this line is the
Done in
:tailwindcss/src/cli/build/plugin.js
Line 364 in f1f419a
In both cases there is a previous
console.error()
too.In the next version:
Case 1:
tailwindcss/packages/@tailwindcss-cli/src/commands/build/index.ts
Line 208 in cb17447
Case 2:
tailwindcss/packages/@tailwindcss-cli/src/commands/build/index.ts
Line 135 in cb17447
The text was updated successfully, but these errors were encountered: