Skip to content

Conversation

@omochi
Copy link
Owner

@omochi omochi commented Apr 12, 2024

C2TSを利用するアプリケーションのビルド時に、
一部でSendable警告が出てしまうので対応する

TSASTはミュータブルなASTなのでSendableにならない。
Generator関係は抽象化が複雑でできるかわからないのでやらなかった。

これ以外で、C2TSで導入されるvalue semanticなものはSendableにした。

TypeMapのMapFunctionがSendableになったのは、
厳密には下位互換を破壊する。
しかし、利用する場面ではそこまでダイナミックな処理に接続しているとは考えにくくて、
多少複雑な判定をする程度で対応できると思う。

extension TSIdentExpr {
static let json = TSIdentExpr("json")
static let entity = TSIdentExpr("entity")
static var json: TSIdentExpr { TSIdentExpr("json") }
Copy link
Owner Author

Choose a reason for hiding this comment

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

ここはキャッシュすることを諦めた

@omochi omochi merged commit caa71d1 into main Apr 12, 2024
@omochi omochi deleted the sendable branch April 12, 2024 12:43
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.

1 participant