You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We would like to make ESLint cache files portable.
Use case 1: The cache file is created/updated in CI. The goal is to make the cache file reusable for CI runs, but different CI runs may have different directory structures.
Use case 2: The cache file is checked in the source control and shared among developers who can update it and commit the changes. Developers typically have different directory structures on local machines.
By "directory structures" I mean the location where the project is stored locally. For example, on one machine it can be /projects/my-app, on another one /work/my-app, /projects/work-my-app or C:\projects\my-app.
I think the best solution would be to store file paths relative to the location of the cache file. I see the latest file-entry-cache v10.0.4 can store relative paths in the cache file, but not sure if and how it would be possible to make them relative to the location of the cache file.
The text was updated successfully, but these errors were encountered:
Regarding the solution with renameAbsolutePathKeys suggested by @jaredwray in eslint/rfcs#114 (comment), I think it isn't applicable for these use cases because we don't know oldPath, and in the Use case 2 there can be multiple old paths.
@mdjermanovic - thanks. relative pathing should work and I will add in more tests around it but you can use it no problem and it should just work. Is there a scenario where the new version doesnt?
Is your feature request related to a problem? Please describe.
We would like to make ESLint cache files portable.
Use case 1: The cache file is created/updated in CI. The goal is to make the cache file reusable for CI runs, but different CI runs may have different directory structures.
Use case 2: The cache file is checked in the source control and shared among developers who can update it and commit the changes. Developers typically have different directory structures on local machines.
By "directory structures" I mean the location where the project is stored locally. For example, on one machine it can be
/projects/my-app
, on another one/work/my-app
,/projects/work-my-app
orC:\projects\my-app
.References:
Describe the solution you'd like
I think the best solution would be to store file paths relative to the location of the cache file. I see the latest file-entry-cache v10.0.4 can store relative paths in the cache file, but not sure if and how it would be possible to make them relative to the location of the cache file.
The text was updated successfully, but these errors were encountered: