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

Title of plugin is sometimes wrong; parsing code is very fragile because of assumptions #23419

Closed
cbjeukendrup opened this issue Jul 1, 2024 · 3 comments · Fixed by #23429
Closed
Assignees
Labels
plugins Related to MuseScore's QML plugin framework (NOT VST/audio plugins) regression MS4 Regression on a prior release UI Visual issues affecting the UI (not notation)

Comments

@cbjeukendrup
Copy link
Contributor

Issue type

UI bug (incorrect info or interface appearance)

Bug description

No response

Steps to reproduce

Install this plugin:
tin_whistle_tablature_v4.qml.txt
(remove .txt from the name)

Then look in the list of plugins (Home > Plugins). Instead of the correct name of the plugin, which is "Tin Whistle Tablature", some random string that occurs somewhere in the file is displayed: "No Staffs use a Tin Whistle"

Screenshots/Screen recordings

Scherm­afbeelding 2024-07-01 om 16 35 19

MuseScore Version

master (4.4)

Regression

Yes, this used to work in a previous version of MuseScore 4.x

Operating system

*

Additional context

Instead of loading the plugin using Qt itself, we try to parse it as a text file, and do so in a very naive way (see ExtPluginsLoader::parseManifest). Of course, that might speed things up a little bit, but probably not a lot, and it is very prone to problems like this. To fix such problems, we need to make the parser more and more sophisticated, and then it becomes a kind of clone of Qt's QML parser, except that it's probably less optimised. And it takes us an enormous amount of time to implement. So I would suggest just using Qt's parser by loading the file as a QML object. That will potentially result in helpful error messages as well, in case a user has created an invalid plugin.

@cbjeukendrup cbjeukendrup added the plugins Related to MuseScore's QML plugin framework (NOT VST/audio plugins) label Jul 1, 2024
@muse-bot muse-bot added regression MS4 Regression on a prior release UI Visual issues affecting the UI (not notation) labels Jul 1, 2024
@igorkorsukov
Copy link
Contributor

I fixed the parsing..

Yes, there are assumptions and that's why the code is fragile..

But I believe that it is not necessary to complicate it without an obvious need, it is better to bring plugins to one style..

Because this is simply needed for backward compatibility, soon we will declare old plugins obsolete and they will gradually disappear.

@TeeDeeY
Copy link

TeeDeeY commented Jul 7, 2024

Because this is simply needed for backward compatibility, soon we will declare old plugins obsolete and they will gradually disappear.

I think it is helpful to know when old plugins will become obsolete. How much effort should I put into fixing a 3.6/4.2 plug-in into a 4.4 plug-in, if it will be obsolete in six months?

I understand progress and would like to know how best to allocate my time.

@igorkorsukov
Copy link
Contributor

@TeeDeeY

Because this is simply needed for backward compatibility, soon we will declare old plugins obsolete and they will gradually disappear.

I think it is helpful to know when old plugins will become obsolete. How much effort should I put into fixing a 3.6/4.2 plug-in into a 4.4 plug-in, if it will be obsolete in six months?

I understand progress and would like to know how best to allocate my time.

I think it will be like this:

  • In version 4.5 we will declare the old system obsolete (but we will support its operation)
  • We will support the operation of the old system until version 5.0 at the latest, unless there are very serious reasons to stop supporting it earlier. i.e. the old system will be operational for about another year.

Porting from the old system to the new one is not very complicated, i.e. you won't have to rewrite everything from scratch, but some changes will need to be made.
We will prepare documentation about all this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins Related to MuseScore's QML plugin framework (NOT VST/audio plugins) regression MS4 Regression on a prior release UI Visual issues affecting the UI (not notation)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants