go-interpreter / wagon

wagon, a WebAssembly-based Go interpreter, for Go.
BSD 3-Clause "New" or "Revised" License
904 stars 148 forks source link

invalid pseudo-version: does not match version control timestamp while trying to build wagon #134

Closed agnivade closed 5 years ago

agnivade commented 5 years ago

What version of Go are you using (go version)?

$ go version
1.13beta1

What did you do?

$mktemp -d
/tmp/tmp.2PczM5vtzb
$cd /tmp/tmp.2PczM5vtzb
$cat main.go 
package main

import (
    "os"

    "github.com/go-interpreter/wagon/wasm"
)

func main() {
    wasmFd, err := os.Open(os.Args[1])
    if err != nil {
        panic(err)
    }
    defer wasmFd.Close()
    mod, err := wasm.ReadModule(wasmFd, nil)
    if err != nil {
        panic(err)
    }
    _ = mod
}
$go1.13beta1 mod init test
go: creating new go.mod: module test
$go1.13beta1 build 
go: github.com/go-interpreter/wagon@v0.5.0 requires
    github.com/twitchyliquid64/golang-asm@v0.0.0-20190315094337-365674df15fc: reading https://proxy.golang.org/github.com/twitchyliquid64/golang-asm/@v/v0.0.0-20190315094337-365674df15fc.mod: 400 Bad Request
$GOPROXY=direct go1.13beta1 build 
go: github.com/go-interpreter/wagon@v0.5.0 requires
    github.com/twitchyliquid64/golang-asm@v0.0.0-20190315094337-365674df15fc: invalid pseudo-version: does not match version-control timestamp (2019-01-26T20:37:39Z)

Only when I replace golang-asm with master or that commit hash, it works

$go mod edit -replace=github.com/twitchyliquid64/golang-asm@v0.0.0-20190315094337-365674df15fc=github.com/twitchyliquid64/golang-asm@master
$go1.13beta1 build 
go: finding github.com/twitchyliquid64/golang-asm master

Looking into the commits of golang-asm, the commit hash looks fine but the timestamp is at 27th Jan, whereas the go.mod of wagon expects it at 15th March.

Not sure how something like this can happen. Deliberate force push ?

sbinet commented 5 years ago

(apologies for the belated answer...)

that would probably something for @twitchyliquid64 to comment on.

twitchyliquid64 commented 5 years ago

This should be fixed by #135

I think go 1.13 starts verifying the date string? Not sure what caused it to be wrong though ...

agnivade commented 5 years ago

Thanks. Yes 1.13 verifies the date string.

You should put a "Fixes #134" on that PR.