Skip to content
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

importing presto/client reveals that presto is missing the encodeBytes proc #26

Open
monyarm opened this issue Apr 27, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@monyarm
Copy link

monyarm commented Apr 27, 2022

/home/monyarm/.nimble/pkgs/presto-0.0.4/presto/client.nim(808, 21) Error: undeclared identifier: 'encodeBytes'
candidates (edit distance, scope distance); see '--spellSuggest': 
 (4, 10): 'getBodyBytes' [proc declared in /home/monyarm/.nimble/pkgs/chronos-#asyncproc/chronos/apps/http/httpclient.nim(1145, 6)]
 (4, 10): 'getBodyBytes' [proc declared in /home/monyarm/.nimble/pkgs/chronos-#asyncproc/chronos/apps/http/httpclient.nim(1169, 6)]

presto uses the proc, but doesn't define it outside of tests/helpers

@mratsim
Copy link

mratsim commented May 2, 2022

encodeBytes is an application-defined proc. You need to write it yourself for the types you use.

I do agree that this should be mentioned in the README

See for example: https://github.com/status-im/nimbus-eth2/blob/039bece9175104b5c87a8c2ff6b1eafae731b05e/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim#L1906-L1942=

@mratsim mratsim added the documentation Improvements or additions to documentation label May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants