Skip to content

Commit 1a743ef

Browse files
committed
update to latest gomacro - fixes some interpreter bugs
fix internal type proxy_JSONer, used by interpreted code to implement display.JSONer
1 parent e71a123 commit 1a743ef

File tree

3 files changed

+50
-18
lines changed

3 files changed

+50
-18
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/gopherdata/gophernotes
33
go 1.13
44

55
require (
6-
github.com/cosmos72/gomacro v0.0.0-20220530072503-c719ab5c40fc
6+
github.com/cosmos72/gomacro v0.0.0-20220702114119-031290e3ea0e
77
github.com/go-zeromq/zmq4 v0.14.1
88
github.com/gofrs/uuid v4.2.0+incompatible
99
)

go.sum

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/cosmos72/gomacro v0.0.0-20220530072503-c719ab5c40fc h1:JTky1C2BMhJ+Rwf8IFFQNwrOQntLrQhp2QImELC2jLo=
2-
github.com/cosmos72/gomacro v0.0.0-20220530072503-c719ab5c40fc/go.mod h1:60O8/t169OwS8bX0BeWSjxlGGb/I5cGYc6Brt5rWDL0=
1+
github.com/cosmos72/gomacro v0.0.0-20220702114119-031290e3ea0e h1:UpOl8jDoOK9Cmy+H5m6JJhKI2hhhmaIewNrD11jtFog=
2+
github.com/cosmos72/gomacro v0.0.0-20220702114119-031290e3ea0e/go.mod h1:Mwa4/4mEA2GOpd7APzViPlyDF1iuBYypf4F6TydYd6o=
33
github.com/go-zeromq/goczmq/v4 v4.2.2 h1:HAJN+i+3NW55ijMJJhk7oWxHKXgAuSBkoFfvr8bYj4U=
44
github.com/go-zeromq/goczmq/v4 v4.2.2/go.mod h1:Sm/lxrfxP/Oxqs0tnHD6WAhwkWrx+S+1MRrKzcxoaYE=
55
github.com/go-zeromq/zmq4 v0.14.1 h1:DlHlNzzOeB8mvC5YkoAraiCToA7MfDK5j+iQhVp/uo0=
@@ -9,36 +9,35 @@ github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx
99
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
1010
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
1111
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
12-
github.com/peterh/liner v1.2.1 h1:O4BlKaq/LWu6VRWmol4ByWfzx6MfXc5Op5HETyIy5yg=
13-
github.com/peterh/liner v1.2.1/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
12+
github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw=
13+
github.com/peterh/liner v1.2.2/go.mod h1:xFwJyiKIXJZUKItq5dGHZSTBRAuG/CpeNpWLyiNRNwI=
1414
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
1515
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
1616
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
1717
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
18-
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
19-
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
20-
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
21-
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
18+
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
19+
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
20+
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
2221
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
22+
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
2323
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
2424
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
2525
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
2626
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
2727
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
28-
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
2928
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
3029
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
31-
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
30+
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3231
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
32+
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1 h1:kwrAHlwJ0DUBZwQ238v+Uod/3eZ8B2K5rYsUHBQvzmI=
33+
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3334
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
3435
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
36+
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
3537
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
3638
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
3739
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
3840
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
39-
golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
40-
golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
41+
golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY=
42+
golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4=
4143
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
42-
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
43-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
44-
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

x_package.go

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ func (P *proxy_HTMLer) HTML() string {
8080
return P.HTML_(P.Object)
8181
}
8282

