gopherdata / gophernotes

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

inferred package names don't work #39

Closed kevinburke closed 7 years ago

kevinburke commented 8 years ago

I tried this:

import yaml "gopkg.in/yaml.v2"

yields the following error when I try to use it:

undefined: yaml in yaml.Unmarshal
dwhitena commented 8 years ago

Ah, yes this doesn't work, because it assuming everything after the import is the path. Maybe need to do a split on the spaces and process that inferred name.

dwhitena commented 8 years ago

Just checked, and this allow effects empty imports.

dwhitena commented 8 years ago

I can fix this on the gophernotes side, but apparently the "quickfix" I'm using to deal with things like "imported and not used," doesn't play nice with named imports: https://github.com/gopherds/gophernotes/blob/master/vendor/github.com/motemen/go-quickfix/quickfix.go#L272

Will need to fix this in that package, or find another way to do the quickfix stuff.

dwhitena commented 7 years ago

Duplicate with https://github.com/gopherdata/gophernotes/issues/59. Closing in favor of that issue. Hopefully we can address this soon.