Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

fix: failing can_autodetect_dirs solc test (#1895) #2052

Merged
merged 1 commit into from
Jan 13, 2023
Merged

fix: failing can_autodetect_dirs solc test (#1895) #2052

merged 1 commit into from
Jan 13, 2023

Conversation

agostbiro
Copy link
Contributor

@agostbiro agostbiro commented Jan 13, 2023

Motivation

Fix can_autodetect_dirs solc test failing on MacOS (#1895).

Solution

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.

PR Checklist

  • Added Tests (n/a)
  • Added Documentation (n/a)
  • Updated the changelog (n/a)
  • Breaking changes (n/a)

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.
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice!

@gakonst gakonst merged commit da0039a into gakonst:master Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants