better support for builds that use symlink #172
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This issue was discovered while testing with broccoli 1.0. By default, broccoli will now use a global
tmp
path rather than local. This means that files get symlink'd in e.g./var/folders/...
When eyeglass attempts to do it's module
access
check, it walks up the directory tree until it finds apackage.json
. It then uses thatpackage.json
to determine what dependencies can be imported.When these files are symlink'd outside of the project workspace, eyeglass fails to find a
package.json
and thereby determines the origin scss file does not have access to the requested modules.The fix here is to follow the symlink and check to see if the "real" file has access.
Note that we have to test both the real and symlink paths. We have to test the original symlink path because it's valid to have symlink'd files within a project and they should check access permission relative to the project before following the symlink.
Did not add tests because this is hard to test. Reduced test coverage thresholds a bit as such.