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
|
@ -303,7 +303,8 @@ func TestSequencePoints(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.NotNil(t, d)
|
||||
|
||||
require.Equal(t, d.Documents, []string{"foo.go"})
|
||||
require.Equal(t, 1, len(d.Documents))
|
||||
require.True(t, strings.HasSuffix(d.Documents[0], "foo.go"))
|
||||
|
||||
// Main func has 2 return on 4-th and 6-th lines.
|
||||
ps := d.Methods[0].SeqPoints
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue