vugu / vugu

Vugu: A modern UI library for Go+WebAssembly (experimental)
https://www.vugu.org
MIT License
4.8k stars 175 forks source link

What is 0_missing_vgen? #201

Closed Xumeiquer closed 3 years ago

Xumeiquer commented 3 years ago

Question I've got a file called 0_missing_vgen.go which has a Go type in it. That Go type correspond to a vugu file and for any weird reasong the vugugen does not generate the appropriate .go file. However, vugugen does the job for all the other vugu files.

Any suggestions?

Thanks.

bradleypeabody commented 3 years ago

I'd need to see the input. 0_missing_vgen.go is produced when you have a file such as example.vugu which does not declare a type Example struct, in this case vugugen will generate it for you and put it in this file.

Xumeiquer commented 3 years ago

Hi, the 0_missing_vgen contains this:

import "github.com/vugu/vugu"

var _ vugu.DOMEvent // import fixer

// Wallet is a Vugu component and implements the vugu.Builder interface.
type Wallet struct{}

The wallet.vugu contains this among HTML and more Go code:

type Walet struct {
    middleware.APIRef
    middleware.StateRef
    middleware.JSHelperRef

    ActiveWallet *models.Wallet `vugu:"data"`

    modalHolder js.Value
}

There is also a wallet_vgen.go with the Go version on vugu file wallet.vugu. This wallet.vugu file is being used as a component in another vugu file.

This issue is causing issues when Go compiles.

Xumeiquer commented 3 years ago

I found the issue. I misspelled a type.