Skip to content
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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants