gopherdata / gophernotes

The Go kernel for Jupyter notebooks and nteract.
MIT License
3.8k stars 262 forks source link

package errors "errors" has no symbol Is #234

Closed butuzov closed 3 years ago

butuzov commented 3 years ago

trying to run an error check in the notebook, failing with the error in the subject.

repl.go:7:40: package errors "errors" has no symbol Is

same with strings packages. is it the same reason as in #154 ?

cosmos72 commented 3 years ago

Hi @butuzov, do you mean you executed something similar to the following inside Gophernotes?

import (
  "errors"
  "io" // or any other package that defines error instances
)
var err error
errors.Is(err, io.EOF) // panics with: package errors "errors" has no symbol Is

There is a known issue: the symbol errors.Is was added in Go 1.13, but Gophernotes (actually the underlying interpreter gomacro) does not yet know about it. The solution is simple: I need to regenerate the file gomacro/imports/errors.go - and probably many others. I will do it as soon as possible

butuzov commented 3 years ago

Yeah, exactly this. And thank you!

cosmos72 commented 3 years ago

fixed in commit a574d64b223af727a519a4ab7e36f7fe2b78b10f - also released as Gophernotes v0.7.3

butuzov commented 3 years ago

Came back to thank you Massimiano. Wonderful!