fix: keep the keyring cast valid in preview builds - #10216
Closed
cryptodev-2s wants to merge 1 commit into
Closed
cryptodev-2s wants to merge 1 commit into
cryptodev-2s wants to merge 1 commit into
Conversation
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
This branch was successfully deployed
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.
Explanation
Preview builds have been failing since #10192 with one TS error:
Keyringin that builder comes from@metamask/keyring-utils, which still depends on@metamask/utils@^11, while this package depends on the workspace copy at v12. Normally that leaves two identities for the same type, so the cast does not overlap and the directive is needed.Preview builds resolve it differently. The workflow writes a
portal:resolution for every workspace into the root manifest, and since that applies globally it also replaces the nested v11 copy@metamask/keyring-utilsbrings along. Both copies collapse onto the workspace one, the cast overlaps again, and the directive is flagged as unused.So it is required in a normal build and wrong in a preview build. Casting through
unknownholds either way. The comment notes it can go once the keyring packages depend on@metamask/utils@12.References
Failing run: https://github.com/MetaMask/core/actions/runs/34633477377/job/103375769956
Related to #10192
Checklist