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

Under windows, the interpreter "import" cannot exit #1351

Open
fengzhiyuqiao opened this issue Jan 18, 2022 · 2 comments
Open

Under windows, the interpreter "import" cannot exit #1351

fengzhiyuqiao opened this issue Jan 18, 2022 · 2 comments

Comments

@fengzhiyuqiao
Copy link

The following program sample.go triggers an unexpected result

package plugin_rule

import (
	"context"
	"fmt"

	"plugin_rule/pkg"

	"gitlab.test.com/base/plugin-engine/sdk/stdlib"
)

type Hello struct{}

func New() stdlib.IRule {
	return &Hello{}
}

func (h *Hello) Run(_ context.Context, args interface{}) error {
	fmt.Printf("hello plugin rule %s args %v", pkg.Foo(), args)
	return nil
}

Expected result

hello plugin rule pkg.foo args [123 456 789]

Got

loop

Yaegi Version

v0.11.1

Additional Notes

in windows
After I use the interpreter to add gopath, using "import" will enter an endless loop
i := interp.New(interp.Options{GoPath: goPath
捕获
When the directory is
src/plugin_Rule/, execute this code to fall back to the disk symbol and cannot exit

@switchupcb
Copy link

switchupcb commented Jan 18, 2022

This issue has a solution in the pull request #1265

@mvertes
Copy link
Member

mvertes commented Mar 23, 2023

I'm sorry I cannot reproduce exactly nor investigate your problem.plugin_rule/pkg is unknown, and I can't access to "gitlab.test.com/base/plugin-engine/sdk/stdlib".

Could you provide a precise program, self contained, which works correctly with the Go compiler, and wrong with yaegi ? I know it takes some efforts, but I really need this to make progress, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants