[lint] Allow building for WASM, and add support for the Crypto contract - #649
Merged
Merged
Conversation
turbolent
force-pushed
the
bastian/lint-wasm-and-crypto
branch
from
August 24, 2026 20:51
34a6c6a to
62aa1d8
Compare
turbolent
enabled auto-merge
August 24, 2026 20:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The linter can no longer be built for WASM:
AnalyzeAccountandAnalyzeTransactionuse the Flow Go SDK's gRPC access client, which depends on github.com/onflow/crypto, which dropped its non-cgo build mode.This blocks the language server, which links the linter, in #648.
Move the SDK-based functionality into
network.go, which is not built for WASM. The API is unchanged for all other targets.Add support for the
Cryptocontract: the analysis now provides the contract's code, so programs which import it can be analyzed. Before, analyzing such a program failed withcannot find crypto contract.The code is a copy of the contract in flow-core-contracts,
lint/Crypto.cdc, because the flow-core-contracts Go package depends on the Flow Go SDK again.TestCryptoContractCodechecks that the copy stays identical to the original. It is exported asCryptoContractCode, for the language server's WASM build.masterbranchFiles changedin the Github PR explorer