-
-
Notifications
You must be signed in to change notification settings - Fork 113
Jeremypw/plugins/fix libpeas2 #1566
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely fixes the issue! A couple nitpicks
src/Services/PluginManager.vala
Outdated
public Peas.Engine engine { get; construct; } | ||
public Peas.ExtensionSet extension_set {get; construct; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should not be construction properties. Only things passed into an Object
call should be construct
. Properties that are set inside the class should be private set
: https://docs.vala.dev/tutorials/programming-language/main/03-00-object-oriented-programming/03-14-gobject-style-construction.html
I think extension_set
can just be private. It looks like maybe we need to hold a reference to it (might be a good place for a comment), but I don't think it needs to be public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, ok. I tend to use construct;
for any property that is assigned once only upon construction. Sure, if its private set;
we can ensure that anyway so I guess its unnecessary. I'll see if it still works with private set;
properties.
Use `construct;` only for properties assigned in Object construction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Fixes #1560
In PluginManager:
In master, plugins are getting deactivated as soon as loaded for reasons that are obscure. After much trial, error and elimination it appears that the above two changes fix the issue.
View the diff hiding whitespace changes.