Fix typo in flag name and add deprecation warning #128
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.
Fix Typo:
--on-module-hash-mistmatch→--on-module-hash-mismatchSummary
Fixes a long-standing typo in the
--on-module-hash-mistmatchflag name, correcting it to--on-module-hash-mismatch. The old flag name remains supported for backward compatibility but is deprecated.Changes
Flag Registration (
cmd/substreams-sink-sql/common_flags.go)--on-module-hash-mismatchflag with full documentation--on-module-hash-mistmatchflag for backward compatibilityresolveOnModuleHashMismatchFlag()helper function that:Updated Callers
All commands that reference this flag now use the resolution helper:
setupcommand (cmd/substreams-sink-sql/setup.go)runcommand (cmd/substreams-sink-sql/run.go)generate-csvcommand (cmd/substreams-sink-sql/generate_csv.go)toolscommands (cmd/substreams-sink-sql/tools.go)Core Logic (
db_changes/db/cursor.go)mistmatchDetected→mismatchDetectedDocumentation (
CHANGELOG.md)Backward Compatibility
Fully backward compatible - Existing scripts using
--on-module-hash-mistmatchwill continue to work, but will log a deprecation warning:Testing
go build ./...)go test ./db_changes/...)--helpoutput"error"when neither flag is explicitly set)Migration Guide
No action required immediately, but users should update their scripts to use the correct spelling: