Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frontend_server] Deprecate moduleName from compile-expression-to-js #58265

Open
srujzs opened this issue Nov 19, 2024 · 0 comments
Open

[frontend_server] Deprecate moduleName from compile-expression-to-js #58265

srujzs opened this issue Nov 19, 2024 · 0 comments
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. front-end-server Issues with the frontend server type-task A well-defined stand-alone task web-dev-compiler

Comments

@srujzs
Copy link
Contributor

srujzs commented Nov 19, 2024

moduleName is only ever used in one place - to cache the DDC program compiler so that it can be reused for expression evaluation:

kernel2JsCompilers[moduleName] = compiler;
if (!cachedProgramCompilers.containsKey(moduleName)) {
. With the DDC library bundle format, we no longer use module names. Instead, we should cache the compiler based on the library uri. Therefore, moduleName can be deprecated from the request. Removing it would be a breaking change, however.

@srujzs srujzs added web-dev-compiler front-end-server Issues with the frontend server labels Nov 19, 2024
copybara-service bot pushed a commit that referenced this issue Nov 20, 2024
#58265

The DDC library bundle format does not give names to modules.
Therefore the frontend server should try and find the compiler
associated with the library and not the module to be consistent.
This then means that moduleName becomes entirely unused, and
therefore we can soft-deprecate it.

Change-Id: I241c63a346d046405599384409a373ab12be2654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396102
Commit-Queue: Srujan Gaddam <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>
copybara-service bot pushed a commit that referenced this issue Nov 21, 2024
…sionToJS"

This reverts commit 294a50f.

Reason for revert: This breaks `frontend_server_circular_evaluate_test` in DWDS.

Original change's description:
> [frontend_server] Soft-deprecate moduleName for compileExpressionToJS
>
> #58265
>
> The DDC library bundle format does not give names to modules.
> Therefore the frontend server should try and find the compiler
> associated with the library and not the module to be consistent.
> This then means that moduleName becomes entirely unused, and
> therefore we can soft-deprecate it.
>
> Change-Id: I241c63a346d046405599384409a373ab12be2654
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396102
> Commit-Queue: Srujan Gaddam <[email protected]>
> Reviewed-by: Johnni Winther <[email protected]>

Change-Id: I74b096f7ebc322c9d4428d236ab226ef1adcb6b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396567
Reviewed-by: Nicholas Shahan <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
Commit-Queue: Srujan Gaddam <[email protected]>
@lrhn lrhn added type-task A well-defined stand-alone task area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. front-end-server Issues with the frontend server type-task A well-defined stand-alone task web-dev-compiler
Projects
None yet
Development

No branches or pull requests

2 participants