-
Notifications
You must be signed in to change notification settings - Fork 64
Allow changing prefix from prove via --prefix
in test
mode
#745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
--prefix
in test
mode
@@ -27,7 +27,6 @@ data DappInfo = DappInfo | |||
, solcByHash :: Map W256 (CodeType, SolcContract) | |||
, solcByCode :: [(Code, SolcContract)] -- for contracts with `immutable` vars. | |||
, sources :: SourceCache | |||
, unitTests :: [(Text, [Sig])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually unused
@@ -57,7 +56,6 @@ dappInfo root (BuildOutput (Contracts cs) sources) = | |||
|
|||
in DappInfo | |||
{ root = root | |||
, unitTests = findAllUnitTests solcs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually unused, and so findAllUnitTests
was also unused.
findAllUnitTests :: [SolcContract] -> [(Text, [Sig])] | ||
findAllUnitTests = findUnitTests ".*:.*\\.(check|prove).*" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function was unused.
I don't think we need to pass the Though I am not sure if I understand correctly the |
It allows to match against both contract and method names via
Which |
11f2ab2
to
33b5001
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping there is nice way to unify matching against contract and method name and against method prefix.
But I don't see one right now. So if you also don't see a nice way to simplify this, then let's merge it and move on!
Description
Currently, default prefix is "prove" as per documentation. Actually, we also accept "check". This PR allows us to change this from "prove" to any other value. We also drop "check" as a prefix that's accepted. The "check" was never advertised, so I think it's valid to remove? It makes the code simpler, and I think it's OK this way, as
--prefix check
can always be used to be backwards-compatible. This change is highlighted in the changelog.Checklist