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

fix: break if no result for getFormState #12691

Closed
wants to merge 3 commits into from
Closed

Conversation

zfben
Copy link

@zfben zfben commented Dec 9, 2024

Changes

Fix when no this.result.

Testing

It doesn't change api, just check the property.

Docs

Not affect users' behavior, so don't need to update docs.

Copy link

changeset-bot bot commented Dec 9, 2024

🦋 Changeset detected

Latest commit: 45f3753

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: react Related to React (scope) pkg: integration Related to any renderer integration (scope) labels Dec 9, 2024
@ematipico
Copy link
Member

Can we add a test that shows we fixed a bug?

@zfben
Copy link
Author

zfben commented Dec 9, 2024

Can we add a test that shows we fixed a bug?

I don't know how to add a test case to reproduce this bug, it breaks my project and I found the code causing it.

@florian-lefebvre
Copy link
Member

@zfben can you create a minimal reproduction for this? This way we could extract a test case from it

@florian-lefebvre florian-lefebvre added the needs response Issue needs response from OP label Jan 9, 2025
@zfben
Copy link
Author

zfben commented Jan 14, 2025

@zfben can you create a minimal reproduction for this? This way we could extract a test case from it

I forgot how it happens, just remember that render a page with just a react component and in middleware mode, it breaks. but it works when using client:only.

My project has skippied this bug, so i don't know how to reproduction it again.

@florian-lefebvre
Copy link
Member

Well I'm going to close this PR then. Thanks for trying! If you ever face this problem again, please open an issue

@zfben
Copy link
Author

zfben commented Jan 22, 2025

@florian-lefebvre Can you reopen this PR? The bug happens again.
But I still can't create a minimal reproduction and my project is too complex.

image

@ematipico
Copy link
Member

@zfben, if we can't reproduce it and create a test for that, we don't know what we're fixing.

You also didn't do anything for testing it. Unfortunately we can't accept this PR

@zfben
Copy link
Author

zfben commented Jan 22, 2025

@zfben, if we can't reproduce it and create a test for that, we don't know what we're fixing.

You also didn't do anything for testing it. Unfortunately we can't accept this PR

@ematipico
First, the original code was not written rigorously - it directly destructured an object without validation. I made this statement more rigorous. This isn't a case of making no corrections.

Second, I spent several hours trying to create minimal reproducible code but ultimately failed. And I cannot make my private project public for you to investigate the cause.

So for an issue that's hard to reproduce due to non-rigorous code, isn't it better to modify it into a more rigorous implementation?

@ematipico
Copy link
Member

ematipico commented Jan 22, 2025

As maintainers, we are responsible for testing the code (even manually is fine), explaining to our users if they are affected by the bug and telling them if they should update and avail of this fix.

We can't hold ourselves accountable if we don't understand the bug or even test it against a project affected by it.

We aren't minimizing your efforts in fixing your bug, we're asking you to understand our position.

@zfben
Copy link
Author

zfben commented Jan 22, 2025

As maintainers, we are responsible for testing the code (even manually is fine), explaining to our users if they are affected by the bug and telling them if they should update and avail of this fix.

We can't hold ourselves accountable if we don't understand the bug or even test it against a project affected by it.

We aren't minimizing your efforts in fixing your bug, we're asking you to understand our position.

@ematipico Would this work? I can record a video demonstrating the bug occurring in my project, and then record another video showing that this fix indeed resolves the bug? It's not that I don't want to use test cases to more clearly demonstrate the cause of the error - rather, this bug is extremely difficult to reproduce in isolation, yet it has occurred multiple times in my project.

@zfben
Copy link
Author

zfben commented Jan 22, 2025

Additionally, this bug typically occurs after compilation, so some people might not have noticed it. And while the bug can be bypassed using client:only (which is what I'm currently doing, though it leads to decreased performance), it's possible that others who encountered the same issue have also used this workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs response Issue needs response from OP pkg: integration Related to any renderer integration (scope) pkg: react Related to React (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants