caxa
caxa copied to clipboard
fix: use user cache directory instead of tmp
This changes the extraction directory to the user cache using os.UserCacheDir()
.
Fixes #37. Related to #20.
@leafac any thoughts?
@maxb2: Yes, I have some thoughts! 😃
First, thanks for the contribution! It’s great to hear from you again.
Second, some questions:
- Do you think that the same behavior can be applied to the other kind of stub (the shell script one).
- Do you think we should change the TypeScript part of the application (the one that uses the stub and packages the program) in any way? Perhaps packaging is a one-off thing that can be done in the temporary directory. But perhaps it should be done in the cache directory as well. Thoughts?
Happy to contribute! :smile:
- I didn't know that existed. I'll change the behavior there as well.
- I think it's better that packaging is done in a temporary directory since it's a one-off thing. AFAIK, there is not an automated mechanism to clear the user cache directory.
I changed the shell stub to use the cache directories in the same way that the go function does. It's ready to merge :smile:
I updated this to work on 3.0.1
Is there anything blocking this PR? I'm facing a lot of issues that may be resolved by this fix.
AFAIK, there is nothing blocking it. The original author has been missing from this project for a while though.
A slight tangent, but related to testing of this and related issues around failure to launch due to extraction woes. How do y'all test for windows releases? I noticed the exe I built from my last windows install (which has node.js installed) fails to execute properly on a new machine with freshly installed windows. Since I already need a windows setup to build a caxa self-extracting executable, and now I can't be certain that running it is an adequate test, it appears I need to have a windows VM or second windows machine on hand in order to do tests, which is not ideal...
Hi @maxb2, @matheussampaio, @unphased,
I’ve been thinking about the broad strategy employed by caxa and concluded that there is a better way to solve the problem. It sidesteps the whole issue of temporary directories, cache directories, and so forth.
It’s a different enough approach that I think it deserves a new name, and it’s part of a bigger toolset that I’m building, which I call Radically Straightforward · Package.
I’m deprecating caxa and archiving this repository. I invite you to continue the conversation in Radically Straightforward’s issues.
The original author has been missing from this project for a while though.
Yeah, I’ve been using caxa all along, but I was thinking of a more principled solution to the issues that I identified in caxa (including the one in this pull request), so I haven’t been merging pull requests. I’m happy that Radically Straightforward · Package is out as the new generation of caxa 🤗
How do y'all test for windows releases?
As far as I can tell the approach used by Radically Straightforward · Package should be more solid, because it doesn’t deal with self-extracting executables. It should be the case that you test your application on Windows, package it, and distribute it with confidence that the packaging didn’t introduce issues. Please give it a try and report back.
Best.