Re: Shell 3.26 / GJS Strict Mode settings
- From: philip chimento gmail com
- To: Jason DeRose <list derose io>, gnome-shell-list gnome org
- Subject: Re: Shell 3.26 / GJS Strict Mode settings
- Date: Tue, 10 Oct 2017 13:22:34 +0000
On Mon, Oct 9, 2017, at 10:38 AM, Emmanuele Bassi wrote:
> GJS is now using an updated mozjs engine, which implements ES6 and
> drop compatibility for Mozilla extensions to the language.
>
> For more information:
>
> -
> https://ptomato.wordpress.com/2017/04/22/_javascript_-news-from-gnome-3-24/
> -
> https://ptomato.wordpress.com/2017/07/30/modern-_javascript_-in-gnome-guadec-2017-talk/
>
> Ciao,
> Emmanuele.
>
> --
> https://www.bassi.io
> [@] ebassi [@gmail.com]
Thank you very much for the great links. I think this explains many of
the warnings around exporting from modules, etc.
But I don't get why the warning about testing equality of undefined
variables, which is done all over the shell, is present? Does this need
to actually log a warning? It seems perfectly valid to me.
JS WARNING: [resource:///org/gnome/shell/ui/search.js 636]: reference to
undefined property "searchInProgress"
JS WARNING: [resource:///org/gnome/shell/ui/modalDialog.js 218]:
reference to undefined property "GdkX11Screen"
Hi Jason,
The false positives seemed annoying to me at first, until the warnings actually caught some bugs in my code. Now I appreciate them.
In any case, it's a choice of the JS engine, not of GNOME Shell. You can turn it off on your system with an environment variable, but better just to fix the code so the false positives don't show up.
Regards,
Philip C
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]