Skip to content

Commit d957030

Browse files
committed
* update go.mod to latest gomacro for runtime support of Go 1.11 modules:
import "/path/to/some/package" is now module-aware * require Go compiler >= 1.11, the first version with modules support * delete vendor/ directory, replaced by versioned dependencies in go.mod
1 parent 8a9de0d commit d957030

File tree

960 files changed

+56
-332923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

960 files changed

+56
-332923
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
### Prerequisites
4242

43-
- [Go 1.9+](https://golang.org/doc/install) - including GOPATH/bin added to your PATH (i.e., you can run Go binaries that you `go install`).
43+
- [Go 1.11+](https://golang.org/doc/install) - including GOPATH/bin added to your PATH (i.e., you can run Go binaries that you `go install`).
4444
- [Jupyter Notebook](http://jupyter.readthedocs.io/en/latest/install.html) or [nteract](https://nteract.io/desktop)
4545
- [ZeroMQ 4.X.X](http://zeromq.org/intro:get-the-software) - for convenience, pre-built Windows binaries (v4.2.1) are included in the zmq-win directory.
4646
- [pkg-config](https://en.wikipedia.org/wiki/Pkg-config)

compiler_version.go

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// +build !go1.11
2+
3+
// cause a compile error if Go compiler version < 1.11
4+
5+
package main
6+
7+
var _ int = "error: Go >= 1.11 required to compile Gophernotes"

go.mod

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
module github.com/gopherdata/gophernotes
22

3-
go 1.13
3+
go 1.11
44

55
require (
6-
github.com/cosmos72/gomacro v0.0.0-20190929212108-d70dd8a6f170
6+
github.com/cosmos72/gomacro v0.0.0-20191128205525-a189728fbb56
77
github.com/kr/pretty v0.1.0 // indirect
88
github.com/pebbe/zmq4 v0.0.0-20170917105202-90d69e412a09
99
github.com/satori/go.uuid v1.2.1-0.20180103174451-36e9d2ebbde5
10+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
1011
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
1112
)

go.sum

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
github.com/cosmos72/gomacro v0.0.0-20190929212108-d70dd8a6f170 h1:zg8/E4AmoZ09TdoYiRbBtBwDghEdOyc9YNEzwIt0Xco=
2-
github.com/cosmos72/gomacro v0.0.0-20190929212108-d70dd8a6f170/go.mod h1:KJA2tG1LPV/U9zq3I4bjlzGMkTCezSMeD5dSgL5AWa4=
3-
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
1+
github.com/cosmos72/gomacro v0.0.0-20191128205525-a189728fbb56 h1:dcB7aqJMwcpV9vj7mjZ6bFtGNDq9Y3lFPpXj6KSU9ok=
2+
github.com/cosmos72/gomacro v0.0.0-20191128205525-a189728fbb56/go.mod h1:BQU56+eL2VDHCz4pdp+nkseVQ3eubCGRIY5D8rfw788=
43
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
54
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
6-
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
75
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
86
github.com/mattn/go-runewidth v0.0.3 h1:a+kO+98RDGEfo6asOGMmpodZq4FNtnGP54yps8BzLR4=
97
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
@@ -13,7 +11,11 @@ github.com/peterh/liner v1.1.0 h1:f+aAedNJA6uk7+6rXsYBnhdo4Xux7ESLe+kcuVUF5os=
1311
github.com/peterh/liner v1.1.0/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
1412
github.com/satori/go.uuid v1.2.1-0.20180103174451-36e9d2ebbde5 h1:Jw7W4WMfQDxsXvfeFSaS2cHlY7bAF4MGrgnbd0+Uo78=
1513
github.com/satori/go.uuid v1.2.1-0.20180103174451-36e9d2ebbde5/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
16-
golang.org/x/sys v0.0.0-20190429094411-2cc0cad0ac78 h1:ddnrbGOgFiC0zV+uaYoSkl0f47vnII6Zu426zWQrWkg=
17-
golang.org/x/sys v0.0.0-20190429094411-2cc0cad0ac78/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
18-
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
14+
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
15+
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
16+
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
17+
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
18+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
19+
golang.org/x/tools v0.0.0-20191119223639-caaa49c6ded0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
20+
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
1921
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

imports/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The command `import` will write here import files for third-party
2+
packages if they are to be imported and statically linked into gophernotes.
3+
4+
This is currently needed on Windows, *BSD, Android etc. (to be exact,
5+
as of Go 1.13 it's needed on all operating system except Linux and Mac OS X).
6+
7+
It is safe to remove files in this directory,
8+
as long as you **keep at least** README.md and a_package.go

imports/a_package.go

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package imports
2+
3+
import (
4+
"github.com/cosmos72/gomacro/base/paths"
5+
i "github.com/cosmos72/gomacro/imports"
6+
)
7+
8+
type PackageUnderlying = i.PackageUnderlying
9+
10+
type Package = i.Package
11+
12+
type PackageMap = i.PackageMap
13+
14+
// i.Packages is a map, copying it only makes a reference
15+
// => Packages and i.Packages are kept in sync automatically
16+
var Packages = i.Packages
17+
18+
// used to locate this package path via reflection
19+
type findMe struct{}
20+
21+
func init() {
22+
// tell gomacro where to write import files
23+
paths.SymbolFromImportsPackage = findMe{}
24+
}

kernel.go

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ import (
1919
basereflect "github.com/cosmos72/gomacro/base/reflect"
2020
interp "github.com/cosmos72/gomacro/fast"
2121
"github.com/cosmos72/gomacro/xreflect"
22+
23+
// compile and link files generated in imports/
24+
_ "github.com/gopherdata/gophernotes/imports"
25+
2226
zmq "github.com/pebbe/zmq4"
2327
)
2428

vendor/github.com/cosmos72/gomacro/.gitignore

-6
This file was deleted.

0 commit comments

Comments
 (0)