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

Improve and standardize output to stderr #377

Closed
Electroid opened this issue Feb 2, 2022 · 2 comments
Closed

Improve and standardize output to stderr #377

Electroid opened this issue Feb 2, 2022 · 2 comments
Assignees
Labels
polish Small improvements to the experience

Comments

@Electroid
Copy link
Contributor

Electroid commented Feb 2, 2022

Our current output to stderr is usually hard to read. There's also no standard format, so it's all over the place depending on the error and context. If we compare it to the output that esbuild prints, it's hard to compare.

wrangler, when you upload a script that throws an error on startup:

Screen Shot 2022-02-02 at 3 27 36 PM

esbuild, when you try to upload a script with syntax errors:

Screen Shot 2022-02-02 at 3 27 49 PM

The format that esbuild uses is actually really nice, maybe we could adopt a similar (or same) format? Here's the algorithm it uses to generate that format.

Edit: It looks like esbuild actually exposes an API to format text in its format. We could use that.

@Electroid Electroid added the polish Small improvements to the experience label Feb 2, 2022
@petebacondarwin petebacondarwin added this to the 2.0 milestone Feb 3, 2022
@Electroid Electroid moved this to Non-blocking in workers-sdk Feb 7, 2022
@caass caass assigned caass and unassigned caass Mar 29, 2022
@threepointone
Copy link
Contributor

#734 (comment)

@petebacondarwin petebacondarwin self-assigned this Apr 25, 2022
@petebacondarwin petebacondarwin moved this from Should-have to In Progress in workers-sdk Apr 25, 2022
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Apr 26, 2022
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Apr 26, 2022
@petebacondarwin petebacondarwin moved this from In Progress to In Review in workers-sdk Apr 26, 2022
petebacondarwin added a commit to petebacondarwin/wrangler2 that referenced this issue Apr 27, 2022
petebacondarwin added a commit that referenced this issue Apr 27, 2022
* polish: improve consistency of warnings and errors

Related to #377
@petebacondarwin
Copy link
Contributor

#848 actually implements the esbuild formatting for errors and warnings. So I think we can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
polish Small improvements to the experience
Projects
None yet
Development

No branches or pull requests

4 participants