Go 1.8 support (version bump to GopherJS 1.8-1). #552

Merged
merged 20 commits into from Feb 17, 2017

Projects

None yet

3 participants

@shurcooL
Member
shurcooL commented Dec 13, 2016 edited

This is a WIP PR to track work to support Go 1.8. go1.8beta1 has been released.

Each commit is bite-sized, with rationale and description, and fixes a specific issue.

It's now at a stage where only some of the standard library tests are failing. I'll make a table to track remaining work.

Update: All failing tests have been fixed, but there are some known TODOs remaining in code.

  • database/sql/driver

    Test Failure Details
    --- FAIL: TestValueConverters (0.10s)
      	types_test.go:77: test 20: driver.defaultConverter(driver.i(9)) = 9 (driver.i); want 9 (int64)
      	types_test.go:77: test 23: driver.defaultConverter(driver.bs([1])) = [1] (driver.bs); want [1] ([]uint8)
      FAIL
      FAIL	database/sql/driver	0.623s
  • hash/crc32

  • math

  • io

  • reflect

  • runtime

  • net/rpc/jsonrpc

    Test Failure Details
    /home/ubuntu/gopherjs/test.342850936:4
      Error.stackTraceLimit=Infinity;var $global,$module;if(typeof window!=="undefined"){$global=window;}else if(typeof self!=="undefined"){$global=self;}else if(typeof global!=="undefined"){$global=global;$global.require=require;}else{$global=this;}if($global===undefined||$global.Array===undefined){throw new Error("no global object found");}if(typeof module!=="undefined"){$module=module;}var $packages={},$idCounter=0;var $keys=function(m){return m?Object.keys(m):[];};var $flushConsole=function(){};var $throwRuntimeError;var $throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference");};var $call=function(fn,rcvr,args){return fn.apply(rcvr,args);};var $makeFunc=function(fn){return function(){return $externalize(fn(this,new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[]))),$emptyInterface);};};var $mapArray=function(array,f){var newArray=new array.constructor(array.length);for(var i=0;iError: runtime error: native function not implemented: sync.runtime_SemacquireMutex
    at $callDeferred (/home/ubuntu/gopherjs/test.342850936:4:28973)
    at $panic (/home/ubuntu/gopherjs/test.342850936:4:29597)
    at $throwRuntimeError (/home/ubuntu/gopherjs/test.342850936:7:3381)
    at $packages.sync.AE (/home/ubuntu/gopherjs/test.342850936:11:12427)
    at $packages.sync.Q.ptr.Lock (/home/ubuntu/gopherjs/test.342850936:11:9096)
    at $packages.net/rpc.AL.ptr.sendResponse (/home/ubuntu/gopherjs/test.342850936:93:29773)
    at $packages.net/rpc.AI.ptr.call (/home/ubuntu/gopherjs/test.342850936:93:32372)
    at f (/home/ubuntu/gopherjs/test.342850936:4:1231)
    at $goroutine (/home/ubuntu/gopherjs/test.342850936:4:30195)
    at Timeout.$runScheduled [as _onTimeout] (/home/ubuntu/gopherjs/test.342850936:4:30964)
    at tryOnTimeout (timers.js:224:11)
    at Timer.listOnTimeout (timers.js:198:5)
    FAIL net/rpc/jsonrpc 1.668s

  • sync

    Test Failure Details
    --- FAIL: TestMutexMisuse (0.01s)
      /home/ubuntu/gopherjs/test.238107529:4
      Error.stackTraceLimit=Infinity;var $global,$module;if(typeof window!=="undefined"){$global=window;}else if(typeof self!=="undefined"){$global=self;}else if(typeof global!=="undefined"){$global=global;$global.require=require;}else{$global=this;}if($global===undefined||$global.Array===undefined){throw new Error("no global object found");}if(typeof module!=="undefined"){$module=module;}var $packages={},$idCounter=0;var $keys=function(m){return m?Object.keys(m):[];};var $flushConsole=function(){};var $throwRuntimeError;var $throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference");};var $call=function(fn,rcvr,args){return fn.apply(rcvr,args);};var $makeFunc=function(fn){return function(){return $externalize(fn(this,new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[]))),$emptyInterface);};};var $mapArray=function(array,f){var newArray=new array.constructor(array.length);for(var i=0;iError: runtime error: native function not implemented: syscall.runtime_BeforeFork
    at $callDeferred (/home/ubuntu/gopherjs/test.238107529:4:28973)
    at $panic (/home/ubuntu/gopherjs/test.238107529:4:29597)
    at $b (/home/ubuntu/gopherjs/test.238107529:32:67954)
    at $callDeferred (/home/ubuntu/gopherjs/test.238107529:4:29144)
    at $panic (/home/ubuntu/gopherjs/test.238107529:4:29597)
    at $throwRuntimeError (/home/ubuntu/gopherjs/test.238107529:7:3352)
    at $packages.syscall.AN (/home/ubuntu/gopherjs/test.238107529:13:19394)
    at $packages.syscall.AP (/home/ubuntu/gopherjs/test.238107529:13:20425)
    at $packages.syscall.BC (/home/ubuntu/gopherjs/test.238107529:13:30325)
    at Object.$packages.syscall.BE [as StartProcess] (/home/ubuntu/gopherjs/test.238107529:13:32168)
    at $packages.os.AO (/home/ubuntu/gopherjs/test.238107529:16:14753)
    at Object.$packages.os.AN [as StartProcess] (/home/ubuntu/gopherjs/test.238107529:16:11036)
    at $packages.os/exec.M.ptr.Start (/home/ubuntu/gopherjs/test.238107529:29:17373)
    at $packages.os/exec.M.ptr.Run (/home/ubuntu/gopherjs/test.238107529:29:12460)
    at $packages.os/exec.M.ptr.CombinedOutput (/home/ubuntu/gopherjs/test.238107529:29:23335)
    at $packages.sync_test.AU (/home/ubuntu/gopherjs/test.238107529:34:34594)
    at $packages.testing.CG (/home/ubuntu/gopherjs/test.238107529:32:69409)
    at $goroutine (/home/ubuntu/gopherjs/test.238107529:4:30195)
    at Timeout.$runScheduled [as _onTimeout] (/home/ubuntu/gopherjs/test.238107529:4:30964)
    at tryOnTimeout (timers.js:224:11)
    at Timer.listOnTimeout (timers.js:198:5)
    FAIL sync 0.705s

