You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Note that we'll want to keep source-map-support, since that's what enables sourcemaps at runtime.
Probably the first thing to do here is to remove the use of @truffle/contract-schema's Abi type, and move that into this package instead... I'm thinking that, in addition to the normalized types that abi-utils provides, we could also provide "loose" types. That would avoid the need to use the autogenerated types altogether.
I wanted to ask about source map support. Why is it part of all the libraries in truffle instead of being required once somewhere in the user facing part at the top?
I did some research and it seems that it works great if the end user requires it but causes problems when being part of a library. Here a are some examples:
Hm, I'll have to do research into that after meetings today. It's possible that we missed something. We decided to use that package just because stacktraces without source maps have been very problematic in the past, and we wanted to solve the problem categorically.
But if that's not best practice, then it's certainly worth reconsidering! cc @haltman-at you also might want to be aware of this discussion.
edit, to answer your question directly:
Why is it part of all the libraries in truffle instead of being required once somewhere in the user facing part at the top?
Because we consider individual @truffle/* packages to be user facing :)
The package
@truffle/abi-utils
is sweet and simple, but requires a lot of potentially unnecessary dependencies. Some examples:ajvIt would be great for the package to be as lean as possible.
The text was updated successfully, but these errors were encountered: