lite-xl / lite-xl-plugin-manager

A lite-xl plugin manager.
Other
106 stars 15 forks source link

invalid order function for sorting #124

Open maksimaliabyshev opened 3 weeks ago

maksimaliabyshev commented 3 weeks ago

PowerShell console:

lpm install plugin_manager language* lsp* ide* Widgets nodejs  --assume-yes --progress

Error invalid order function for sorting

adamharrison commented 2 weeks ago

Interesting. Will investigate.

adamharrison commented 2 days ago

Hrm. I don't get this on current master. (You though Widgets here is inappropriately capitalized). It must be on windows only. Will check when I next boot into it.

maksimaliabyshev commented 2 days ago

Hrm. I don't get this on current master. (You though Widgets here is inappropriately capitalized). It must be on windows only. Will check when I next boot into it.

1) The plugin manager should not abort the installation if a package does not meet some criteria. 2) invalid order function for sorting - sorts the list incorrectly if there is a non-valid packet in the queue.

adamharrison commented 2 days ago

The plugin manager should not abort the installation if a package does not meet some criteria.

I mean, in most cases, unless the full install is correctly specified (like in apt for example), it does result in things aborting usually.

invalid order function for sorting - sorts the list incorrectly if there is a non-valid packet in the queue.

Can you elaborate? What do you mean by "packet" here? Like if Widgets is given?

maksimaliabyshev commented 2 days ago

Can you elaborate? What do you mean by "packet" here? Like if Widgets is given?

Widgets - a non-valid plugin/package that does not exist. non-valid plugin/package - any package/plugin that cannot recognize or install lpm.

lpm install plugin1 bad_plugin plugin2 --assume-yes --progress - lpm will stop installing after bad_plugin, but should output an error message to stdout and continue installing subsequent plugins.

adamharrison commented 2 days ago

OK; so for example, when I test this, I get:

adam@aurora:~/lite-xl/lite-xl-plugin-manager$ ./lpm install plugin_manager  Widgets nodejs  --assume-yes --progress --userdir /tmp/test 
   2.3 MB [   7.2 MB/s][100%]: Fetching https://github.com/lite-xl/lite-xl-plugin-manager.git:latest...
 340.5 kB [   4.2 MB/s][100%]: Fetching https://github.com/lite-xl/lite-xl-plugins.git:master...
  47.4 kB [   1.4 MB/s][100%]: Fetching https://github.com/lite-xl/lite-xl-colors.git:master...
  47.6 kB [   1.2 MB/s][100%]: Fetching https://github.com/jgmdev/lite-xl-threads:9299a9a6b778cb34b12f0286b9162779920a9197...
can't find addon Widgets

Which seems to be what you want? I'm not sure where the invalid sorting function is coming from though; it could be dependent on your setup. Can you try with master? Are you using ppm instead?

Regarding not installing after a bad plugin, I think this is the correct move. It shouldn't install anything if the command given cannot be resolved.

This is something you can potentially modify in the ppm repository, but I think in lpm it makes sense to keep it as atomic as possible -- in line with other package managers that I've used, like apt-get.

maksimaliabyshev commented 2 days ago

ppm repository

I'm sorry, I was a little mistaken. Please run the command from the first post on Windows, after installing via Scoop.

scoop install lite-xl --global
scoop install https://raw.githubusercontent.com/lite-xl/lite-xl-plugin-manager/refs/heads/master/lite-xl-plugin-manager.json --global