After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785568 - Use var instead of let/const for exported symbols
Use var instead of let/const for exported symbols
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.25.x
Other All
: Normal major
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-07-29 18:03 UTC by Jeremy Bicha
Modified: 2017-12-18 20:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use 'var' for more classes that are exported (1.63 KB, patch)
2017-08-07 01:03 UTC, Jeremy Bicha
committed Details | Review
Use 'var' for more classes that are exported (2.23 KB, patch)
2017-12-05 17:15 UTC, Debarshi Ray
committed Details | Review
preview: Use 'var' for exported constant (763 bytes, patch)
2017-12-07 15:33 UTC, Debarshi Ray
committed Details | Review
notifications, query: Use 'var' for exported constant (1.36 KB, patch)
2017-12-14 13:38 UTC, Debarshi Ray
committed Details | Review

Description Jeremy Bicha 2017-07-29 18:03:34 UTC
gnome-documents 3.25.4 from the GNOME3 Staging PPA
on Ubuntu 17.10 Alpha

gnome-documents works fine but when I try to run it with gjs 1.49.4 built with mozjs52, it won't start

$ gnome-documents 
Gjs-Message: JS WARNING: [resource:///org/gnome/Documents/js/main.js 44]: reference to undefined property "Application"

(org.gnome.Documents:3016): Gjs-WARNING **: JS ERROR: TypeError: Application.Application is not a constructor
main@resource:///org/gnome/Documents/js/main.js:44:23
run@resource:///org/gnome/gjs/modules/package.js:221:12
@/usr/bin/gnome-documents:6:1

JS_EvaluateScript() failed
Comment 2 Philip Chimento 2017-07-30 14:41:04 UTC
I suspect this is the same problem as bug 785556 of missing https://github.com/ptomato/mozjs/commit/1b82d28588ad5fe74116c6e6099c8f2f2eb392ff in your mozjs.
Comment 3 Jeremy Bicha 2017-07-30 16:43:34 UTC
Yes, once we rebuilt mozjs52 with that patch, gnome-documents starts but emits a few dozen warnings like this:

Gjs-WARNING **: Some code accessed the property 'MainToolbar' on the module 'mainToolbar'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

I'm updating the bug title accordingly.
Comment 4 Cosimo Cecchi 2017-07-30 23:34:38 UTC
Pushed a patch to squash most of these; not sure that I fixed all of them though, so keeping this open.
Comment 5 Jeremy Bicha 2017-08-07 01:03:22 UTC
Created attachment 357078 [details] [review]
Use 'var' for more classes that are exported

Here's a few more I found by running gnome-documents and clicking buttons.

I don't really know how this is supposed to work. Should we change all 'const' and 'let' declarations to 'var'?
Comment 6 Cosimo Cecchi 2017-08-07 01:24:35 UTC
Review of attachment 357078 [details] [review]:

Looks good.
Comment 7 Cosimo Cecchi 2017-08-07 01:26:33 UTC
(In reply to Jeremy Bicha from comment #5)
> I don't really know how this is supposed to work. Should we change all
> 'const' and 'let' declarations to 'var'?

No, only those variables that end up being exported (in this case, classes that are used outside of the source file where they're declared). I don't know of a good way to automatically detect this either unfortunately :(
Comment 8 Jeremy Bicha 2017-08-07 02:38:36 UTC
Comment on attachment 357078 [details] [review]
Use 'var' for more classes that are exported

Attachment 357078 [details] pushed as 1b37dcb - Use 'var' for more classes that are exported
Comment 9 Jeremy Bicha 2017-08-15 16:19:02 UTC
I hope you don't mind a long paste…

$ gnome-documents 

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'MainToolbar' on the module 'mainToolbar'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'Searchbar' on the module 'searchbar'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'Preview' on the module 'preview'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'BaseManager' on the module 'manager'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'PreviewToolbar' on the module 'preview'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'PreviewNavControls' on the module 'preview'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'Application' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'ShellSearchProvider' on the module 'shellSearchProvider'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'TrackerConnectionQueue' on the module 'trackerController'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'TrackerChangeMonitor' on the module 'changeMonitor'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'DocumentManager' on the module 'documents'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'changeMonitor' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'documentManager' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'application' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'goaClient' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'sourceManager' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'searchMatchManager' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'searchTypeManager' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'searchController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'QueryBuilder' on the module 'query'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'queryBuilder' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'documentManager' on the module 'shellSearchProvider'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'sourceManager' on the module 'shellSearchProvider'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'searchMatchManager' on the module 'shellSearchProvider'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'searchTypeManager' on the module 'shellSearchProvider'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'searchController' on the module 'shellSearchProvider'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'queryBuilder' on the module 'shellSearchProvider'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'ModeController' on the module 'windowMode'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'OffsetCollectionsController' on the module 'search'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'OffsetDocumentsController' on the module 'search'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'OffsetSearchController' on the module 'search'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'TrackerCollectionsController' on the module 'trackerController'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'WindowMode' on the module 'windowMode'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'modeController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'offsetCollectionsController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'settings' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'QueryFlags' on the module 'query'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'SearchTypeStock' on the module 'search'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'SearchMatchStock' on the module 'search'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'OFFSET_STEP' on the module 'search'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'connectionQueue' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'connection' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'TrackerDocumentsController' on the module 'trackerController'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'offsetDocumentsController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'TrackerSearchController' on the module 'trackerController'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'offsetSearchController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'SelectionController' on the module 'selections'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'NotificationManager' on the module 'notifications'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'MainWindow' on the module 'mainWindow'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'Embed' on the module 'embed'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'notificationManager' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'OverviewStack' on the module 'overview'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'SearchSourceStock' on the module 'search'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'SelectionToolbar' on the module 'selections'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'selectionController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'trackerDocumentsController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'ErrorBox' on the module 'errorBox'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'trackerCollectionsController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'trackerSearchController' on the module 'application'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'Dropdown' on the module 'searchbar'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'BaseModel' on the module 'manager'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'QueryColumns' on the module 'query'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: JS ERROR: TypeError: sourceManager is null
Application<._refreshMiners@resource:///org/gnome/Documents/js/application.js:276:1
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:81:22
Application<._startMiners/<@resource:///org/gnome/Documents/js/application.js:307:17
Application<._createMiners/this.gdataMiner<@resource:///org/gnome/Documents/js/application.js:221:21
_makeProxyWrapper/</<@resource:///org/gnome/gjs/modules/overrides/Gio.js:203:21
main@resource:///org/gnome/Documents/js/main.js:47:12
run@resource:///org/gnome/gjs/modules/package.js:221:12
@/usr/bin/gnome-documents:6:1


(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'SingleItemJob' on the module 'trackerUtils'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

(org.gnome.Documents:2402): Gjs-WARNING **: Some code accessed the property 'ChangeEventType' on the module 'changeMonitor'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Comment 10 Debarshi Ray 2017-12-05 17:15:00 UTC
Created attachment 365049 [details] [review]
Use 'var' for more classes that are exported
Comment 11 Debarshi Ray 2017-12-05 17:16:50 UTC
With this we should be able to close this bug.

I used:
$ git grep "const " src/*.js | grep null
$ git grep "const " src/*.js | grep Class

... and then went through each hit and checked if it is being used from a different module than the one in which it is defined.
Comment 12 Cosimo Cecchi 2017-12-06 00:54:31 UTC
Review of attachment 365049 [details] [review]:

LGTM, thanks!
Comment 13 Debarshi Ray 2017-12-06 07:48:50 UTC
Pushed to master and gnome-3-26.
Comment 14 Debarshi Ray 2017-12-07 15:33:28 UTC
Created attachment 365204 [details] [review]
preview: Use 'var' for exported constant

... and another one.
Comment 15 Cosimo Cecchi 2017-12-07 16:25:28 UTC
Review of attachment 365204 [details] [review]:

Sure
Comment 16 Debarshi Ray 2017-12-07 16:46:15 UTC
Comment on attachment 365204 [details] [review]
preview: Use 'var' for exported constant

Pushed to master and gnome-3-26.
Comment 17 Debarshi Ray 2017-12-14 13:38:54 UTC
Created attachment 365540 [details] [review]
notifications, query: Use 'var' for exported constant
Comment 18 Cosimo Cecchi 2017-12-18 16:26:09 UTC
Review of attachment 365540 [details] [review]:

LGTM
Comment 19 Debarshi Ray 2017-12-18 20:33:29 UTC
Comment on attachment 365540 [details] [review]
notifications, query: Use 'var' for exported constant

Pushed to master and gnome-3-26. Thanks, Cosimo.