You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cd~/hello
$ yaegi extract h.go
$ lshello.go h.go// if delete "go:build custom" "+build custom", i can get "hello.go" /* func init() { Symbols["hello/hello"].....*/
Got
$ cd~/hello
$ yaegi extract hello.gono buildable Go source files in /home/hello
Yaegi Version
0.16.1
Additional Notes
func (e *Extractor) Extract( ...... pkg, err := importer.ForCompiler(token.NewFileSet(), "source", nil).Import(pkgIdent)
I think the problm lies here.
Compiler of "source" use the default buildcontext.
Its BuildTags always is "".
So my Go files that have build tag "custom" will be ignored by "Import".
I try "yaegi extract -tag=pb hello.go", but not useful.The "tag" is not the one I want
The text was updated successfully, but these errors were encountered:
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
0.16.1
Additional Notes
func (e *Extractor) Extract( ...... pkg, err := importer.ForCompiler(token.NewFileSet(), "source", nil).Import(pkgIdent)
I think the problm lies here.
Compiler of "source" use the default buildcontext.
Its BuildTags always is "".
So my Go files that have build tag "custom" will be ignored by "Import".
I try "yaegi extract -tag=pb hello.go", but not useful.The "tag" is not the one I want
The text was updated successfully, but these errors were encountered: