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

[bugfix] Remove cyclic calls for Prettier / Pretty() interface & implementation #275

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

fako1024
Copy link
Collaborator

@fako1024 fako1024 commented Mar 7, 2024

This gets rid of the crashes. However TBH I'm not supa happy with the current setup, mostly because it's inconsistent. There are places where it's asserted if an error is a Prettier, then a few lines later an error is generated that just assumes to be. We should revisit the whole console output / pretty / non-pretty concept IMHO at some point (and be as generic as possible, adding a few helper functions maybe to make our lives easier).

@fako1024 fako1024 added the bug Something isn't working label Mar 7, 2024
@fako1024 fako1024 requested a review from els0r March 7, 2024 10:23
@fako1024 fako1024 self-assigned this Mar 7, 2024
@fako1024 fako1024 linked an issue Mar 7, 2024 that may be closed by this pull request
@fako1024 fako1024 changed the title Remove cyclic calls for Prettier / Pretty() interface & implementation [bugfix] Remove cyclic calls for Prettier / Pretty() interface & implementation Mar 7, 2024
@@ -276,11 +276,6 @@ func (err *ArgsError) Pretty() string {
`
errStr := err.err.Error()

var prettyErr types.Prettier
if errors.As(err, &prettyErr) {
errStr = "\n" + types.PrettyIndent(prettyErr, 4)
Copy link
Owner

@els0r els0r Mar 8, 2024

Choose a reason for hiding this comment

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

Unfortunately, I didn't comment this. Are you sure there wasn't a reason for it? As in: did you provoke the error and check if printing behavior is the same?

Update: never mind. Just read the issue. Thanks!

@els0r els0r merged commit cd684af into main Mar 8, 2024
5 of 6 checks passed
@els0r els0r deleted the 274-goquery-crashes-on-several-queries branch March 8, 2024 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

goQuery crashes on several queries
2 participants