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

Release Candidate v5.0.10 #890

Merged
merged 64 commits into from
Aug 7, 2023
Merged

Release Candidate v5.0.10 #890

merged 64 commits into from
Aug 7, 2023

Conversation

aslesarenko
Copy link
Member

@aslesarenko aslesarenko commented Jul 12, 2023

aslesarenko and others added 30 commits June 13, 2023 12:16
aslesarenko and others added 14 commits July 6, 2023 16:35
Cross-compile ErgoScript compiler to JS
* CI: run js tests and publish snapshots

* CI: add npm publishing tag

* CI: fix ci.yml file

* CI: adjust npm setup step

* CI: temporarily skip non js related steps

* CI: set node registry URL

* CI: use nodejs v20

* CI: add stable release

* CI: remove npm cache

* CI: fix npm caching issues

* CI: add cache dependency path

* remove accidentally committed yarn.lock file
@aslesarenko aslesarenko requested a review from kushti July 18, 2023 17:00
@aslesarenko aslesarenko marked this pull request as ready for review July 19, 2023 15:28
aslesarenko and others added 3 commits July 26, 2023 18:19
* add ErgoTree `template` and `templateHex` method and fix type exporting

* Simplify package installing instructions
* @param hex a hexadecimal string representing the serialized ErgoTree
*/
def fromHex(hex: String): ErgoTree = {
val bytes = Base16.decode(hex).get
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This .get is not safe, and caught everywhere (and interface method calling it not exposing exceptions). Better return Try[ErgoTree]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For performance Try is not used in sigma, exceptions are thrown everywhere, which gives good visibility into full stack.
Here, when decode result is Failure, will just throw the actual exception with full stack trace.
Another reason to not use Try here, is because this method is used form JS wrappers (see js.ErgoTree class), and Try has no good JS equivalent (where exceptions are used for errors).

@aslesarenko aslesarenko merged commit 69c7975 into master Aug 7, 2023
4 checks passed
@aslesarenko aslesarenko deleted the v5.0.10-RC branch August 9, 2023 13:21
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

Successfully merging this pull request may close these issues.

3 participants