Thanks to visit codestin.com
Credit goes to github.com

Skip to content

context pkg seems to import fmt #954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pjebs opened this issue Jan 18, 2020 · 5 comments
Closed

context pkg seems to import fmt #954

pjebs opened this issue Jan 18, 2020 · 5 comments

Comments

@pjebs
Copy link
Contributor

pjebs commented Jan 18, 2020

I've worked hard to make sure that I don't import directly or indirectly "fmt" package.

I'm looking at the generated gopher code. For some reason, the context package is importing "fmt" when it should not be: https://godoc.org/context?import-graph

I don't seem to know why.

@pjebs
Copy link
Contributor Author

pjebs commented Jan 18, 2020

go version go1.12.6 darwin/amd64
GopherJS 1.12-2

According to this article: https://forum.golangbridge.org/t/removing-context-packages-dependency-on-fmt/6404

At some point, context package did import "fmt". Maybe gopherjs is using an "old" version of context?

@pjebs
Copy link
Contributor Author

pjebs commented Jan 19, 2020

Ok I see go1.12 context imports fmt.

@dmitshur when will gopherjs support v1.13?

@pjebs
Copy link
Contributor Author

pjebs commented Jan 30, 2020

@neelance

@dmitshur
Copy link
Member

dmitshur commented Feb 8, 2020

@dmitshur when will gopherjs support v1.13?

I don't know. The tracking issue for Go 1.13 support is #929. Also see issue #894.

@pjebs
Copy link
Contributor Author

pjebs commented Feb 9, 2020

For anyone interested:

I have implemented a context package that doesn't use fmt for GopherJS purposes.
It can be found here: https://github.com/rocketlaunchr/react/tree/master/forks/context

It uses Francesc Campoy's code with some adjustments.

I recommend you use it until GopherJS supports Go1.13 or 1.14.

@pjebs pjebs closed this as completed Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants