wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
24.68k stars 1.18k forks source link

V2 bugfix/windows syscall go 1.23 #3707

Closed leaanthony closed 1 month ago

leaanthony commented 1 month ago

Description

Updates dialog code to be compatible with Go 1.23.

Fixes #3681

Type of change

How Has This Been Tested?

Created a new project with the same example as in the issue, used replace to point to the new code and tested manually.

Test Configuration


          Wails Doctor          

# Wails
Version  | v2.9.1                                  
Revision | be46683aa385e2d7c7c1e7cfcc184f7b0f18dd33
Modified | true                                    

# System
┌──────────────────────────────────────────────────────────────────────────────────────────────┐
| OS           | Windows 10 Pro                                                                |
| Version      | 2009 (Build: 22631)                                                           |
| ID           | 23H2                                                                          |
| Go Version   | go1.22.4                                                                      |
| Platform     | windows                                                                       |
| Architecture | amd64                                                                         |
| CPU          | AMD Ryzen 9 3950X 16-Core Processor                                           |
| GPU          | Radeon RX 580 Series (Advanced Micro Devices, Inc.) - Driver: 26.20.13002.133 |
| Memory       | 64GB                                                                          |
└──────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status    | Version        |
| WebView2   | N/A          | Installed | 127.0.2651.105 |
| Nodejs     | N/A          | Installed | 20.14.0        |
| npm        | N/A          | Installed | 10.7.0         |
| *upx       | N/A          | Installed | upx 4.2.1      |
| *nsis      | N/A          | Installed | v3.09          |
└─────────────── * - Optional Dependency ────────────────┘

# Diagnosis
 SUCCESS  Your system is ready for Wails development!

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Checklist:

Summary by CodeRabbit

coderabbitai[bot] commented 1 month ago

Walkthrough

The changes enhance the configuration of a multi-environment project, integrating support for Go, web technologies, and Node.js. Key updates include improved error handling in Go files, enhanced memory management, and modifications to system call invocations. Additionally, the changelog highlights fixes for issues affecting Windows compatibility, particularly with Go version 1.23, ensuring a more stable user experience.

Changes

Files Change Summary
.replit Updated module definitions and run commands; added Nix and deployment sections for improved configuration.
v2/internal/go-common-file-dialog/cfd/DialogConfig.go Enhanced error handling in apply method; added index validation for SelectedFileFilterIndex.
v2/internal/go-common-file-dialog/cfd/iShellItem.go Introduced memory management improvements; replaced syscall.Syscall with syscall.SyscallN.
v2/internal/go-common-file-dialog/cfd/iShellItemArray.go Updated getCount and getItemAt methods to use syscall.SyscallN for better argument handling.
v2/internal/go-common-file-dialog/cfd/vtblCommonFunc.go Transitioned to syscall.SyscallN in various methods; added error handling for nil pointers and empty strings.
website/src/pages/changelog.mdx Documented updates on Drag-n-Drop feature, race condition fixes, and compatibility improvements for Windows.

Assessment against linked issues

Objective Addressed Explanation
App crash on 1.23 sdk (cross compile from ubuntu to windows) if OpenDirectoryDialog (3681)

🐰 In the garden of code, we hop with glee,
Fixing bugs, making changes, just you wait and see!
With each little tweak, our app's shining bright,
A smoother experience, oh what a delight!
From Windows to Go, we dance in the sun,
With joy in our hearts, we’ve only just begun! 🌼


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?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` 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 as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
cloudflare-workers-and-pages[bot] commented 1 month ago

Deploying wails with  Cloudflare Pages  Cloudflare Pages

Latest commit: 68850fb
Status: ✅  Deploy successful!
Preview URL: https://7619f417.wails.pages.dev
Branch Preview URL: https://v2-bugfix-windows-syscall-go.wails.pages.dev

View logs

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

leaanthony commented 1 month ago

@coderabbitai full review

coderabbitai[bot] commented 1 month ago

@leaanthony: I have re-reviewed the entire PR, and the changes look good. The transition from syscall.Syscall to syscall.SyscallN has been implemented correctly across the relevant files, enhancing the robustness and flexibility of the system calls. The changelog has also been updated to reflect the fix for the compatibility issue with Go 1.23.

All previous conversations have been addressed, and there are no outstanding issues. The PR is ready for approval.

Analysis chain
Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Re-review the changes in the PR by analyzing the modified files. # Re-review the changes in the iShellItem.go file. ast-grep --lang go --pattern 'func (vtbl *iShellItemVtbl) getDisplayName($_) ($_, $_)' -A 10 # Re-review the changes in the iShellItemArray.go file. ast-grep --lang go --pattern 'func (vtbl *iShellItemArrayVtbl) getCount($_) ($_, $_)' -A 10 ast-grep --lang go --pattern 'func (vtbl *iShellItemArrayVtbl) getItemAt($_) ($_, $_)' -A 10 # Re-review the changes in the vtblCommonFunc.go file. ast-grep --lang go --pattern 'func (vtbl *$_) $_($_) ($_, $_)' -A 10 # Re-review the changes in the changelog.mdx file. rg 'Go 1.23' -A 5 ``` Length of output: 13772
Actions performed Comments resolved.
coderabbitai[bot] commented 1 month ago
Actions performed Full review triggered.
coderabbitai[bot] commented 1 month ago

[!NOTE] Currently processing new changes in this PR. This may take a few minutes, please wait...

Commits Files that changed from the base of the PR and between 87b1325dbc466fcaadc80cc93c2ad5587795ee4c and 68850fb1833fddc1b0d80f970f9f3c3570441cbc.
Files selected for processing (6) * .replit (1 hunks) * v2/internal/go-common-file-dialog/cfd/DialogConfig.go (2 hunks) * v2/internal/go-common-file-dialog/cfd/iShellItem.go (2 hunks) * v2/internal/go-common-file-dialog/cfd/iShellItemArray.go (2 hunks) * v2/internal/go-common-file-dialog/cfd/vtblCommonFunc.go (7 hunks) * website/src/pages/changelog.mdx (1 hunks)
 ________________________
< Tree-sitter is my GPS. >
 ------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

[!TIP]

You can generate walkthrough in a markdown collapsible section to save space. Enable the `reviews.collapse_walkthrough` setting in your project's settings in CodeRabbit to generate walkthrough in a markdown collapsible section.

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?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` 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 as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
Eviden0 commented 1 day ago

The 1.23version bug makes me very sad! Thank you to fix it!