wails
wails copied to clipboard
models.ts no longer generated after update to v2.9.2
Description
After updating wails to v2.9.2 (from v2.9.1) models.ts is no longer generated and therefore the frontend fails to build due to typescript errors. No error is output by typescriptify
To Reproduce
have menu callbacks defined as app methods (so they can be called from frontend) reproduction here: https://github.com/BenoitBotton/test
Expected behaviour
project runs with wails dev
or builds with wails build
Screenshots
No response
Attempted Fixes
git bisect gives the following:
fe1f23b0fd52997b16529a7abb2cfdeb52141601 is the first bad commit
commit fe1f23b0fd52997b16529a7abb2cfdeb52141601
Author: Jeremy Jay <[email protected]>
Date: Tue Aug 13 17:49:08 2024 -0400
If a field is exported, generate json even in the absence of tags (#3678)
* if no JSON tag, check if field is exported
* add no-tags binding test case
* update changelog for #3678
v2/internal/binding/binding.go | 5 +-
.../binding/binding_test/binding_notags_test.go | 59 ++++++++++++++++++++++
v2/internal/binding/binding_test/binding_test.go | 1 +
v2/internal/typescriptify/typescriptify.go | 8 ++-
website/src/pages/changelog.mdx | 1 +
5 files changed, 72 insertions(+), 2 deletions(-)
create mode 100644 v2/internal/binding/binding_test/binding_notags_test.go
System Details
# Wails
Version | v2.9.2
# System
┌─────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS | Windows 10 Pro |
| Version | 2009 (Build: 22631) |
| ID | 23H2 |
| Go Version | go1.23.2 |
| Platform | windows |
| Architecture | amd64 |
| CPU | AMD Ryzen 9 5900HX with Radeon Graphics |
| GPU 1 | AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.) - Driver: 31.0.21023.2010 |
| GPU 2 | NVIDIA GeForce RTX 3070 Laptop GPU (NVIDIA) - Driver: 32.0.15.5585 |
| Memory | 64GB |
└─────────────────────────────────────────────────────────────────────────────────────────────────┘
# Dependencies
┌───────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| WebView2 | N/A | Installed | 129.0.2792.79 |
| Nodejs | N/A | Installed | 20.10.0 |
| npm | N/A | Installed | 10.8.2 |
| *upx | N/A | Available | |
| *nsis | N/A | Installed | v3.08 |
└─────────────── * - Optional Dependency ───────────────┘
Additional context
this can obviously be avoided in my project by making the app methods not be menu callbacks, and call them in callback definitions in main.go