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

Clarity-Wasm: fix for the print host function #5135

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

matteojug
Copy link

stacks-core part of stacks-network/clarity-wasm#501 -- because of code duplication, on contract call the signature for linked functions are imported from stacks-core.

@matteojug matteojug marked this pull request as ready for review September 9, 2024 12:07
@matteojug matteojug requested a review from a team as a code owner September 9, 2024 12:07
Copy link
Contributor

@Acaccia Acaccia left a comment

Choose a reason for hiding this comment

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

We should still copy/paste the function from clarity-wasm.

value_length: i32,
_serialized_ty_offset: i32,
_serialized_ty_length: i32| {
// NOTE: _serialized_ty_offset and _serialized_ty_length are used in `stacks-network/clarity-wasm`, here we only care about the function stub
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't completely true. The function here would be called if it's the consequence of a contract-call?. So if we want to keep a coherence between functions called directly or from another contract, we have to duplicate it until the duplication issue is solved.

Copy link
Author

Choose a reason for hiding this comment

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

I missed that, sorry! Copied all the code (and tested with a contract call, I'll add the test to the other PR).

The only relevant delta is the removal of the dev mode debug from here, as it wasn't present in the clarity-wasm code.

Copy link
Contributor

@Acaccia Acaccia Sep 9, 2024

Choose a reason for hiding this comment

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

No need for the contract-call? test: hopefully, someone will fix the duplication issue at some point...

@matteojug matteojug merged commit a86bb99 into feat/clarity-wasm-develop Sep 9, 2024
1 check passed
@matteojug matteojug deleted the fix/wasm-print-stub branch September 9, 2024 15:19
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.

2 participants