notepad-plus-plus / nppPluginList

The official collection of Notepad++ plugins.
1.09k stars 357 forks source link

N++ compatibility condition attribute in pl*.json #416

Closed oleg-shilo closed 2 years ago

oleg-shilo commented 2 years ago

Problem

With the breaking changes in v8.3 quite a few plugins have been bricked. See https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11198

I am one of the plugin authors (CS-Script). I have prepared the patch release that works on v8.3. However, PLuginAdmin might dispatch it to v8.2.* deployments where it will break. I do not see how it can be solved. Unless I am missing something.

Proposal

Introduce npp-version attribute to indicate the compatible version/version-range for the plugin described in the section:

{
    "folder-name": "MyPlugin",
    "display-name": "My Cool Plugin",
    "version": "1.8.7",
    "npp-version": "8.3",
    "id": "...",
    ...
},

Various conventions can be used to indicate version range:

8.3 - exact version 8.3
[8.3,9.4] - from version 8.3 to 9.4 inclusive
[8.3,]- any version from 8.3 and above
[,8.3] - 8.3 and any version before

Such a technique is common for many package managers. Will be really happy if it is already implemented and I just missed it :)

chcg commented 2 years ago

plugin list is just distributed with a new N++ list, so updates to the current master are just available for the next N++ and not older ones.

See https://github.com/notepad-plus-plus/nppPluginList/issues/250 there is still something open to check at least the basic compatibility of existing plugins with new N++ versions.

The previous plugin manager handled that different and downloaded the list from a server and had the option to specify compatible N++ version.

oleg-shilo commented 2 years ago

Sorry, I do not believe this issue should be closed.

It is not about checking compatibility. Authors already know what version of their plugin is compatible with what version of N++. It is about allowing PluginAdmin to pull the plugin binaries from the alternative URL that contains plugin version compatible with the current N++ installed.

I am afraid the intent of this issue was lost.

chcg commented 2 years ago

Added new compatible version with https://github.com/notepad-plus-plus/nppPluginList/commit/c7647de3143cfcbaa4194c82799c89fae245fd02.

So you mean that via the version it should be possible to prohibit downloads with newer version of N++ in case of issues. This would require modification to N++ pluginAdmin code. Currently it is expected that the plugins in the list are compatible with the latest N++ and N++ installer has a manually handled (see e.g. https://github.com/notepad-plus-plus/notepad-plus-plus/commit/de43eca30e488e8f8c86dac1454fbc89e3192d69) list of plugins which have problems are incompatible. Having this information within the pluginlist seems to be a better way.

oleg-shilo commented 2 years ago

So you mean that via the version it should be possible to prohibit downloads with newer version of N++ in case of issues. This would require modification to N++ pluginAdmin code.

Correct.

...it is expected that the plugins in the list are compatible with the latest N++...

I am not sure it is a fully valid assumption. We do have users running some older versions and they may choose or be forced not to upgrade (e.g. IT policies). In such cases, pluginAdmin will still prompt them to update currently working plugin to the latest available version and effectively break it.

I am simply proposing pluginAdminto to filter out all the latest plugins that authors nominated as incompatible with the very version of N++ user is running at the moment. So it does not offer the upgrade for that plugin. That's it.

I am not really in a good position to judge but may be it is a fairly simple change to pluginAdmin.

donho commented 2 years ago
8.3 - exact version 8.3
[8.3,9.4] - from version 8.3 to 9.4 inclusive
[8.3,]- any version from 8.3 and above
[,8.3] - 8.3 and any version before

Make sense. If "npp-compatible-versions" is absent, the plugin is supposed to be compatible with any version of Notepad++. I will modify the code of Plugin Admin for it.

oleg-shilo commented 2 years ago

Fantastic, thank you for being open to it

oleg-shilo commented 2 years ago

BTW thank you for processing CS-Script plugin update so promptly.

donho commented 2 years ago

https://github.com/notepad-plus-plus/notepad-plus-plus/commit/a06b404708e73ed25bec3c2e9ed132d1a1e5c2ef

oleg-shilo commented 2 years ago

Perfect. Thank you for addressing it.