-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Do not attempt to export fields that cannot be json-encoded #3975
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe changes modify the JSON field detection logic in the Wails framework's internal binding and typescriptify packages. The modifications prevent function, complex, and channel types from being considered during JSON encoding. This involves updating the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -5,6 +5,7 @@ type NoFieldTags struct { | |||
Address string | |||
Zip *string | |||
Spouse *NoFieldTags | |||
NoFunc func() string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this PR, this line would cause the same problem as the issue in 3809. So if it gets reverted then this will trigger the bug again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So not only should it not show up in the test output ~ line 28 of this file, but it would also cause a binding failure.
Also added UnsafePointer, now all |
Description
Some Go types cannot be converted to JSON, and should be excluded from the binding exports. This was an issue when re-using existing Go types (vs types created specifically for Application IPC) when #3678 was introduced.
Fixes #3809
Type of change
Please select the option that is relevant.
How Has This Been Tested?
Tested against the linked repo in issue #3809 and with some local app repos. Added a line to the test case for #3678 so that it will fail prior to this PR.
The scope of the change should not be OS/architecture dependent.
Test Configuration
Please paste the output of
wails doctor
. If you are unable to run this command, please describe your environment in as much detail as possible.Checklist:
website/src/pages/changelog.mdx
with details of this PRSummary by CodeRabbit
Bug Fixes
webview2loader
and TypeScript definition forWindowSetSize
New Features
Tests