-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support Windows postinstall #368
Comments
This would be making things worse on all other platforms. Instead of running make to build a Crystal program, it would now build a Crystal program to run make to build a Crystal program. That seems pretty crazy to me. Instead, I'd suggest to avoid building on postinstall. Ameba shouldn't build itself every time it is installed as a dependency. That's annoying and unnecessary and avoidable (cf. https://forum.crystal-lang.org/t/shards-postinstall-considered-harmful/3910 where this project serves as an explicit example). A better solution is to use a script that builds ameba on demand the first time it's used. This script can be installed automatically (via |
I understand the complexity here but I don't necessarily think that makes it worse.
It would be better if Shards installed the executable directly instead of installing Ameba then building, but that's for another issue.
My understanding of this is to ship "script" executables with Ameba which the user calls, right? Or I guess shipping actual script files would work too. |
This is a partial resurrection of #230 with a proposal for handling installs on Windows. I believe that until crystal-lang/shards#468 is finally resolved, Ameba's
postinstall
hook should run a Crystal file instead of a Makefile directly, which could then invoke a cmd version of the Makefile for Windows. Something like this:At least in this way, people attempting to use Ameba on Windows will actually be able to install it instead of getting a confusing error message and having to run the build commands manually.
The text was updated successfully, but these errors were encountered: