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

Add install and uninstall subcommands #42

Merged
merged 5 commits into from
Apr 1, 2024
Merged

Conversation

mzgoddard
Copy link
Contributor

Add subcommands for installing text to speech extensions and other support software.

Add subcommands for installing text to speech extensions and other
support software.
@mzgoddard
Copy link
Contributor Author

@jugglinmike I think we will need to move in this direction of having install as a separate step from npm install in some way. If a user of the package has two copies of the package installed in two locations, trying to install two copies of the voice will cause issues, at least for macos. On macos having two copies of the speech synthesizer extension will not work. One will be selected over the other by the operating system. If we haven't different versions of the extension will further complicate it, where we probably can't set which version will run. What do you think?

To a lesser point, I think this change will help with getting the package working in CI sooner for us like with #34.

@mzgoddard mzgoddard mentioned this pull request Feb 26, 2024
@jugglinmike
Copy link
Contributor

Here's how I understand the installation process as implemented on the "main" branch today:

  1. User executes npm install
  2. npm installs Node.js packages
  3. npm invokes an installation script

And here's how I understand it will look if we merge this patch:

  1. User executes npm install
  2. npm installs Node.js packages
  3. User invokes an installation script

Is that accurate? If so, how will changing the actor in step 3 allow us to support multiple simultaneous installations?

@mzgoddard
Copy link
Contributor Author

This doesn't properly support multiple copies. At minimum I think we'd need to be able to check the version of any installed extension. And a step past that, migrate between versions.

But with this PR you could have, for example for developers on the package, a development copy and a globally installed copy. npm install on both would succeed and not make modifications to operating systems. You can then uninstall operating system changes in one and install the other.

My darwin draft has an isInstalled check that install and uninstall use. I'd like to add that to this for windows too but wasn't immediately sure how to make that check.


I guess part of this is, to me, how npm install is kind of a misnomer. It doesn't install things into the system, it downloads a cache of dependencies described by package.json. I don't think its a good practice for us to use npm install the way we currently do for installing the windows extension.

@jugglinmike
Copy link
Contributor

(This patch is in service of gh-29)

@jugglinmike jugglinmike merged commit fde47d5 into main Apr 1, 2024
@jugglinmike jugglinmike deleted the install-commands branch April 1, 2024 22:56
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

Successfully merging this pull request may close these issues.

2 participants