-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: verify rootDir
and all roots
are directories
#9569
Conversation
} | ||
} catch (err) { | ||
if (err instanceof ValidationError) { | ||
throw err; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
printing a warning instead of these 3 throw
s is trivial if we don't want a breaking change. However, I think non-existent directories provided to these options are so blatantly a configuration error that I think it's fine to throw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, roots should always exist and failing is a good default.
Codecov Report
@@ Coverage Diff @@
## master #9569 +/- ##
==========================================
- Coverage 65.05% 65.03% -0.03%
==========================================
Files 286 286
Lines 12127 12139 +12
Branches 3005 3008 +3
==========================================
+ Hits 7889 7894 +5
- Misses 3600 3606 +6
- Partials 638 639 +1
Continue to review full report at Codecov.
|
bah, here we go https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ these tests didn't pass for me at all, not just the symlink error 🤷♂ And the test error was just wrong path in the error message, otherwise it was correct |
This reverts commit 62bfb8a.
Codecov Report
@@ Coverage Diff @@
## master #9569 +/- ##
==========================================
- Coverage 65.05% 65.03% -0.03%
==========================================
Files 286 286
Lines 12127 12139 +12
Branches 3005 3008 +3
==========================================
+ Hits 7889 7894 +5
- Misses 3600 3606 +6
- Partials 638 639 +1 Continue to review full report at Codecov.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
See #9549 for background.
This could be considered a breaking change and I can print a warning instead?. Also, as mentioned in #9549, should we verify that
roots
exist injest-haste-map
as well? Not sure how that affects Metro, butjest-haste-map
is super inconsistent in how it handles missingroots
depending on whether Watchman is used and if the OS is Windows.Closes #9549.
Test plan
Integration tests added