[META] Handle impacts of Explicit Resource Management
Categories
(DevTools :: General, task)
Tracking
(Not tracked)
People
(Reporter: nchevobbe, Unassigned)
References
(Depends on 3 open bugs)
Details
(Keywords: meta)
Explicit Resource Management (see https://github.com/tc39/proposal-explicit-resource-management), will add a using
keyword, which means we'll need to update Babel for the parser to work on file using this new keyword.
We should also check how CodeMirror handles this new keyword and check that for example, hovering using
won't trigger the variable tooltip
Reporter | ||
Comment 1•11 months ago
|
||
We might also need to expose the suppressed error from the new SupressedError
: https://github.com/tc39/proposal-explicit-resource-management?tab=readme-ov-file#the-suppressederror-error
Comment 2•11 months ago
|
||
I would love to help here as well as soon as i am done with the prototyping any ideas on what parts of the code i should explore and what all changes maybe necessary?
Reporter | ||
Comment 3•11 months ago
|
||
(In reply to Debadree Chatterjee from comment #2)
I would love to help here as well as soon as i am done with the prototyping any ideas on what parts of the code i should explore and what all changes maybe necessary?
Thanks for offering help :)
Once you implemented explicit resource management, open a file which uses it. Usually, this breaks the Outline panel (amongst other things)
We'd probably need to add https://babeljs.io/docs/babel-plugin-proposal-explicit-resource-management into https://searchfox.org/mozilla-central/rev/b11735b86bb4d416c918e2b2413456561beff50c/devtools/client/debugger/package.json#52-74 , and then build the parser worker (see https://firefox-source-docs.mozilla.org/devtools/tests/node-tests.html#devtools-bundle). A test should be added at the same time in https://searchfox.org/mozilla-central/source/devtools/client/debugger/test/mochitest/browser_dbg-inline-preview.js , covering an expression with using
.
Then I don't know how using
relates to variable declaration, but we have a places like https://searchfox.org/mozilla-central/rev/b11735b86bb4d416c918e2b2413456561beff50c/devtools/client/debugger/src/workers/parser/mapAwaitExpression.js#70-76 , where we do handle const
and let
, so maybe there should be something for using
too.
Don't hesitate to ask any question if/when you start looking into DevTools, and don't feel bad if you don't have the time to do it, we'll handle it in such case :)
Reporter | ||
Comment 4•6 months ago
|
||
(added a reminder to check what we need to do for this. AFAIU explicit resource management is available withjavascript.options.experimental.explicit_resource_management
)
Reporter | ||
Updated•6 months ago
|
Reporter | ||
Comment 5•6 months ago
|
||
Turned this bug into a META since I found a few issues we need to fix
Description
•