8000 fix: use user cache directory instead of tmp by maxb2 · Pull Request #60 · leafac/caxa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

fix: use user cache directory instead of tmp #60

Closed
wants to merge 2 commits into from

Conversation

maxb2
Copy link
Contributor
@maxb2 maxb2 commented Aug 11, 2022

This changes the extraction directory to the user cache using os.UserCacheDir().

Fixes #37. Related to #20.

@maxb2
Copy link
Contributor Author
maxb2 commented Aug 27, 2022

@leafac any thoughts?

@leafac
Copy link
Owner
leafac commented Aug 27, 2022

@maxb2: Yes, I have some thoughts! 😃

First, thanks for the contribution! It’s great to hear from you again.

Second, some questions:

  1. Do you think that the same behavior can be applied to the other kind of stub (the shell script one).
  2. 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?

@maxb2
Copy link
Contributor Author
maxb2 commented Aug 27, 2022

Happy to contribute! 😄

  1. I didn't know that existed. I'll change the behavior there as well.
  2. 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.

@maxb2
Copy link
Contributor Author
maxb2 commented Aug 30, 2022

I changed the shell stub to use the cache directories in the same way that the go function does. It's ready to merge 😄

@maxb2
Copy link
Contributor Author
maxb2 commented Oct 20, 2022

I updated this to work on 3.0.1

@matheussampaio
Copy link

Is there anything blocking this PR? I'm facing a lot of issues that may be resolved by this fix.

@maxb2
Copy link
Contributor Author
maxb2 commented Jul 14, 2023

AFAIK, there is nothing blocking it. The original author has been missing from this project for a while though.

@unphased
Copy link

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...

@leafac
Copy link
Owner
leafac commented Nov 21, 2023

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.

@leafac leafac closed this Nov 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows binary MODULE_NOT_FOUND
5 participants
0