SpacingBat3 / ReForged

A set of :electron: Electron Forge tools, makers and publishers.
https://spacingbat3.github.io/ReForged/
Other
26 stars 6 forks source link

Add offline cache for downloaded files #11

Closed futpib closed 1 year ago

futpib commented 1 year ago

This allows @reforged/maker-appimage to work offline (or online faster) and allows for offline CI with guaranteed reproducible builds.

Highly inspired by @electron/get https://github.com/electron/get/blob/4e0b055a7c8aa337215a8cd20880acc262d5a925/src/Cache.ts https://github.com/electron/get/blob/4e0b055a7c8aa337215a8cd20880acc262d5a925/src/index.ts#L66C9-L66C9

You can check it by installing from here https://www.npmjs.com/package/@futpib/maker-appimage

futpib commented 1 year ago

@SpacingBat3 Did you intentionally close this or just wanted me to make changes according to you review?

SpacingBat3 commented 1 year ago

@SpacingBat3 Did you intentionally close this or just wanted me to make changes according to you review?

See my comment above (TL;DR – I don't want to be DMCA'd):

PS: I saw the link you've sent and I see quite a similarity between @electron/get implementation vs this. I don't think it is legal (see DMCA and/or other copyright-associated laws, depending on a country you live in) for you (and me therefore to accept such work and redistribute) to copy someone else's work and distribute it as yours without keeping with the license. I'll probably close this PR, unless I see the original author(s) claiming it can be reused here and relicensed.

The decision is still indefinitive, eg. if the original author directly sign offs the work to be commited on this ISC license.

futpib commented 1 year ago

Will you accept an alternative implementation (that will address all the comments you made here) in another PR if I make one?

SpacingBat3 commented 1 year ago

Will you accept an alternative implementation (that will address all the comments you made here) in another PR if I make one?

No, if it contains stolen implementation from @electron/get or any code that doesn't seems fully owned by you (I just can't accept stuff like this).

futpib commented 1 year ago

Will you accept an alternative implementation that contains no stolen implementation from @electron/get nor any code that doesn't seems fully owned by me and also addresses other review comments you made here in another PR if I make one?

SpacingBat3 commented 1 year ago

Will you accept an alternative implementation that contains no stolen implementation from @electron/get nor any code that doesn't seems fully owned by me in another PR if I make one?

Possibly. Also a lot of these are suggestions, i.e. stuff that just came to my mind and should be considered when developing this but not always implemented. I also personally thought about env-based opt-in cache implementation, e.g. if user provides REFORGED_CACHE env with an accesible path, this is where all makers on this monorepo will use the cache…