This repository has been archived by the owner on Oct 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 795
Cargo test Failed in ethers-solc #1895
Labels
bug
Something isn't working
Comments
ah this is a mac symlink issue path paths point to the same file, but the way this could be fixed by used Could you please try that? |
Yes, macOS have this weird linked dir: However, it has not been resolved. The root cause is that the pub fn canonicalized(path: impl Into<PathBuf>) -> PathBuf {
let path = path.into();
canonicalize(&path).unwrap_or(path)
}
I printed some information, as follows: Ok("/private/var/folders/2y/70kmz0xn3j95ncb5fw0j737w0000gn/T/root9n6PoM")
Ok("/private/var/folders/2y/70kmz0xn3j95ncb5fw0j737w0000gn/T/root9n6PoM/contracts")
Ok("/private/var/folders/2y/70kmz0xn3j95ncb5fw0j737w0000gn/T/root9n6PoM/src")
Ok("/private/var/folders/2y/70kmz0xn3j95ncb5fw0j737w0000gn/T/root9n6PoM/artifacts")
Err(SolcIoError { io: Os { code: 20, kind: NotADirectory, message: "Not a directory" }, path: "/var/folders/2y/70kmz0xn3j95ncb5fw0j737w0000gn/T/root9n6PoM/artifacts/build-info" }) The fn can_autodetect_dirs() {
let root = utils::tempdir("root").unwrap();
let out = root.path().join("out");
let artifacts = root.path().join("artifacts");
let build_infos = artifacts.join("build-info");
let contracts = root.path().join("contracts");
let src = root.path().join("src");
let lib = root.path().join("lib");
let node_modules = root.path().join("node_modules");
... |
4 tasks
gakonst
pushed a commit
that referenced
this issue
Jan 13, 2023
The test was failing for two reasons on macOS: 1. The build info directory was not created during the test. 2. Temporary directories are created with symbolic links on macOS and the path canonicalization returns the given path if it doesn't exist. This lead to a mismatch between the project root's canonical path (which did exist and thus was a real path after canonicalization) and the build info directory's canonical path (which did not exist and was a symbolic link after canonicalization). The fix is to create the build info directory to make sure its canonical path matches the project root's canonical path.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
I pull the ethers-rs, and using the Commit b0ef134.
Platform
Darwin C27C.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 arm64
Description
The path difference in
tests::can_autodetect_dirs
is only/private
The text was updated successfully, but these errors were encountered: