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

[dart2js] Breaking change: remove support for compiling sources from http #49473

Closed
sigmundch opened this issue Jul 18, 2022 · 7 comments
Closed
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. breaking-change-approved web-dart2js

Comments

@sigmundch
Copy link
Member

Context: The dart2js compiler internally allowed compiling inputs provided via an HTTP client connection. Support for this was experimental and never documented. We don't believe this functionality is in use at this time, and we intend to delete it with the goal of reducing technical debt in our system.

What can break?
If you run dart2js and provide http URIs as inputs, the compiler will no longer download the files and compile them. Instead it will provide a compile-time error indicating that the compiler doesn't support http sources.

We don't expect this to be an active pattern used by the community today, but we are using this notice to make sure we didn't miss any use cases.

Mitigation
If by chance there is a use of this feature, the mitigation is to add a tool chain step to first download resources and then run the compiler with inputs from local disk.

/cc @itsjustkevin @kevmoo @mit-mit @vsmenon

@sigmundch sigmundch added web-dart2js breaking-change-request This tracks requests for feedback on breaking changes area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Jul 18, 2022
@sigmundch sigmundch self-assigned this Jul 18, 2022
@devoncarew devoncarew changed the title [dart2js] Breaking change: remove support for compiling sources form http [dart2js] Breaking change: remove support for compiling sources from http Jul 19, 2022
@kevmoo
Copy link
Member

kevmoo commented Jul 19, 2022

SGTM!

@jakemac53
Copy link
Contributor

jakemac53 commented Jul 19, 2022

There aren't active uses today, but it is potentially useful for running dart2js against a development server (like webdev, or the internal equivalent). Experiments have shown it to be pretty slow though compared to loading files from disk, even with a local server.

Probably some other solution than HTTP though would be better for this use case.

@itsjustkevin
Copy link
Contributor

@Hixie @grouma @vsmenon @mit-mit thoughts on this breaking change?

@grouma
Copy link
Member

grouma commented Jul 21, 2022

SGTM.

@Hixie
Copy link
Contributor

Hixie commented Jul 21, 2022

fine by me

@mit-mit
Copy link
Member

mit-mit commented Jul 21, 2022

SGTM

@itsjustkevin
Copy link
Contributor

Marking this change as approved

@itsjustkevin itsjustkevin added breaking-change-approved and removed breaking-change-request This tracks requests for feedback on breaking changes labels Jul 28, 2022
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. breaking-change-approved web-dart2js
Projects
None yet
Development

No branches or pull requests

7 participants