Open
Conversation
The config file was previously stored in the project eslint directory, which could lead to write error in sandbox environments (like Bazel). This commit relocates the config file to the OS's temporary directory, namespaced by a hash of the project eslint directory.
Owner
|
Thank you for the PR 🙏. I'll find time to test this tomorrow. |
Owner
|
Can you have a look at the failing build please? |
The configFile function in the daemon tests was being called with a base object instead of the resolver mock object. This commit fixes this issue by using the resolverMock object in all calls to the configFile function in the daemon tests.
Use path.join to construct the config file path, ensuring compatibility across different operating systems by handling path separators correctly.
Author
|
The windows_fix branch might fix the Windows issue. |
Owner
|
I don't have a windows machine to test this either. Sorry. You can simply update this PR or open another one and I'll trigger the builds. |
The file name generated for the config was invalid for some OS's. It contained a leading ".", which is valid on *nix, but not on Windows. Also, replaced backslashes with forward slashes in the config SHA256 hash to maintain consistency.
The config file path generation was not platform independent causing cache misses on Windows. By using absolute paths, the cache invalidation works correctly.
On Windows, `path.resolve` returns backslash as path separator. This commit replaces backslash to slash for consistent file name.
Author
|
Tested in a virtual machine with Cygwin. https://github.com/azzurro/eslint_d.js/actions/runs/14859174014 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The config file was previously stored in the project eslint directory,
which could lead to write error in sandbox environments (like Bazel).
This pull request relocates the config file to the OS's temporary directory,
namespaced by a hash of the project eslint directory.