83+
// compile-time check that *proxy_HTMLer implements HTMLer
84+
var _ HTMLer = (*proxy_HTMLer)(nil)
85+
8386
// --------------- proxy for display.JPEGer ---------------
8487
type proxy_JPEGer struct {
8588
Object interface{}
@@ -90,16 +93,22 @@ func (P *proxy_JPEGer) JPEG() []byte {
9093
return P.JPEG_(P.Object)
9194
}
9295

96+
// compile-time check that *proxy_JPEGer implements JPEGer
97+
var _ JPEGer = (*proxy_JPEGer)(nil)
98+
9399
// --------------- proxy for display.JSONer ---------------
94100
type proxy_JSONer struct {
95101
Object interface{}
96-
JSON_ func(interface{}) string
102+
JSON_ func(interface{}) map[string]interface{}
97103
}
98104

99-
func (P *proxy_JSONer) JSON() string {
105+
func (P *proxy_JSONer) JSON() map[string]interface{} {
100106
return P.JSON_(P.Object)
101107
}
102108

109+
// compile-time check that *proxy_JSONer implements JSONer
110+
var _ JSONer = (*proxy_JSONer)(nil)
111+
103112
// --------------- proxy for display.Latexer ---------------
104113
type proxy_Latexer struct {
105114
Object interface{}
@@ -110,6 +119,9 @@ func (P *proxy_Latexer) Latex() string {
110119
return P.Latex_(P.Object)
111120
}
112121

122+
// compile-time check that *proxy_Latexer implements Latexer
123+
var _ Latexer = (*proxy_Latexer)(nil)
124+
113125
// --------------- proxy for display.Markdowner ---------------
114126
type proxy_Markdowner struct {
115127
Object interface{}
@@ -120,6 +132,9 @@ func (P *proxy_Markdowner) Markdown() string {
120132
return P.Markdown_(P.Object)
121133
}
122134

135+
// compile-time check that *proxy_Markdowner implements Markdowner
136+
var _ Markdowner = (*proxy_Markdowner)(nil)
137+
123138
// --------------- proxy for display.PNGer ---------------
124139
type proxy_PNGer struct {
125140
Object interface{}
@@ -130,6 +145,9 @@ func (P *proxy_PNGer) PNG() []byte {
130145
return P.PNG_(P.Object)
131146
}
132147

148+
// compile-time check that *proxy_PNGer implements PNGer
149+
var _ PNGer = (*proxy_PNGer)(nil)
150+
133151
// --------------- proxy for display.PDFer ---------------
134152
type proxy_PDFer struct {
135153
Object interface{}
@@ -140,6 +158,9 @@ func (P *proxy_PDFer) PDF() []byte {
140158
return P.PDF_(P.Object)
141159
}
142160

161+
// compile-time check that *proxy_PNGer implements PNGer
162+
var _ PNGer = (*proxy_PNGer)(nil)
163+
143164
// --------------- proxy for display.Renderer ---------------
144165
type proxy_Renderer struct {
145166
Object interface{}
@@ -150,6 +171,9 @@ func (P *proxy_Renderer) Render() Data {
150171
return P.Render_(P.Object)
151172
}
152173

174+
// compile-time check that *proxy_Renderer implements Renderer
175+
var _ Renderer = (*proxy_Renderer)(nil)
176+
153177
// --------------- proxy for display.SimpleRenderer ---------------
154178
type proxy_SimpleRenderer struct {
155179
Object interface{}
@@ -160,6 +184,9 @@ func (P *proxy_SimpleRenderer) SimpleRender() MIMEMap {
160184
return P.SimpleRender_(P.Object)
161185
}
162186

187+
// compile-time check that *proxy_SimpleRenderer implements SimpleRenderer
188+
var _ SimpleRenderer = (*proxy_SimpleRenderer)(nil)
189+
163190
// --------------- proxy for display.SVGer ---------------
164191
type proxy_SVGer struct {
165192
Object interface{}
@@ -170,6 +197,9 @@ func (P *proxy_SVGer) SVG() string {
170197
return P.SVG_(P.Object)
171198
}
172199

200+
// compile-time check that *proxy_SVGer implements SVGer
201+
var _ SVGer = (*proxy_SVGer)(nil)
202+
173203
// --------------- proxy for image.Image ---------------
174204
type proxy_image_Image struct {
175205
Object interface{}
@@ -188,6 +218,9 @@ func (P *proxy_image_Image) ColorModel() color.Model {
188218
return P.ColorModel_(P.Object)
189219
}
190220

221+
// compile-time check that *proxy_image_Image implements image.Image
222+
var _ image.Image = (*proxy_image_Image)(nil)
223+
191224
// --------------------------------------------------------
192225
// allow importing "display" and "github.com/gopherdata/gophernotes" packages
193226
func init() {

0 commit comments

Comments
 (0)