@shurcooL
Member
shurcooL commented Dec 14, 2016 edited

Looking at fixing reflect package. It's pretty critical, and fixing it first might resolve some other problems (e.g., the database/sql failing test is likely a consequence of reflect.DeepEqual having a problem).

It currently fails without much output in CI:

$ gopherjs test --short --minify --run='^Test' reflect
FAIL	reflect	0.923s

Adding -v makes me see the problem is in TestDeepEqual:

$ gopherjs test -v --run=TestDeepEqual reflect
=== RUN   TestDeepEqual
FAIL	reflect	0.718s

Also, we may need to add support for the new reflect.Swapper. It seems the standard library implementation only has an implementation that requires use of unsafe package (see https://tip.golang.org/src/reflect/swapper.go). But we can use the "safe" one from https://github.com/camlistore/go4/blob/master/reflectutil/swapper.go (huge thanks to Brad for implementing that version).

@shurcooL
Member
shurcooL commented Dec 14, 2016 edited

Narrowed down the cause of TestDeepEqual not completing. It's these new test cases, added in 1.8:

var deepEqualTests = []DeepEqualTest{
	// ... all the old ones continue to work okay.
	// but the new "Possible loops" cause trouble.
	// Commenting them out causes TestDeepEqual to pass.

	// Possible loops.
	{&loop1, &loop1, true},
	{&loop1, &loop2, true},
	{&loopy1, &loopy1, true},
	{&loopy1, &loopy2, true},
}

After that, only TestSwapper needs to be made to pass, and all of reflect tests succeed.

@shurcooL
Member
shurcooL commented Dec 14, 2016 edited

More specifically, it's only these cases that are problematic:

// Possible loops.
{&loop1, &loop1, true}, // ok
{&loop1, &loop2, true}, // fails
{&loopy1, &loopy1, true}, // ok
{&loopy1, &loopy2, true}, // fails

And TestSwapper passes with a safe swapper implementation.

@shurcooL
Member

Great, CI is passing now!

Next up is addressing remaining TODOs.

Most of the failures that I fixed weren't regressions in behavior with 1.8, but rather known/existing issues being triggered. I didn't have to do much to get previously working things to continue to work.

But first, I will rewrite history and squash some related commits to make the PR smaller and each commit more logical.

@shurcooL
Member
shurcooL commented Dec 14, 2016 edited

Ok, I've done an interactive rebase to squash/re-arrange commits and clean up the history to have more logical, well separated changes in each commit.

Since this is now passing CI, do you want to look over it @neelance and leave any first-order comments that you might have?

Next up we should look at the remaining TODOs inside the code and see if we can do anything about them.

That said, for anyone eager to try this go1.8 branch and test it out, feel welcome to do that. Report any issues either here (for small things) or as issues (label with go1.8 as needed).

@neelance

Looks good so far. Added some comments, except where you already have TODOs.

@@ -90,8 +90,6 @@ func importWithSrcDir(path string, srcDir string, mode build.ImportMode, install
pkg.GoFiles = []string{"rand.go", "util.go"}
case "crypto/x509":
pkg.CgoFiles = nil
- case "hash/crc32":
- pkg.GoFiles = []string{"crc32.go", "crc32_generic.go"}
@neelance
neelance Dec 20, 2016 Member

Yey.

+// should override TestGamma specifically and not the package-wide tolerances,
+// because this will cause many other tests to be less accurate. Or maybe this
+// is fine?
+func close(a, b float64) bool { return tolerance(a, b, 4e-14) }
@neelance
neelance Dec 20, 2016 Member

I'm still wondering where exactly we're losing precision. I guess it is because we're using some JS native math functions which are implemented slightly differently than the Go ones. Investigate?

@neelance
neelance Feb 16, 2017 Member

Any idea what's going on here?

@shurcooL
shurcooL Feb 17, 2017 Member

Made #589 to track this.

+
+package reflect
+
+func Swapper(slice interface{}) func(i, j int) {
@neelance
neelance Dec 20, 2016 Member

reflect.Swapper, interesting addition. I guess this is because of sort?

@shurcooL
shurcooL Dec 20, 2016 Member

Yeah, this is to enable the new way of sorting in 1.8.

https://beta.golang.org/pkg/sort/#example_Slice

func main() {
- m := testing.MainStart(matchString, tests, benchmarks, examples)
+ m := testing.MainStart(testdeps.TestDeps{}, tests, benchmarks, examples)
@neelance
neelance Dec 20, 2016 Member

How is matchString implemented now? As far as I remember this was done to avoid the dependency from testing to regexp.

@shurcooL
shurcooL Dec 20, 2016 edited Member

The commit message of 3b29828 says:

See golang/go@c56cc9b?w=1.

The commit message of that go commit explains what happened.

It seems that it's still implemented the same way, using regexp. They've just shuffled imports around into testdeps package.

@neelance
neelance Dec 20, 2016 Member

Nice, I like it.

@shurcooL shurcooL changed the title from WIP: Go 1.8 support. to Go 1.8 support. Jan 5, 2017
@shurcooL
Member

One minor issue I believe I'm seeing on 1.8 branch is that there's the following warning showing up:

image

In situations where it shouldn't be. I don't think it was showing up in 1.7. This is not fully confirmed yet.

shurcooL added some commits Dec 4, 2016
@shurcooL shurcooL Target Go 1.8 final, update version to GopherJS 1.8-1. 0ff5023
@shurcooL shurcooL tests: Remove directory no longer in Go repository.
It has been removed from Go repository in
golang/go@7e9f420.
ead0eba
@shurcooL shurcooL tests: Skip all actions except ones we explicitly support.
There were some new actions added in Go 1.8 (and 1.7), such as
"errorcheckwithauto" in golang/go@d586aae.
Since new action wasn't one of the ones we'd skip, it caused
TestGoRepositoryCompilerTests to fail with errors like:

	# go run run.go -- live.go
	unexpected skip for live.go:

Instead, skip all actions (even unfamiliar ones) except the ones
we explicitly want to run.
65cbe62
@shurcooL shurcooL Update test main template to match current version in Go 1.8.
See golang/go@c56cc9b?w=1.

Fixes the following issue when running gopherjs test:

	_testmain.go:162:25: cannot use matchString (value of type func(pat string, str string) (result bool, err error)) as testing.testDeps value in argument to testing.MainStart: missing method MatchString
bc37a63
@shurcooL shurcooL build: Remove custom file overrides for hash/crc32 package.
By now, the crc32 package makes use of functions implemented
in architecture-specific files. GopherJS ends up taking on the
generic "other architectures" configuration that works when
there isn't an architecture-specific CRC32-IEEE algorithm,
nor an architecture-specific CRC32-C algorithm.

In the future, it's possible hash/crc32 performance can be improved
by doing something architecture-specific, but this will do for now.

Fixes the following build issue for hash/crc32 package:

	$ gopherjs build hash/crc32
	../../../usr/local/go/src/hash/crc32/crc32.go:83:23: undeclared name: archAvailableCastagnoli
	../../../usr/local/go/src/hash/crc32/crc32.go:86:3: undeclared name: archInitCastagnoli
	../../../usr/local/go/src/hash/crc32/crc32.go:87:22: undeclared name: archUpdateCastagnoli
	../../../usr/local/go/src/hash/crc32/crc32.go:107:17: undeclared name: archAvailableIEEE
	../../../usr/local/go/src/hash/crc32/crc32.go:110:3: undeclared name: archInitIEEE
	../../../usr/local/go/src/hash/crc32/crc32.go:111:16: undeclared name: archUpdateIEEE
01f15b4
@shurcooL shurcooL compiler/natives/src/{runtime,sync}: Add stub for SetMutexProfileFrac…
…tion, implement runtime_SemacquireMutex.

SetMutexProfileFraction was added in Go 1.8, and needs to be explicitly
added to "runtime" package in GopherJS, because GopherJS doesn't inherit
most of upstream .go files of "runtime" package.

Document that it's not supported at this time.

Implement runtime_SemacquireMutex with same code as runtime_Semacquire.

Fixes many build errors.

Fixes net/rpc/jsonrpc tests:

	$ gopherjs test net/rpc/jsonrpc

	/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.438174805:1414
	          throw new Error(msg);
	                ^
	Error: runtime error: native function not implemented: sync.runtime_SemacquireMutex
	    at $callDeferred (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.438174805:1414:17)
	    at $panic (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.438174805:1453:3)
	    at $throwRuntimeError (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/runtime.go:31:4)
	    at $packages.sync.runtime_SemacquireMutex (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.438174805:3109:3)
	    at $packages.sync.Mutex.ptr.Lock (/sync/mutex.go:87:5)
	    at $packages.net/rpc.Server.ptr.sendResponse (/net/rpc/server.go:365:3)
	    at $packages.net/rpc.service.ptr.call (/net/rpc/server.go:394:3)
	    at f (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.438174805:52:21)
	    at $goroutine (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.438174805:1473:19)
	    at Timeout.$runScheduled [as _onTimeout] (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.438174805:1514:7)
	    at tryOnTimeout (timers.js:224:11)
	    at Timer.listOnTimeout (timers.js:198:5)
	FAIL	net/rpc/jsonrpc	1.813s
e6dec35
@shurcooL shurcooL tests: Triage new Go repository tests added/modified in Go 1.8.
There were 3 failing tests.

One was a modified old test that wasn't previously run due to a build
constraint (that has been removed in 1.8). It fails due to a compiler
bug, see #551 that tracks it.

Two were new tests that use unsupported packages/funcs (such as "unsafe",
runtime.FuncForPC, runtime.Callers) and failed as a result.
4a9226b
@shurcooL shurcooL compiler/natives/src/internal/testenv: Override HasExec to say no for…
… GOARCH=js.

We cannot run tests that do exec.Command when GOARCH=js. Instead of
disabling individual tests, update testenv.HasExec to say no.

TestMutexMisuse in sync package was one such test. It begins with:

	func TestMutexMisuse(t *testing.T) {
		testenv.MustHaveExec(t)

As a result of this change, it no longer runs and fixes the following
issue:

	$ gopherjs test sync
	--- FAIL: TestMutexMisuse (0.01s)

/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/
test.017024481:1414
	          throw new Error(msg);
	                ^
	Error: runtime error: native function not implemented:
syscall.runtime_BeforeFork
	    at $callDeferred
(/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs
/test.017024481:1414:17)
	    at $panic
(/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs
/test.017024481:1453:3)
	    at $b (/testing/testing.go:644:5)
	    at $callDeferred
(/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs
/test.017024481:1426:23)
	    at $panic
(/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs
/test.017024481:1453:3)
	    at $throwRuntimeError
(/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs
/runtime.go:31:4)
	    at $packages.syscall.runtime_BeforeFork
(/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs
/test.017024481:4084:3)
	    at $packages.syscall.forkAndExecInChild (/syscall/exec_bsd.go:68:3)
	    at $packages.syscall.forkExec (/syscall/exec_unix.go:193:3)
	    at Object.$packages.syscall.StartProcess (FAIL	sync	1.051s
e3c80b5
@shurcooL shurcooL compiler/natives: Regenerate.
Done with go1.8 (final), latest version of vfsgendev:

	go generate ./...
1d7ed2c
@shurcooL shurcooL compiler/natives/src/math: Implement {Cos,Sin,Tan}h.
These were implemented in pure Go before. In Go 1.8, they're now using
stubs and are implemented in assembly. This causes the following errors
in GopherJS:

	Error: runtime error: native function not implemented: math.Cosh
	Error: runtime error: native function not implemented: math.Sinh
	Error: runtime error: native function not implemented: math.Tanh

Implement them via JavaScript math object, analogous to Cos, Sin, Tan.
b10af79
@shurcooL shurcooL compiler/natives/src/math: Slightly increase tolerances in tests to f…
…ix TestGamma.

Before this change, TestGamma fails with:

	$ gopherjs test --short --minify --run='^Test' math
	--- FAIL: TestGamma (0.08s)
		all_test.go:2234: Gamma(171) = 7.257415615307958e+306, want 7.257415615307999e+306
		all_test.go:2234: Gamma(171.6) = 1.5858969096672286e+308, want 1.5858969096672565e+308
		all_test.go:2234: Gamma(171.624) = 1.794211759924792e+308, want 1.7942117599248104e+308
		all_test.go:2234: Gamma(-171.5) = 1.93162654317124e-310, want 1.9316265431712e-310
	FAIL
	FAIL	math	0.786s

The tolerances are defined with these values upstream in Go 1.8:

	func close(a, b float64) bool      { return tolerance(a, b, 1e-14) }
	func veryclose(a, b float64) bool  { return tolerance(a, b, 4e-16) }
5e896be
@shurcooL shurcooL compiler/natives/src/io: Skip test that relies on unimplemented runti…
…me.SetFinalizer.

Document that runtime.SetFinalizer is unsupported.
3303ee8
@shurcooL shurcooL compiler/natives/src/reflect: Implement safe Swapper.
Based on go4 version, with fast path from 1.8 standard library.

Fixes TestSwapper.
40ff6ca
@shurcooL shurcooL compiler/natives/src/reflect: Disable failing deepEqualTests testcases.
Allows all reflect tests to pass.

TODO: Fix the underlying issue.

We may need to implement pointer cycle detection here.
a362c44
@shurcooL shurcooL compiler/natives/src/database/sql/driver: Disable failing valueConver…
…terTests testcases.

Allows all database/sql/driver tests to pass.

TODO: Fix the underlying issue.
12846d3
@shurcooL shurcooL tests: Improve description of issue5856 test.
It fails when source map support is disabled, but passes when it's
enabled. But CI has it disabled at this time.
8980111
@shurcooL shurcooL build: Remove external dependency osext.
Its functionality is now available in standard library as of Go 1.8.
See kardianos/osext#20.
ad3bc12
@shurcooL shurcooL compiler/natives/src/runtime/debug: Implement noop SetMaxStack.
Implementation is noop and does not change max stack, instead it always
returns the initial value. This is similar to SetGCPercent.

Package runtime/debug is not officially supported, so there are no hard
requirements for functionality here.

Use initial value for 32-bit value, which is 250 MB (but 250000000).
Source: https://github.com/golang/go/blob/ea7d9e6a52ca64c200dcc75621e75f209ceceace/src/runtime/proc.go#L113-L120.

Fixes new compress/flate test added in golang/go@9c3630f:

	$ gopherjs test --short --run='^TestMaxStackSize$' compress/flate
	--- FAIL: TestMaxStackSize (0.10s)

	/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.240135062:1414
	          throw new Error(msg);
	                ^
	Error: runtime error: native function not implemented: runtime/debug.setMaxStack
	    at $callDeferred (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.240135062:1414:17)
	    at $panic (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.240135062:1453:3)
	    at $b (/testing/testing.go:622:5)
	    at $callDeferred (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.240135062:1426:23)
	    at $panic (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.240135062:1453:3)
	    at $throwRuntimeError (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/runtime.go:31:4)
	    at setMaxStack (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.240135062:25166:3)
	    at Object.SetMaxStack (/runtime/debug/garbage.go:116:3)
	    at TestMaxStackSize (/compress/flate/deflate_test.go:872:3)
	    at tRunner (/testing/testing.go:657:3)
	    at $goroutine (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.240135062:1473:19)
	    at Timeout.$runScheduled [as _onTimeout] (/Users/Dmitri/Dropbox/Work/2013/GoLand/src/github.com/gopherjs/gopherjs/test.240135062:1514:7)
	    at ontimeout (timers.js:365:14)
	    at tryOnTimeout (timers.js:237:5)
	    at Timer.listOnTimeout (timers.js:207:5)
	FAIL    compress/flate  0.748s
0c82c68
@shurcooL shurcooL build, compiler/natives/src/os: Remove syscalling os.Executable imple…
…mentation.

Replace it with a not-implemented-erroring one.

This fixes the issue #583 where on darwin a call to os.Getwd is made,
which makes syscalls, and causes a warning to be printed to console:

	warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md

os.Executable is documented to be unsupported on nacl:

	// Executable is not supported on nacl or OpenBSD (unless procfs is
	// mounted.)

GOARCH=js is similar to nacl in many ways, so it's pretty expected
os.Executable wouldn't be supported here either.

Use https://github.com/golang/go/blob/990124da2a6ca5a54b38733b51018e2f8758cfae/src/os/executable_procfs.go#L21
as template for error message.

Fixes #583.
b36bf38
@shurcooL
Member
shurcooL commented Feb 16, 2017 edited

I've rebased this on top of latest master and cleaned up the history (got rid of multiple Go beta version update commits, combined all the "regenerate" commits into one, etc.). /cc @neelance

I see there's one failure:

unok	fixedbugs/issue8613.go	0.103s

That means a previously known failure is now passing. It might be because of something that was fixed in master since then.

I'll need to look into that after I get back from the Go 1.8 release party! 🎉

@shurcooL
Member
shurcooL commented Feb 16, 2017 edited

The unexpected passing test above makes perfect sense. Here it is:

"fixedbugs/issue8613.go":  {desc: "Does not panic upon division by zero when assigned to _, see https://github.com/gopherjs/gopherjs/issues/551."},

And #551 is now resolved (on master).

So that needs to be updated to a "known pass". Edit: Done in 16fddcc.

@shurcooL shurcooL tests: Remove fixedbugs/issue8613.go from knownFails.
It now passes, because the underlying issue has been fixed in f347191.

See #551 (which is now resolved).
16fddcc
@shurcooL shurcooL referenced this pull request in gopherjs/gopherjs.github.io Feb 17, 2017
Merged

Update GopherJS Playground to Go 1.8. #65

@lologarithm
lologarithm commented Feb 17, 2017 edited

+1 - go1.8 support looking good on my projects!

@shurcooL shurcooL changed the title from Go 1.8 support. to Go 1.8 support (version bump to GopherJS 1.8-1). Feb 17, 2017
@shurcooL shurcooL merged commit b9bcb1d into master Feb 17, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
@shurcooL shurcooL deleted the go1.8 branch Feb 17, 2017
@shurcooL
Member
shurcooL commented Feb 17, 2017 edited

GopherJS 1.8-1 is now released and available on master branch.

See blog post about it here: https://medium.com/gopherjs/gopherjs-1-8-1-is-released-b4473712ab95#.a8a6f3ltk.

See tweet here: https://twitter.com/GopherJS/status/832708146443399170.

Thanks everyone! 🎉

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