internal/libhive: anchor --sim regex matching at end of simulator name#1406
Merged
Conversation
Collaborator
|
I get the idea, but the user can also manually append That said, I am not against making the matching more strict. |
Member
Author
To have this as default was motivated by the fact that if we merge #1403 ( |
Collaborator
|
it could also be called |
Collaborator
|
I'm just kidding |
--sim regex matching at end of simulator name--sim regex matching at end of simulator name
Soubhik-10
added a commit
to Soubhik-10/hive
that referenced
this pull request
Mar 22, 2026
…ulator name (ethereum#1406)" This reverts commit bca75d8.
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.
Summary
The
--simflag uses unanchored regex matching (MatchString), so a pattern likeenginematches all of:ethereum/engineeth2/engineethereum/eels/consume-enginebecause it appears as a substring of all three names.
This makes it impossible to select a specific simulator when another simulator's name is a superstring.
This concretely affects the addition of
consume-enginex(#1403); adding this new simulator means that running./hive --sim consume-enginechanges existing behavior; 2 simulators now get run instead of 1.Another example candidate in the future would be a new
sync2simulator; it would be impossible to runsync2without also runningsync.This one-line fix appends
$to the user-supplied regex so patterns must match to the end of the simulator name.Before
# Runs BOTH consume-engine and consume-enginex ./hive --sim ethereum/eels/consume-engineAfter
Note
This is a minor behavior change: bare prefix patterns (e.g.,
--sim consume-) that previously matched via substring will no longer match unless a wildcard is added (--sim 'consume-.*'). Patterns that ended with a full simulator name (the common case) are unaffected.