-
Notifications
You must be signed in to change notification settings - Fork 337
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
ds-test
not found when installing forge-std
as an npm package.
#208
Comments
Hmm, interesting. So once change is that ds-test is now imported using relative paths, which I'd think should help any remappings issues when installed in |
It's also (and was previously) installed using After some debugging, I'm able to fix this by manually editing the import paths in Test.sol and StdAssertions.sol like so: - import "../lib/ds-test/src/test.sol";
+ import "ds-test/test.sol"; However without changing those, I'm unable to make it work by modifying the remappings in the config file. It seems as though forge is ignoring the remapping, and just looking at the location relative to the source files. Do remapping not work on relative paths? |
I looked in to using a But that is apparently very buggy in |
I think what's happening here is that both are installed at the same level, right? but forge-std expects so relative paths into submodules are an issue. I consider using this via yarn a valid use case, perhaps we should revert the relative import @mds1 ? |
@mattsse I agree with your assessment, opened #210 to resolve. @maurelian can you test out installing forge-std at that commit? |
Yep, that commit (5bafa16) works thanks! Should we use that commit, or the current tip of master (on which CI seems to be failing)? |
is unrelated, afaik. forge-std is back on remappings. so I think we can close this? |
So, is it an acknowledged limitation of Forge Std that it cannot be installed as an npm package? I've installed Forge Std and DSTest like this: "dependencies": {
"ds-test": "github:dapphub/ds-test",
"forge-std": "github:foundry-rs/forge-std"
}, But couldn't manage to use Forge Std: |
The
package.json
file added in #176 (despite coming from our team), doesn't seem to work.You can see that this PR, which updates the commit from one prior to adding it (f18682b) to the 1.0.0 commit (17656a2), breaks the build.
The error is due to being unable to find the
ds-test
dependency, which doesn't seem to be included with the current package.A
package.json
was also recently added tods-test
, so it could be added as a dependency to theforge-std
package, however I'm not sure how to handle the different remappings that would be required ifds-test
is installed tonode_modules
rather than as a submodule.The text was updated successfully, but these errors were encountered: