Searchfox Update: Searchfox's feud with JS #hashtags is now over!

32 views
Skip to first unread message

Andrew Sutherland

unread,
Nov 23, 2022, 11:54:47 AM11/23/22
to dev-pl...@mozilla.org
A lot of hip, new JavaScript code seems to be filled with #hashtags for
some reason[1] and up until last night when
https://bugzilla.mozilla.org/show_bug.cgi?id=1801960 [2] landed,
Searchfox was not having it.  But Searchfox knows that it needs to keep
up with emerging trends like moving the "m" from the end of "jsm" to the
front[3] and so now its tokenizer is willing to accept that you might
want to use hashtags as an identifier. (Although maybe we could lose the
#ifdef hashtags[4]?)

The medium term plan continues to be to move to move to scip-typescript
built on top of the typescript engine that you use in VS Code[5] for JS
inference as tracked by
https://bugzilla.mozilla.org/show_bug.cgi?id=1740290 and with the
fundamental groundwork recently completed by :emilio in
https://github.com/mozsearch/mozsearch/pull/570.

Andrew


1:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields

2: Thank you for filing this, :aminomancer!

3: Improved JS module support previously announced in
https://groups.google.com/a/mozilla.org/g/dev-platform/c/Vjn-IOS25Z0/m/HhN4T8boAQAJ
which dealt with the semantic analysis issues related to private symbols.

4:
https://firefox-source-docs.mozilla.org/build/buildsystem/preprocessor.html
with example use
https://searchfox.org/mozilla-central/source/toolkit/modules/AppConstants.sys.mjs

5: If you're hip enough to use #hashtags in JS, you're hip enough to use
VS Code.

Reply all
Reply to author
Forward
0 new messages