-
Notifications
You must be signed in to change notification settings - Fork 375
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
Realm with "import encoding/json" can't be addpkg via gnokey, but manually #808
Comments
I think duplicate/related with #668? I think the way native go stdlib bindings are implemented has issues. I'll create a new issue to work on a proposal for a refactor. |
oh yes, I forgot to tag related issue & pr. Thank you in advance |
@r3v4s, what do you get when you precompile and build qjson.gno file using gno? |
// Code generated by github.com/gnolang/gno. DO NOT EDIT.
//go:build gno
package qjson
import (
"encoding/json"
) |
@zivkovicmilos Essentially, good encoding packages need reflection. Reflection is a complex issue. #814 is a step in the right direction as it allows us to work on multiple "original" gno stdlibs without breaking precompilation and needing to have everything in package Related issues where we've talked about reflection: #750, #802, #788. If you, or anyone else, wants to do a master-issue on the topic it would be appreciated :) We could do a "dumb" implementation now, but it could only work for primitive types and maybe slices of them, through a big type switch, and support more complex types (including structs, which is often what you'll want to encode) through JSONMarshaler. OR, adapt easyjson to not use |
Note from meeting:
|
Closing issue for below reason.
|
Realm with "import encoding/json" can't be addpkg via gnokey, but manually
Description
certain package with
import encoding/json
can not be add to chain viagnokey maketx addpkg
(it fails with panicunknown import path encoding/json
).but manually adding file to
~/gno/examples/gno.land/r/
worksYour environment
master
Steps to reproduce
Expected behaviour
gnokey maketx addpkg
should workOR
Actual behaviour
gnokey maketx addpkg
failedAND
Additional
Looks like
encoding/json
is imported from hereThe text was updated successfully, but these errors were encountered: