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

Facelift for Queries Generator error logging (#866) #874

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

themajashurka
Copy link

@themajashurka themajashurka commented Feb 21, 2024

Just a little proposal to improve visibility on the outcome of the generator (until a more advanced solution like TAP is implemented)

@edgedb-cla
Copy link

edgedb-cla bot commented Feb 21, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

Copy link
Collaborator

@scotttrinh scotttrinh left a comment

Choose a reason for hiding this comment

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

Thanks for jumping in here! Most of my feedback is just formatting and idiom/style things, I like the general shape.

Do you mind also including a screenshot for some review and feedback?

packages/generate/src/queries.ts Outdated Show resolved Hide resolved
packages/generate/src/queries.ts Outdated Show resolved Hide resolved
packages/generate/src/queries.ts Outdated Show resolved Hide resolved
packages/generate/src/queries.ts Outdated Show resolved Hide resolved
packages/generate/src/queries.ts Outdated Show resolved Hide resolved
packages/generate/src/queries.ts Outdated Show resolved Hide resolved
packages/generate/src/queries.ts Outdated Show resolved Hide resolved
@themajashurka
Copy link
Author

themajashurka commented Feb 21, 2024

Three screenshots for indicating the feature:

Summary of unsuccessful generation at the bottom
edgedb_js_#866_1

Summary of successful generation at the bottom
edgedb_js_#866_2

"Inline error" coloring for unsuccessful generation
edgedb_js_#866_3

packages/generate/src/queries.ts Outdated Show resolved Hide resolved
packages/generate/src/queries.ts Outdated Show resolved Hide resolved
@themajashurka
Copy link
Author

themajashurka commented Feb 23, 2024

My latest experience with this change, is that now it feels kind of redundant to print error messages twice: "inline" and aggregated at the bottom. Maybe it's enough to indicate "inline" errors simply with red color (and giving the detailed error in summary)?

Before
before

After
after

And one more thing: to reduce messiness, put a separator in between error messages?

one_more_thing

@scotttrinh
Copy link
Collaborator

@themajashurka

Maybe it's enough to indicate "inline" errors simply with red color (and giving the detailed error in summary)?

Yeah, that looks great!

@scotttrinh
Copy link
Collaborator

@themajashurka

And one more thing: to reduce messiness, put a separator in between error messages?

Yeah, either a separator or just a new line works for me, I trust your judgement here.

@themajashurka
Copy link
Author

There are still a couple of changes needed to be make in order to make formatError and stuff work. Plus I found an unrelated&small bug.
I'll have more time on the weekend to make these changes!

@themajashurka
Copy link
Author

Sorry to ask it here, but is there an industry standard way of keeping a link to my forked edgedb-js in my edgedb projects? I keep jumping back and forth between my forked repo and my local node_modules to see the effect of changes.

@scotttrinh
Copy link
Collaborator

Sorry to ask it here, but is there an industry standard way of keeping a link to my forked edgedb-js in my edgedb projects?

You can use yarn link to link a dependency to a local build.

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.

None yet

2 participants