-
Notifications
You must be signed in to change notification settings - Fork 114
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
Javascript Fixes for GNOME shell 42 #134
Conversation
Convert ArgosButton and ArgosLineView to GObject.registerClass(). Unfortunately, this time it seems that we can't maintain backward compatibility. For reasons I can't explain, until GNOME 41 the "complex" classes ArgosButton and ArgosLineView could still be defined using Lang.Class(), therefore we could get away with the simplistic makeSimpleClass() trick to define classes differently for different GNOME shell versions. Now this doesn't work any more, classes with multiple methods can't be converted between Lang.Class() and GObject.registerClass() syntax without complex text procesing. This fixes errors like this: Mar 25 18:11:49 apollon.suse.de gnome-shell[15049]: JS ERROR: Extension argos@pew.worldwidemann.com: TypeError: Object 0x284558126958 is not a subclass of GObject_Objec> _construct@resource:///org/gnome/gjs/modules/script/_legacy.js:536:31 wrapper@resource:///org/gnome/gjs/modules/script/_legacy.js:83:27 newClass@resource:///org/gnome/gjs/modules/script/_legacy.js:115:21 Class@resource:///org/gnome/gjs/modules/script/_legacy.js:66:16 @/home/mwilck/.local/share/gnome-shell/extensions/argos@pew.worldwidemann.com/button.js:24:19 @/home/mwilck/.local/share/gnome-shell/extensions/argos@pew.worldwidemann.com/extension.js:18:21 I've removed GNOME shell < 3.34 from the compatibility list. GObject.registerClass() should be available in 3.34. So far I have only tested this with GNOME shell 42.
Just tested with GNOME 34, seems to work. |
Just tested it on my Arch Linux system : it works perfectly ! |
Hi @mwilck, apparently, as mentioned here #135 (comment) this pull request does not populate dropdown menus. Before I became aware of this pull request I made my own branch to support GNOME 42 (which does populate dropdown menus). I don't intend to create a competing pull request, but feel free to figure out what changes need to be made to this pull request to fix dropdowns based on my changes here: Coda-Coda@ab53846 if you feel like it. 🙂 |
@Coda-Coda, thanks for the note. I had a look at your branch but the differences are too big for a detailed assessment about the drop-down menu issue. Your branch is not based on current master. You need to rebase before we can go into further detail. In addition, please consider to rebase to my code base here and create a PR against my branch. That might clarify what the cause of @prurigo's issue was. I'm not concerned about authorship at all, so if your code (on top of current master) works better than mine, I'll just close this PR and let you create one instead. @prurigro, if you had problems with the version in this PR I'd appreciate if you could describe them here rather than in #135. drop-down menus do work for me with my version, so I'd be grateful for a more detailed description of your issue, possibly with screenshots, and ideally with a small sample program to demonstrate the effect and for me to try. Also, please report whether your program works with current master under GNOME <42. |
I have just tried this pull request and the drop-down menu appears to work fine for me as well - thanks for your efforts @mwilck 🙂. The reason my branch diverges from master is that it's based on https://github.com/rammie/argos/tree/gnome-3.36. But just in case it is useful, here is a pull request against your branch with the relevant changes: mwilck#7. @prurigro if you have the time, please do describe any issues you had with dropdowns here - I was not able to reproduce your issue. |
Thanks working well in Gnome 42 in Ubuntu 22.04 |
any idea if/when this is getting merged? |
Running this on Gnome 42 with Ubuntu 22.04. It seems to make my UI laggy, with random pauses when doing things like clicking, scrolling with the mouse wheel and even typing. Is anyone else having that issue? I didn't have any issues on Ubuntu 20.04 and 21.10 with a different fork of argos. |
@orangethunder, I've also encountered that freezing issue but have not managed to resolve it yet, turning off extensions completely does seem to stop it. If you figure out how to fix it, please let me know, thanks 🙂 |
@Coda-Coda, @orangethunder: is argos the only extension you use? How many argos scripts do you have, how quickly/often do they refresh? Unless this if this happens if and only if argos but no other extension is enabled (iow, doesn't happens with other extensions) I'm sceptical that argos alone would drag down the overall performance of the shell. I'm trying not to be defensive, but some additional evidence is needed. |
@mwilck I totally agree we need more data to resolve this. My setup right now has argos as the only extension, with one script, being refreshed every 1s. I'm currently trying out running this version of argos (that doesn't fit well with master) but as it is an intermittent issue I'm not sure if that makes a difference or not. As I was typing this message (with argos enabled) there didn't seem to be any freezing issues). Who knows 🤷♂️ I'll try report back here in the future if I have the time. |
I was experiencing instability, hangs and lag in the UI. Like the activity overview animation and even just dragging windows around was suddenly so jerky, and sometimes the activity overview would not show any windows suddenly. It turned out to be another extension, not Argos, I think either Unite or "Gnome 4x UI improvements" or something. It was hard to pinpoint exactly which. But it seems to be working perfectly now. It could also be a conflict between extensions maybe, so disabling either extension will fix it who knows. I thought argos is a relatively simple extension that does not modify the Gnome system much. |
@mwilck, argos was the only user-installed extension I had active at the time. I have 3 tasks running every 5 seconds. Since this is so hard to troubleshoot (and it's working for other users) I decided to code up a simple alternative for my needs instead. |
@orangethunder: thanks for the update. If anyone has ideas how this could be debugged, please speak up. |
I've just tried it on Fedora 36 with Gnome 42, and got the following error: "Utilities.getActor is not a function" |
@DmitryBurstein, can you paste an entire log? What exactly is the GNOME shell version iin F36? Can you confirm that you actually used the code from this PR? |
Gnome shell version is 42.0. Yes, I have manually updated all 3 files from this PR in the .local subtree. |
@mwilck, FWIW, I switched back to Xorg from Wayland, and now have no performance issues with this PR. I also noticed that Wayland had some stutters even without the extensions, but it was definitely worse when the extension was enabled. I don't really know what it means, but it could be taken as evidence that the issue is not with the PR itself. |
@mwilck To add a few data points: I've been using this branch on Ubuntu 22.04 on about 10 desktops and laptops since 22.04's release. I haven't encountered any problems on any of those machines, and other users haven't complained either. We're using both Wayland and Xorg. So to me this looks good to be merged. |
To add to my earlier comment, I've been using the code of my fork for the last while and since switching to it have not had the issue with the lagging. However, I am not fully convinced this correlation is necessarily a causal link. What I'll do next is try the code of this pull request again to see if the issue re-emerges. |
Gnome version on F36 got bumped to 42.2, but the error message remains the same: "Utilities.getActor is not a function" |
I don't see this message here. |
Since this seems to be working properly for everyone except @DmitryBurstein , I suggest to merge it, and then care about the getActor thing separately. |
Should this be merged into a separate |
Makes sense but then maybe better create a separate |
I installed the fork @Coda-Coda mentioned and it's working perfectly for me. |
I agree with @real-or-random that the master branch should support the latest stable GNOME version. This is what users would expect, IMO. |
Yes, that sounds reasonable. @mwilck, feel free to merge this whenever you think it's ready, and arrange the branches however you think is best. |
This was working for me in GNOME Shell 42.0 through 42.3, but with GNOME Shell 42.3.1, I’m now getting
because argos/argos@pew.worldwidemann.com/utilities.js Lines 281 to 316 in 691cdcf
|
Hm, did they change their versioning scheme again? |
That expectation was based on the discourse post. Apparently they recently started to add another digit to their versions. Never trust anything the GNOME devs publish... well this worked for almost 2 years, which can be considered a success, I suppose. |
Recently GNOME shell has started releasing 3-digit versions again, like 42.3.1. Let's assume for now that these are bug fix versions which don't affect the extension API, and simply ignore the last digit.
I've pushed a tentative fix. @andersk, please check it out. |
I can confirm it works. Thank you! |
I can also confirm that it the new commit works on 42.3.1. |
The "top" script works for me. Could you share your logs? You might also want to put some add some messages in the extension to try isolating the problem. |
huh...
|
Is it really the code from this PR you're running? |
I'm beginning to wonder the same thing. |
I must be doing something horrifically wrong. I tried using the install from GNOME shell ext website, I tried cloning the repo and symlink the folder... ok, copying the folder worked, top is showing nicely when I click it, but my timezones script... still nothing. If I edit it, change something and save, I see the message of reload on Argos' area. But that's it, and it just blinks ultra fast out of view. |
good. Could you perhaps just attach or paste your script, so that I don't have to type it from your screenshot? |
@joaociocca Argos tries to parse the trailing |
@mwilck sorry about that! @real-or-random that worked! thank you very much <3 |
Convert
ArgosButton
andArgosLineView
toGObject.registerClass()
.Unfortunately, this time it seems that we can't maintain backward
compatibility. For reasons I can't explain, until GNOME 41 the "complex"
classes
ArgosButton
andArgosLineView
could still be defined usingLang.Class()
, therefore we could get away with the simplisticmakeSimpleClass()
trick to define classes differently for differentGNOME shell versions. Now this doesn't work any more, classes with
multiple methods can't be converted between
Lang.Class()
andGObject.registerClass()
syntax without complex text procesing.This fixes errors like this:
I've removed GNOME shell < 3.34 from the compatibility list.
GObject.registerClass()
should be available in 3.34. So far I have only testedthis with GNOME shell 42.
Testing with other GNOME shell versions (34 - 41) would be appreciated.