-
Notifications
You must be signed in to change notification settings - Fork 333
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
v0.3
changes
#139
Comments
It looks like I don't have permission to edit it (perhaps because I'm not part of the
I don't have strong opinions on #127 (it would be nice to have, but not necessary), but I think #118 has become topical now in the context of the recent modularization we've built into Forge Std. If Forge's future will be glorious, a large developer ecosystem will spawn around it. There will be many forks and remixes of the But the name of the main contract |
Wen PRB Test powered by Forge Std?
Sgtm. I propose the filename to be This would be a bigger breaking change. I would like Forge Std to follow the convention. I am not a lawyer. I think the license I proposed can replace the dual license, is permissive, and there is a SPDX License Identifier.
No. Any edits |
Well, I was hoping that Forge Std will be the one powered by PRBTest (as explained in #128). What I will do now though is update my Foundry template to install both Forge Std and PRBTest. Update: my template now comes with both PRBTest and Forge Std: import { Cheats } from "forge-std/Cheats.sol";
import { PRBTest } from "@prb/test/PRBTest.sol";
contract ContractTest is PRBTest, Cheats {
// ...
} |
If we are going to continue supporting earlier versions, then only PRB Test can do it.
Yeah, that's also an option. |
I'd like us to keep supporting older versions of Solidity in forge-std, so let's be careful with merging in anything that may break that! |
Update on CapWords: We could add So, if a user wants to use this version, they need only change the path: import "forge-std/Test.sol"; import "forge-std/CapWords/Test.sol"; |
I don't think there is any compelling reason for us to bundle PRBTest in Forge Std instead of DSTest. The most compelling argument I've seen would be that DSTest is not versioned, but imo it is a non issue for Forge Std since we pick what commit of DSTest we use, and Forge Std is versioned. The rest of the arguments (missing assertions) are fully solveable by adding them to DSTest. In terms of naming of |
If you're referring to what I said above, that is specifically to address the naming style (e.g. PRBTest has CapWords events, while they are snake_case in DSTest). Forge Std would still use DSTest, if I didn't communicate that well. Users can choose the
import "ds-test/test.sol";
abstract contract Test is TestBase, DSTest, Assertions, Cheats, Utils {}
import "paulrberg/prb-test.sol";
abstract contract Test is TestBase, PRBTest, Cheats, Utils {} That's a suggestion if we want to address #13. |
Building on top of the arguments I made in #128
Yes, but in practice updating DSTest is cumbersome because all DappHub repos depend on it via the
Forge Std users may have installed Of course, the same argument applies to PRBTest, but PRBTest is versioned, so even if users install it directly, they can pull a specific version - in fact, this is what I recommend doing in the README. |
You are not required to update DSTest to use Forge. As far as I know, Forge supports all DSTest versions
Could be solved by decoupling the library-features of Forge Std from the testing aspects, which I think is ok. Default experience would be what we have now, a more advanced experience would be w/o DSTest bundled in which should be really rare. I think moving to PRBTest breaks a lot more things and requires a lot more coordinated effort across Foundry, Forge Std and the Book than it seems like |
Good point - in that case, PRBTest won't be needed. Do we want to make a CapWords version, with debug events being an exception (that inherits from / delegates to original implementations)? @mds1 Otherwise, we are ready merge |
+1 on keeping Re IIRC v0.3 has some breaking changes, including #147 (by removing cheatcodes from We should also plug the v0.3 branch into some of our own repos and make sure nothing (unexpected) breaks. I have a repos I can test with next week, though they're all 0.8.x. If anyone has 0.6.x or 0.7.x repos to test against that would be great |
TLDR; I'm not adamant about switching from DSTest to PRBTest - in fact, I didn't even want to discuss this in the context of v0.3, it was @ZeroEkkusu who proposed implementing it as part of the
I think that we've been talking past each other on this point. What I was getting at by saying that "updating DSTest is cumbersome" is path dependence from a development point of view, i.e. DSTest not being as agile as PRBTest can afford to be.
That's fair. |
I've been using this branch for a few weeks now in a private repo with 200+ tests, and it's been working fine. Though I've only used the |
We were not all on the same page here, but we've resolved some issues 😄 Re Edit: Here it is. See Changes include:
If a user wants to use this version, they add import "forge-std/Test.sol"; import "forge-std/CapWords/Test.sol"; |
In general I like the new name changes, but I'm not sure if carrying around both naming conventions is the right approach, as I think that will be confusing and fragment readability/tutorials, etc. If we decide to go with the rename, this does introduce a lot of breaking changes in that all docs need to be updated, existing third-party articles/tutorials become outdated, etc. So worth considering carefully if the change is worth the costs. Currently where I lean is that v0.3 should minimize changes and we can reconsider larger breaking changes like this in v1.0.0. |
We should decide whether to bump pragma to I've opened PRs for the remaining changes. |
Given a convo I had with someone from maker around potentially only supporting 0.8 for |
Sounds like something worth mentioning in #125! |
We just added I'll leave a comment on that issue later with some thoughts/takeaways from that |
When should we merge? |
@ZeroEkkusu I think we can probably open a PR and get some eyes on it. Do you mind opening that PR and copying over the list of changes/breaking changes into the PR description? Once that PR is open I'm going to ask a few people to test it on some repos as well before we merge it |
We'll continue the conversation there. I think it is okay to make it |
Required changes
v0.3
-readyProposed changes
See source for description
Script
contract #78CapWords and matching filenames0.6.2
Std<Component>
Related issues
Should these issues be resolved?
Cc @mds1 @PaulRBerg
Feel free to edit this post.
The text was updated successfully, but these errors were encountered: