Flow.Launcher.PluginsManifest icon indicating copy to clipboard operation
Flow.Launcher.PluginsManifest copied to clipboard

split manifest and use asyncio

Open taooceros opened this issue 2 years ago • 16 comments

  • Split the manifest and let ci merge it when update (so people should not face the conflict)
  • Use asyncio as #270

Script to split is simple

let plugins = open "plugins.json"

for plugin in $plugins {
    let name = $plugin.Name
    let id = $plugin.ID

    $plugin | to json -i 4 | save $"plugins\\($name)-($id).json" -f
}

taooceros avatar Feb 04 '24 19:02 taooceros

@jjw24 want to check?

taooceros avatar Feb 12 '24 07:02 taooceros

What's the performance gain from this change?

jjw24 avatar Feb 13 '24 11:02 jjw24

And what have we tested with these changes?

If deleting the plugin file, will it remove it from plugin.json?

jjw24 avatar Feb 13 '24 11:02 jjw24

Would it be better to just allow dropping the plugin's json file into the plugin folder and then the script picks out the fields to form the plugins.json and test + validate the plugins?

jjw24 avatar Feb 13 '24 11:02 jjw24

Would it be better to just allow dropping the plugin's json file into the plugin folder and then the script picks out the fields to form the plugins.json and test + validate the plugins?

That's almost the case. Instead we just test and validate before forming the plugins.json

taooceros avatar Feb 13 '24 15:02 taooceros

What's the performance gain from this change?

Almost proportional to the number of plugins

taooceros avatar Feb 13 '24 15:02 taooceros

And what have we tested with these changes?

If deleting the plugin file, will it remove it from plugin.json?

CI should periodically generate plugins.json from the directory

taooceros avatar Feb 13 '24 15:02 taooceros

Hmm if the plugin.json is merged from all individual plugin entries should we create a release for the plugins.json?

Instead of committing it to the repository.

Garulf avatar Feb 14 '24 01:02 Garulf

Are we sure we are not just complicating things unnecessarily?

jjw24 avatar Feb 14 '24 10:02 jjw24

Because instead of editing a single json file now will have to create a seperate file, which is a different process as well. I'm sure editing json isn't that difficult, and the CI isnt running for too long.

jjw24 avatar Feb 14 '24 10:02 jjw24

Are we sure we are not just complicating things unnecessarily?

I wouldn't say editing a huge file is less complex than adding a new file specifically. Almost all plugin manifests uses a dedicated file/folder for each plugin.

The merge conflict is really complicating things and annoying.

taooceros avatar Feb 15 '24 14:02 taooceros

Are we sure we are not just complicating things unnecessarily?

I am not sure. Maybe that's good? Though what's the difference.

taooceros avatar Feb 15 '24 15:02 taooceros

Would it be better to just allow dropping the plugin's json file into the plugin folder and then the script picks out the fields to form the plugins.json and test + validate the plugins?

That's almost the case. Instead we just test and validate before forming the plugins.json

So would the test validation fail if the file has extra fields like "Actionkeyword"? If doesn't fail will plugin.json still form properly with only the required fields?

jjw24 avatar Feb 16 '24 09:02 jjw24

We still need extra information. Like the repo position and the icon. But yes I agree it's not a big difference.

taooceros avatar Feb 16 '24 16:02 taooceros

Would it be better to just allow dropping the plugin's json file into the plugin folder and then the script picks out the fields to form the plugins.json and test + validate the plugins?

That's almost the case. Instead we just test and validate before forming the plugins.json

So would the test validation fail if the file has extra fields like "Actionkeyword"? If doesn't fail will plugin.json still form properly with only the required fields?

I use the same ci. So probably not.

taooceros avatar Mar 27 '24 13:03 taooceros

Are we ready to push this a bit further?

VictoriousRaptor avatar May 03 '24 14:05 VictoriousRaptor

Sure, let's get the latest plugin files in and I will take another look.

jjw24 avatar Jun 25 '24 13:06 jjw24

@jjw24 done

taooceros avatar Jun 29 '24 18:06 taooceros