Open Bug 1902966 Opened 11 months ago Updated 6 months ago

[META] Handle impacts of Explicit Resource Management

Categories

(DevTools :: General, task)

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

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

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?

(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 :)

(added a reminder to check what we need to do for this. AFAIU explicit resource management is available withjavascript.options.experimental.explicit_resource_management)

Component: Debugger → General
Summary: Handle impacts of Explicit Resource Management → [META] Handle impacts of Explicit Resource Management
Depends on: 1933139
Depends on: 1933140
Depends on: 1933141

Turned this bug into a META since I found a few issues we need to fix

You need to log in before you can comment on or make changes to this bug.