-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat: make the cache to respect an artifact url #113
feat: make the cache to respect an artifact url #113
Conversation
Is this a breaking change? |
Came here to comment this, I've got two suggestions here.
E.g. if the mirror url is
|
|
But then you have a bunch of largish dead files just hanging around for a user, if they've been working with Electron for a while. |
Files will pile up anyway once you start working with newer releases. Removing stale files from a cache might be an issue, but I think it's out of scope of this change. |
I would prefer that @MarshallOfSound's suggestion 1 be implemented.
Electron Packager uses |
@malept , @MarshallOfSound another review? |
@@ -116,7 +116,7 @@ describe('Public API', () => { | |||
artifactName: 'electron.d.ts', | |||
}); | |||
expect(await fs.pathExists(dtsPath)).toEqual(true); | |||
expect(path.basename(dtsPath)).toEqual('v2.0.9-electron.d.ts'); |
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 is deliberate, all other artifacts have the version name in them. If this artifact does not it will be duplicated and overwritten right?
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.
It can be only overwritten if the downloader called with force: true
.
electron.d.ts
files for other Electron versions/mirrors will be downloaded to other folders.
The goal of this PR is to make sure every downloaded file is saved to the cache with a unique path. A folder name serves as a unique name, and a file names does not matter for caching.
🎉 This PR is included in version 1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hmmm. I was doing some work on Electron Packager and saw that
Doesn't that effectively create one folder per file? Wouldn't it make more sense to do folders like
It just feels like a lot of folders to me... it's effectively doubling the number of nodes on the FS. |
The cache right now ignores multiple mirrors used simultaneously on the same machine.
I can lead to some non-obvious build issues.
This changes the cache files structure to the following: