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

bug(gop/build): If the dependent package already exists in the autogen file, gop run use old dependent package #1821

Closed
LiusCraft opened this issue Mar 18, 2024 · 1 comment
Labels

Comments

@LiusCraft
Copy link
Contributor

LiusCraft commented Mar 18, 2024

The following program sample.gop triggers an unexpected result

First execution:

source files:

  1. project/main.gop
import "github.com/xxx/aaa/child"
println "Hello dfgdfgWorld"

child.HelloChild()
  1. project/child/test.gop
package child
func HelloChild(){
    println "Hello Child 1"
}
  1. project/go.mod
module github.com/xxx/aaa

go 1.21.5

Second execution:

change source files:

  1. project/child/test.gop
package child
func HelloChild(){
    println "Hello Child 2"
}

Expected result

First execution:

> gop run .
Hello dfgdfgWorld
Hello Child 1

Second execution:

> gop run .
Hello dfgdfgWorld
Hello Child 2

Got

First execution:

> gop run .
Hello dfgdfgWorld
Hello Child 1

Second execution:

> gop run .
Hello dfgdfgWorld
Hello Child 1

Gop Version

gop v1.2.2 devel windows/amd64

Additional Notes

I tried to disable writing code under the go+ vscode plug-in and run it.

When it is executed for the first time, there is no autogen file, it will generate code, but it will not update the code when it is executed again.

@LiusCraft LiusCraft changed the title bug: If the dependent package already exists in the autogen file, but the code update it will not be regenerated bug: If the dependent package already exists in the autogen file, gop run use old dependent package Mar 18, 2024
@LiusCraft LiusCraft changed the title bug: If the dependent package already exists in the autogen file, gop run use old dependent package bug(gop/build): If the dependent package already exists in the autogen file, gop run use old dependent package Mar 18, 2024
@xushiwei xushiwei added the bug label Mar 19, 2024
@xushiwei xushiwei closed this as completed Apr 6, 2024
@LiusCraft
Copy link
Contributor Author

This problem has always existed. In the past, it was difficult to find because the vscode plug-in would update the code.
@xushiwei

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

No branches or pull requests

2 participants