Skip to content
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

What is the extend of depending on javascript? #140

Open
Fuco1 opened this issue Mar 5, 2023 · 3 comments
Open

What is the extend of depending on javascript? #140

Fuco1 opened this issue Mar 5, 2023 · 3 comments

Comments

@Fuco1
Copy link
Contributor

Fuco1 commented Mar 5, 2023

I love Eask and the UX it provides and I wish it would get bigger adoption. I think one issue with that would be the javascript dependency.

Many people using Emacs do not use javascript and don't know how to install node (it's a bit of pain). Cask was using python which is almost on every computer and even that was a problem. Eventually, they got rid of the python dependency and it's now pure elisp.

I see that a lot of the javascript is used for parsing (yargs). If, hypothetically, we port yargs to elisp, would that be a lot more code left in JS?

There is https://github.com/rejeep/commander.el but it's very basic compared to yargs. We could either take it and improve it or start something from scratch.

Here's a little table of tools I've found in the space of package dev/management. All of them seem to be pretty dead except the first three.

| name     | stars | last commit  | # commits | pure elisp     | bin script     | url                                    |
|----------+-------+--------------+-----------+----------------+----------------+----------------------------------------|
| eask     |    62 | 2 hours ago  |      1710 | no, js         | bash, bat      | https://github.com/emacs-eask/cli      |
| cask     | 1200+ | 3 weeks ago  |      1178 | yes            | bash, bat      | https://github.com/cask/cask           |
| eldev    |   191 | Jan 21, 2023 |       523 | yes            | bash, bat, ps1 | https://github.com/doublep/eldev       |
| makem.sh |   123 | Dec 31, 2022 |       195 | no, bash       | no             | https://github.com/alphapapa/makem.sh  |
| keg.el   |    21 | Sep 23, 2022 |       323 | yes            | bat            | https://github.com/conao3/keg.el       |
| makel    |     0 | May 16, 2022 |        60 | no, bash, make | no             | https://github.com/DamienCassou/makel  |
| emake.el |    26 | Jun 9, 2019  |       255 | no, make       | no             | https://github.com/vermiculus/emake.el |

@jcs090218
Copy link
Member

I love Eask and the UX it provides and I wish it would get bigger adoption. I think one issue with that would be the javascript dependency.

Users can use binaries (executable), see install with binary, JavaScript isn't required. But you do need to install node for Eask development.

Many people using Emacs do not use javascript and don't know how to install node (it's a bit of pain). Cask was using python which is almost on every computer and even that was a problem. Eventually, they got rid of the python dependency and it's now pure elisp.

I recently had a discussion with flycheck's maintainers regarding Python vs Node, therefore, you can get more information here => flycheck/flycheck#1957. The conclusion is node has a much stabler cross-platform capability.

Eldev is the tool that doesn't rely on any of these (Python or Node), here are my thoughts:

  1. Duplicate code, see their bin folder. eldev, eldev.bat, eldev.ps1, etc.
  2. Editing Elisp in script (like makem.sh)
  3. All of the above make project hard to maintain and develop
  4. To avoid more duplicate code (Pt. 1), they develop more within the actual elisp files. But starting Emacs directly is slow , you will always have a short delay when starting the tool, this situation is particularly bad on Windows. Cask also has this issue, but they stopped supporting Legacy Windows, so that's no longer relevant.

There is https://github.com/rejeep/commander.el but it's very basic compared to yargs. We could either take it and improve it or start something from scratch.

I know this tool but does it has some bug? I don't remember where I got the information, but like I mentioned above, I would like to avoid all the hassles. 😅

LMKWYT? ;)

@Fuco1
Copy link
Contributor Author

Fuco1 commented Mar 5, 2023

To me it makes sense. I haven't tried the binary install method. I guess the startup time might be a bit of a pickle to solve with pure elisp indeed.

@jcs090218
Copy link
Member

jcs090218 commented Mar 5, 2023

There is currently one issue with binary, see #104.

Basically, you cannot use:

$ eask run another-eask-command

In Eask-file:

(script "another-eask-command" "eask info")  ; ❌ This wouldn't work with binary, but running from node is good.
(script "test" "echo Hello!")                ; ✔️ Good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants