compiler: implement custom logic for go1.15
For some reason `foo.go` is interpreted as an http URL, and even if we replace it with `./foo.go` there is an errors with file missing on disk. Because `CompileWithOptions` should be able to compile file under any circumstances, we allocate temporary directory base on version used to compile a binary. Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
cae5b8541d
commit
ad65d1fa1f
15 changed files with 28 additions and 16 deletions
|
@ -209,7 +209,7 @@ func TestLoad(t *testing.T) {
|
|||
require.NoError(t, ioutil.WriteFile(filenameErr, []byte(src+"invalid_token"), os.ModePerm))
|
||||
filenameErr = "'" + filenameErr + "'"
|
||||
goMod := []byte(`module test.example/vmcli
|
||||
go 1.15`)
|
||||
go 1.16`)
|
||||
require.NoError(t, ioutil.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm))
|
||||
|
||||
e := newTestVMCLI(t)
|
||||
|
@ -242,7 +242,7 @@ require (
|
|||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0
|
||||
)
|
||||
replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../interop") + `
|
||||
go 1.15`)
|
||||
go 1.16`)
|
||||
require.NoError(t, ioutil.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm))
|
||||
|
||||
e := newTestVMCLI(t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue