-
Notifications
You must be signed in to change notification settings - Fork 93
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
GNOME 3.34 support #316
GNOME 3.34 support #316
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.
The reason was probably that in 3.32 shell, this is actually not possible - it says something like "gobject.registerClass used with invalid base class ..."
With that reverted, I have the hamster extension working on 3.32 again - thanks a lot!
(Upgrading to 3.34 is also WIP)
Hm, did you test this on 3.34? I can actually see the popup and the data etc., but cannot enter anything to change the task I'm working on. The shell's "lg" doesn't show any errors. |
Sure I did. I am using it under 3.34 every day. Check your "journalctl --user" output. |
OK, just asking :-) I can stop the current activity, but neither the triangle "play" button on a previous activity, nor the input field actually work. Nothing logged in the journal, nor in the lg. Any other debug hints? |
Hm, strange. Whenever I had problems like that, I also had some errors in the log. What I did in similar situations was add debug output in various places in the extension, and try to spot issues that way. |
I think it's an issue with me having installed a very new version of the hamster service, dbus-monitor showed me an issue:
|
Yes, looking at the code, it wants a start_time as non-0 at least, so I guess we need to pass the current time. Really the code wants to have this pre-parsed and called with some kind of dict as the first arg https://github.com/projecthamster/hamster/blob/master/src/hamster/storage/storage.py#L44 |
This makes it kinda work https://p.sipsolutions.net/baba42547992ef59.txt I guess I need to check further, the rounding is odd. But without it, the overview window (not in the applet, the normal window) shows "NEGATIVE" during the first ~minute... |
So you're using the latest hamster? That makes sense then. I'm still at 2.2.2 here. Feel invited to create a PR against my repo for the GNOME extension. |
Out of necessity in a sense, I upgraded to Fedora 31 which removed the packages due to python2 dependency, so I just pulled master and installed it myself ... that doesn't even have python2 dependency anymore, but evidently also broke/changed other things. I'm wonder if I shouldn't create a PR against hamster instead to fix the behaviour though. |
You can call it an API change, for sure. Not sure how much @ederag cares about compatibility with the GNOME extension. I don't think he is using it himself. |
It affects every D-BUS client though... I dunno. I guess I have the local hack for now while I continue to ponder ... |
I doubt there are relevant other Dbus clients that are not part of hamster itself. |
Fair enough. |
... but that's a good point, the Dbus API shouldn't be changed without good reason. |
Not using it, but compatibility does matter. |
Well, that could be much better actually. |
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.
I looked through this PR, the code looks good to me. I also tested it briefly, seems to work as expected on 3.34.
I left one minor comment that is easy to fix. I would say it would be good to merge this, is there anyone other than @elbenfreund that can and wants to do this still? @ederag maybe?
Makefile
Outdated
wget https://gitlab.gnome.org/GNOME/gnome-shell-extensions/raw/gnome-3-30/lib/convenience.js -O $@ | ||
|
||
collect: $(BUILDDIR)/convenience.js | ||
collect: |
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.
This change removes the (indirect) dependency from collect
to $(BUILDDIR)
. If you now run make clean-build
and then make compile
, you get cp: target 'build' is not a directory
. Could you maybe make collect
depend on $(BUILDDIR)
again?
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.
Can't do anything. Got no rights on this repo.
The shell-extension is looking for a maintainer (#315 (comment)).
OK. Pushed an update. Also, reverted the patch that skipped zip file creation. |
Since there is movement, and that will me merged soon,
This is from @mwilck's comment #312 (comment) that is linked in the top message, |
Now that there is some movement in the repository access front, I think this PR would be a good candidate to merge (though I have not really looked at others much). However, @DirkHoffmann suggests in #315 (comment) that this branch/PR does not work on gnome 3.32, only on 3.34 (but I might be misreading his comment). IMHO it would be good (and I think possible) to support both 3.32 and 3.34 with a single codebase. Also, before merging this, it might be useful to do a rebase to clean up history a bit (I see there is a merge commit in here, which would probably be better if it was flattened). |
Thank you, @matthijskooijman,
Indeed, we will have to solve the problem of incompatibility between (at least) gnome-shells 3.30, 3.32 and 3.34. For the sake of it: The hamster-shell-extension is located in the middle of two APIs: hamster (dbus) on one side and gnome-shell on the other. The compatibility matrix is likely to cause us some headaches in the future. But we start with optimism. |
IMO branches are the way to go. Changes for recent GNOME version should go into the master branch. If that breaks compatibility with previous GNOME versions, a compatibility branch should be created for the respective GNOME version. If any non-GNOME-API-related fixes are added to the master branch (I don't think this has happened during the last 2 years), they can be cherry-picked onto the compatibility branches. As an openSUSE Tumbleweed user, my personal main interest will be focused on the latest releases (but don't and won't test with unstable/odd-numbered GNOME releases).
Fortunately, @ederag has committed himself to keep the hamster side of the API stable for the time being, so there's not so much to worry about. One exception: hamster 3.0 has removed some "GNOME specific" parts of hamster code such as the idle detection, so we may need to figure out how to add this functionality back. I guess it could be done in the extension itself. |
Thanks - so I guess anyone with admin rights should consider deleting the CLA comments that have been created in currently open PRs. |
I went over all open PRs for |
Rebased to current develop, necessary because of the recent merge of #310. |
@ernestask hasn't responded to my questions (both on #312 and via email) on how he'd like his authorship to be acknowledged besides what's already in the commit messages. I'm inclined to merge here, and go forward with #323 afterwards (to be clarified if the 3.36 changes are compatible with 3.34, or if we need to branch). If anyone disagrees, speak up now. |
Rebased on code base of #312. |
I've tried Fedora 30 / GNOME 3.32 now. This version is not compatible with GNOME shell 3.32.
(This was the "reason I don't remember" in the commit msg of e866154). Consequently, #323 is also not compatible with 3.32. I will push corresponding updates when @hedayat has finished his rebase on #299. |
Would it be possible to make that commit compatible with 3.30? That would save us a branch. E.g. something like:
Maybe the GNOME version check could be more specific by checking whether I'm not familiar enough with javascript to actually tell if this would work, If this does not work, maybe the commit message of that commit (and maybe also e2a5edf) should be updated to say that FactsBox was not converted to GObject because its superclass was not converted to GObject in gnome-shell yet (since that's I think how it is)? |
In theory it can be done, but most extensions seem to choose branching over the headache of maintaining this sort of complex code. It doesn't tend to get better over time. I'd recommend this only for very small changes, like one-liners, and definitely not for class definitions. For this particular case, I don't like the idea to start experimenting again. We've got working code bases for every GNOME shell release since 3.30 at least, and I'd like to get this done and out to e.g.o. ASAP. If someone figures out an elegant, easy-maintainable solution to unify the code and merge two branches again, I'm not going to object.
I'll certainly update the commit message for e866154, and sure, I can also do it for e2a5edf. It looks as if the commit that changed |
Just this class had been handled differently in e2a5edf ("Port GObject classes to JS6 classes"). Handle them like all others; this is required for GNOME 3.34. Fixes this problem: gnome-shell[9973]: TypeError: this.factsBox.refresh is not a function Under GNOME 3.32, this commit causes the following error message: gnome-shell[7033]: Extension "[email protected]" had error: TypeError:GObject.registerClass() used with invalid base class (is PopupBaseMenuItem) Thus it breaks compatibility with GNOME 3.32.
Fixes: gnome-shell[9973]: Usage of object.actor is deprecated for PanelWidget See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/487
zip is only necessary for uploading to extensions.GNOME.org.
Merge upstream changes for GNOME 3.32.
PR update: updated commit message of 13457c0 to reflect this comment (previous: 7e2d9e0). Moreover, merged the 3.32 changes from develop branch ( |
This is based on my previous GNOME 3.32 PR (#312). It fixes issue #315 (and #307, too). The changes on top of #312 are small.