-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: enhance the solidity test artifacts discovery #5829
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
hardhatTotal size of the bundle: List of dependencies (sorted by size)
|
0bf17ba
to
b3c8f2b
Compare
b3c8f2b
to
b4dacbc
Compare
With NomicFoundation/edr#705 in place, we could get away with being less strict when it comes to test contracts discovery. It still could be useful if, let's say, we wanted to ensure we don't spend time compiling files that have Let me know if you think we should simplify the The above suggestion is implemented in #5844 if we decide to proceed with it. |
9a94991
to
9dd05af
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.
Let's merge this, as it's an improvement, but in a follow up PR we should switch this to be based on files, and not artifacts. This will allow users to run (and compile) a single file.
Agreed, that's exactly what I discovered when playing around with compilation for the test task. I'm going to share my thoughts on that later today in a doc. |
Outdated
This PR makes the check whether an artifact is a test artifact more accurate. It implements the design described in https://www.notion.so/nomicfoundation/Test-Artifacts-Discovery-11f578cdeaf580bdb7e5c4268c5f248dThe base cases of the newly added
isTestArtifact
method have been tested using unit tests and manually.It introduces 2 new dependencies:
@nomicfoundation/slang
- 2.6M - direct@bytecodealliance/preview2-shim
- 524K - transitiveThis PR splits the solidity test runner input preparation into 2 phases: getting the artifacts, and filtering which artifacts are the test artifacts.
It also establishes the test artifact filter as:
.t.sol
extension.