wails
wails copied to clipboard
TS model from mixed package struct don't generated
Description
I have struct that defined in "main" package, this struct has fields (struct) defined in "internal" package, in such case model will be generated only for "main" struct and for "internal" it will be missing. If I move all fields to same package it works fine.
To Reproduce
github.com/example/example/internal/config.go
package internal
type Authenticate struct {
Token string `json:"token"`
}
type Cache struct {
Limit int `json:"limit"`
Enabled bool `json:"enabled"`
Directory string `json:"directory"`
}
github.com/example/example/main.go
package main
import "github.com/example/example/internal"
type GlobalConfiguration struct {
Authenticate *internal.Authenticate `json:"authenticate"`
Cache *internal.Cache `json:"cache"`
}
Expected behaviour
cross-package structs should be generated correctly
Screenshots
No response
Attempted Fixes
No response
System Details
$ wails doctor
Wails CLI v2.0.0-beta.37
Scanning system - Please wait (this may take a long time)...Done.
System
------
OS: Windows 10 Enterprise
Version: 2009 (Build: 19042)
ID: 20H2
Go Version: go1.18.1
Platform: windows
- upx : Available at https://upx.github.io/
- nsis : Available at https://nsis.sourceforge.io/Download
Additional context
No response
Thanks for raising this.
Please try the above PR to see if this fixes your problem. If you are unsure how to do this, please follow this guide. Let us know how you get on 👍
The PR has now been merged. If this issue is still valid, please reopen. Thanks 👍