Skip to content

Conversation

@skywardboundd
Copy link
Contributor

Closes #3055

Copy link
Member

@novusnota novusnota left a comment

Choose a reason for hiding this comment

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

And the changes to core-send.mdx have to be reversed + 3 new send functions added there. One moment.

UPD: Done, but I'm still not in favor of changing every usage example in the docs.

@skywardboundd skywardboundd added this to the v1.7.0 milestone May 15, 2025
@novusnota novusnota marked this pull request as ready for review May 15, 2025 13:08
@novusnota novusnota requested a review from a team as a code owner May 15, 2025 13:08
@Gusarich Gusarich requested a review from Copilot May 22, 2025 19:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates documentation examples to use the new .send() method on SendParameters, MessageParameters, and DeployParameters structs instead of the former send() function. Key changes include:

  • Replacing send(SendParameters { ... }) with SendParameters { ... }.send()
  • Updating multiple Tact language documentation files to reflect this new API call style.

Reviewed Changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/src/content/docs/zh-cn/cookbook/dexes/stonfi.mdx Updated swap message examples to use .send() method.
docs/src/content/docs/zh-cn/cookbook/dexes/dedust.mdx Updated message sending examples to use .send() method.
docs/src/content/docs/zh-cn/book/send.mdx Revised send examples to reflect new .send() chaining.
docs/src/content/docs/zh-cn/book/security-best-practices.mdx Modified message sending examples to use .send() method.
docs/src/content/docs/zh-cn/book/message-mode.mdx Adjusted examples to demonstrate the new .send() method usage.
docs/src/content/docs/zh-cn/book/maps.mdx Updated loop message-sending examples with .send().
docs/src/content/docs/zh-cn/book/contracts.mdx Updated contract message examples to use .send() method.
docs/src/content/docs/ref/core-send.mdx Expanded API documentation to include the .send() method details.
docs/src/content/docs/cookbook/single-communication.mdx Updated internal message sending examples to use .send() method.
docs/src/content/docs/cookbook/nfts.mdx Revised NFT transfer and message examples to use .send() method.
docs/src/content/docs/cookbook/jettons.mdx Updated jetton transfer examples to use .send() method.
docs/src/content/docs/book/learn-tact-in-y-minutes.mdx Updated several messaging examples to chain with .send().
docs/src/content/docs/book/gas-best-practices.mdx Minor update to reflect .send() method usage in examples.

…ers-deployparameters-messageparameters' of https://github.com/tact-lang/tact into 3055-we-should-add-extends-send-function-to-sendparameters-deployparameters-messageparameters
…tends-send-function-to-sendparameters-deployparameters-messageparameters
Copy link
Member

@novusnota novusnota left a comment

Choose a reason for hiding this comment

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

Hold on, let's revert changes to the documentation in all places but the core-send.

I've previously vaguely expressed my concerns here, but now I am certain — we must not replace older examples with the new code that won't work for users until 1.7 is released, because docs here will be published immediately on merge, unlike Tact 1.7. Furthermore, not all users are on the latest version, and we still have many folks that use versions prior to 1.6.0.

Copy link
Member

@novusnota novusnota left a comment

Choose a reason for hiding this comment

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

Sehr gut.

Copy link
Member

@novusnota novusnota left a comment

Choose a reason for hiding this comment

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

To be actually semantically closer to what's going on with messages under the hood, we might want to rename the .send() to the .queue().

And in the end, perhaps we're looking at having a single msg {} statement instead of all those functions. That statement will compose the message declaratively, and then we'll be able to call .queue() on the resulting message cell, specifying the mode of sending.

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.

We should add extends send function to SendParameters / DeployParameters / MessageParameters

4 participants