Closed
Bug 1148638
Opened 9 years ago
Closed 9 years ago
C-C TB: "Error: __noSuchMethod__ is deprecated" from |make mozmill| and |make xpcshell-tests|
Categories
(Thunderbird :: Instant Messaging, defect)
Thunderbird
Instant Messaging
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1142337
People
(Reporter: ishikawa, Unassigned)
References
Details
Starting this month I noticed appearances of an Error message (JavaScript warning) during the local test of C-C TB (by running |make mozmill| and |make xpcshell-tests| test suites) regarding Error: __noSuchMethod__ is deprecated Here are two places which seems to use this feature: JavaScript warning: file:///REF-OBJ-DIR/objdir-tb3/dist/bin/components/irc.js, line 1845: Error: __noSuchMethod__ is deprecated PROCESS | 677 | JavaScript warning: resource://testing-common/mailnews/nntpd.js, line 411: Error: __noSuchMethod__ is deprecated The former appears just once in |make mozmill| log, and the latter appears several times in |make xpcshell-tests| log. I googled and found the following post: "PSA: __noSuchMethod__ is deprecated in SpiderMonkey" https://groups.google.com/forum/#!topic/mozilla.dev.platform/0EkHgphxUo8 The warning/error comes from the change mentioned above. In the follow-up to the message above, Joshua Cranmer says: >FWIW, I've found that both the uses in comm-central are basically poor >man's reimplementation of ES6 classes, so I don't think it's worth >removing this code until ES6 classes land. Maybe so. I am filing this so that this won't be forgotten. I tried to see if __noSuchMethod__ is used for real in nntpd.js and I found it is. If I comment out the use of __noSuchMethod__ in nntpd.js, I get NEW errors from |make xpcshell-tests| a la TEST-UNEXPECTED-FAIL | mailnews/news/test/unit/test_nntpGroupPassword.js | - "MODE READER,GROUP test.filter,AUTHINFO user group2,AUTHINFO pass pass2,GROUP test.filter" == "MODE READER,GROUP test.filter,AUTHINFO user group2,AUTHINFO pass pass2,GROUP test.filter,XOVER 1-8" ... So the clever feature is used in a complex way, and we need to rewrite nntpd.js It is possible that [1] is addressing the issue in irc.js, but I am not sure. [1] Bug 1142337 - Implement NormalizedMap without __noSuchMethod__ TIA BTW, I wonder if ES6 features have been already in javascript interpreter (including this ES6 class feature)? I ask this because in the log of my local |make mozmill| test suite run, I see so many ES6-related warning, and they have overwhelmed other serious issues when I scan the log. To wit, the following is an excerpt from my log summarizer's output against the log of |make mozmill|: The number preceding the warning lines are the frequency of the appearance of each warning. They are sorted in the descending order of the frequency. --- begin quote --- [ ...] ======================================== JavaScript strict warning jquery.js and jquery-ui.js are ignored. (non-mozmill part) ======================================== 35 JavaScript warning: chrome://messenger/content/newmailaccount/accountProvisioner.js, line 810: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://messenger/content/newmailaccount/accountProvisioner.js, line 754: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://messenger/content/newmailaccount/accountProvisioner.js, line 735: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://messenger/content/newmailaccount/accountProvisioner.js, line 574: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 35 JavaScript warning: chrome://messenger/content/accountcreation/sanitizeDatatypes.js, line 154: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 10 JavaScript warning: chrome://messenger/content/about-support/prefs.js, line 115: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 10 JavaScript warning: chrome://messenger/content/about-support/init.js, line 89: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 10 JavaScript warning: chrome://messenger/content/about-support/accounts.js, line 86: JavaScript 1.6's for-each-in loops are deprecated; consider using ES6 for-of instead 7 JavaScript error: chrome://messenger/content/cloudfile/addAccountDialog.js, line 205: TypeError: this._accountType is null 5 JavaScript error: resource:///modules/activity/alertHook.js, line 48: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgMailNewsUrl.server] 5 JavaScript error: chrome://messenger/content/folderDisplay.js, line 1098: TypeError: this.view.displayedFolder is null [ ... ] --- end quote --- In the above, eight most frequent warnings/errors about use of ES6 for-of constructs. The number 35 suggests that they appear as part of initialization of test modules (there are 35 test directories and |make mozmill| runs against these directories.) Only at the 9th position, we begin to see potentially serious issues. 7 JavaScript error: chrome://messenger/content/cloudfile/addAccountDialog.js, line 205: TypeError: this._accountType is null 5 JavaScript error: resource:///modules/activity/alertHook.js, line 48: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgMailNewsUrl.server] 5 JavaScript error: chrome://messenger/content/folderDisplay.js, line 1098: TypeError: this.view.displayedFolder is null ... I am wondering if the strange display errors I occasionally see are related to these less frequent (in |make mozmill|) error/warnings. But skipping ES6-related warnings/errors have become very bothersome. I hope the transition to ES6 features will end soon completely so that we can focus on the real problems in the applications. I wonder, by the way, if anyone reads logs from these test suites? TIA
Comment 1•9 years ago
|
||
(In reply to ISHIKAWA, Chiaki from comment #0) > JavaScript warning: > file:///REF-OBJ-DIR/objdir-tb3/dist/bin/components/irc.js, line 1845: Error: > __noSuchMethod__ is deprecated As far as I know, the chat people are waiting until es6 classes (particularly super support) lands before this use is deprecated. It's a textbook es6 class example. > PROCESS | 677 | JavaScript warning: > resource://testing-common/mailnews/nntpd.js, line 411: Error: > __noSuchMethod__ is deprecated The latter is gone now, at least on c-c trunk. > BTW, I wonder if ES6 features have been already in javascript > interpreter (including this ES6 class feature)? You can track these bugs with bug 694100. ES6 classes are already implemented, but I've been told that they shouldn't be used even in Mozilla code until they hit a release branch. > In the above, eight most frequent warnings/errors about use of ES6 > for-of constructs. The number 35 suggests that they appear as part of > initialization of test modules (there are 35 test directories and > |make mozmill| runs against these directories.) You mean bug 1118263? These sorts of bugs mostly need someone to step up and do the changes. > I wonder, by the way, if anyone reads logs from these test suites? Generally not, unless they fail.
(In reply to Joshua Cranmer [:jcranmer] from comment #1) > > In the above, eight most frequent warnings/errors about use of ES6 > > for-of constructs. The number 35 suggests that they appear as part of > > initialization of test modules (there are 35 test directories and > > |make mozmill| runs against these directories.) > > You mean bug 1118263? These sorts of bugs mostly need someone to step up and > do the changes. There are some people who like to do these kind of bugs. I am sure Chiaki could also fix some of these. As I agree they are usually not hard, they just need somebody to do the changes. > > I wonder, by the way, if anyone reads logs from these test suites? > Generally not, unless they fail. I often do, but mostly on local runs. It is good that Chiaki also does it and files these bugs for them.
So now that the accountProvisioner and about-support has its own bug and the noSuchMethod is gone or known to the right people, what is left in this bug to do?
Comment 4•9 years ago
|
||
(get thee out of untriaged component)
Component: Untriaged → Instant Messaging
Comment 5•9 years ago
|
||
I think the nntpd part was fixed already and just the irc part is left? That's bug 1142337.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•