Re: How to reload extension with modified code



Norman,
Thanks for detailed explanations.
That is a problem of gnome-shell design - it is not allowing for extension complete removal without restart.
Sergey

On Wed, Jan 3, 2018 at 3:40 PM Norman L Smith <nls1729 gmail com> wrote:
Hello Sergey,

I have a tool I use to perform the zip file functions that were removed from
the Tweak tool in GS 3.26.

It will install a new zip, re-install an existing extension from a zip or
remove an extension by removing the local extension directory.  After any of
these operations you must restart the shell session.


From my understanding of the problem under X the shell session could be restarted
because the X session is separate from the shell session.  The wayland server is
part of the shell session and if stopped, applications will be affected. Currently
there is no way to remove the extension object from the gnome-shell. The extension
is imported into the shell and there is no way to remove imports from the shell.

When you remove the original extension files from the filesystem, the imported
extension remains resident in the shell. I have tried changing the uuid of an 
extension and then installing it from a zip file.  The modified extension is not
imported into the shell until the shell is restarted.  I confirmed that when
updating an extension from the extension website the changes on disk are not
activated until the shell is restarted.

Norman

See:


On Wed, 2018-01-03 at 14:51 +0000, Sergey Cherepanov wrote:
Hi,
Thanks for responses and advices!
I believe this is a problem for all developers working with gnome-shell extensions.
Suggested approach - fall to Xorg and use old method of restarting gnome-shell - would work. I think it can be done better.

Gnome tweak tool used to have option to install extension from local zip file. I did development cycle - create zip file with new code, remove extension, install from zip. It was picking up new code.
I think this should be recommended way to go forward.
Gnome-she’ll-extension-reload should be modified to support it. Or Reloader extension mention earlier should support remove-install from local zip.
I saw Florian Muelner mention that adding extension require some key modification. That probably is a missing part now for reloading extension with new code.
Comments?
Sergey

On Tue, Jan 2, 2018 at 9:57 AM Norman L Smith <nls1729 gmail com> wrote:
Hello,

Your problem is due to the change from Xorg to Wayland. When the Gnome Shell is
run in a Wayland desktop session the shell cannot be restarted.  Some linux
distributions provide the ability to log into an Xorg or Wayland session. Fedora provides
the option of using an X session. With Ubuntu you can install the vanilla Gnome session 
which will give the option to run an X session. I wrote an extension to reload an extension
but it will only reload the extension if it is in an error state (ie. it had failed to be loaded
due to an error in the extension code and you have corrected the error).  That extension is
really not very useful.  You can develop under an X session and re-test under Wayland
after you get your code working.  There are differences in the shell code when running
under X that might not work correctly if you depend on the X behavior in your extension.
The only way to handle that problem is to look into the shell's sources if the extension
works under X but fails under Wayland.

Hope this is useful...
Norman

On Mon, 2018-01-01 at 18:12 -0600, Sergey Cherepanov wrote:
Hi,
Alt->F2 + r does not restart gnome-shell any more.
I am developing gnome-shell extension
How to reload gnome-shell extension with new code?
Enable-disable extension do pick up new settings, but not new code.
Only way I found to reload gnome extension code - logout/login from gnome altogether. That is EXTREMELY intrusive.
Any suggestions how to reload extension code?
Thank you
Sergey
_______________________________________________
gnome-shell-list mailing list
gnome-shell-list gnome org
https://mail.gnome.org/mailman/listinfo/gnome-shell-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]