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.
Problem
provider.cluster
serialization is not compatible with its deserialization.This is because in #2271, a custom deserialization function was implemented to support custom endpoints (as mentioned in #673 (comment)):
anchor/cli/src/config.rs
Lines 593 to 594 in 2ae3774
but there was no custom serialization implementation that was compatible with the new deserialization. Thus, setting
provider.cluster
to a custom value:results in:
when a command, e.g.
anchor keys sync
, serializesAnchor.toml
, as also mentioned in issues such as #3388 and #3222.Summary of changes
Fix using a custom endpoint in
provider.cluster
by:Cluster
.provider.cluster
with the new function.Fixes #3222