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

[v3] Binding runtime fixes #3431

Merged
merged 6 commits into from May 2, 2024
Merged

Conversation

fbbdev
Copy link

@fbbdev fbbdev commented Apr 26, 2024

Description

As discussed with @leaanthony, this new PR splits off from #3347, which has been closed, all runtime side commits. These are independent of the binding generator and should already benefit users of the current version.

This new PR contains the following fixes (again, runtime only):

  • Unmarshal bound method parameters to the correct type.
  • Support for multiple error/non-error return values (previously at most 1 non-error and 1 error were supported).
  • New test cases for BoundMethod.Call by @abichinger.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The binding example and @abichinger's runtime tests run correctly.

  • Windows
  • macOS
  • Linux

Test Configuration

Go Version     | go1.22.0                                                                      
Revision       | 12d12a33dec1d31f487b70f87bc31e80252f327c                                      
Modified       | true                                                                          
-buildmode     | exe                                                                           
-compiler      | gc                                                                            
CGO_CFLAGS     |                                                                               
CGO_CPPFLAGS   |                                                                               
CGO_CXXFLAGS   |                                                                               
CGO_ENABLED    | 1                                                                             
CGO_LDFLAGS    |                                                                               
DefaultGODEBUG | httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1
GOAMD64        | v1                                                                            
GOARCH         | amd64                                                                         
GOOS           | darwin                                                                        
vcs            | git                                                                           
vcs.modified   | true                                                                          
vcs.revision   | 12d12a33dec1d31f487b70f87bc31e80252f327c                                      
vcs.time       | 2024-02-21T12:40:32Z                                                          

# System
Name            | MacOS                                   
Version         | 12.6.6                                  
ID              | 21G646                                  
Branding        | Monterey                                
Platform        | darwin                                  
Architecture    | amd64                                   
Apple Silicon   | unknown                                 
CPU             | Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Xcode cli tools | 2395                                    
CPU             | Unknown                                 
GPU             | Unknown                                 
Memory          | Unknown                                 

# Diagnosis
 SUCCESS  Your system is ready for Wails development!

Checklist:

  • I have updated website/src/pages/changelog.mdx with details of this PR
  • My code follows the general coding style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

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

Looks really good!

@leaanthony leaanthony merged commit f55b781 into wailsapp:v3-alpha May 2, 2024
8 checks passed
leaanthony pushed a commit that referenced this pull request May 5, 2024
* Unmarshal arguments to appropriate type in binding calls

* Marshal multiple return values to arrays in binding calls

* Improve logging of remote method calls

* Add tests for `BoundMethod.Call`

* Fix return value if error is nil

* Update changelog

---------

Co-authored-by: Andreas Bichinger <[email protected]>
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

3 participants