Skip to content

[Breaking Change Request] Remove support for Analyzer based DDC #38994

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

Closed
nshahan opened this issue Oct 18, 2019 · 13 comments
Closed

[Breaking Change Request] Remove support for Analyzer based DDC #38994

nshahan opened this issue Oct 18, 2019 · 13 comments
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). breaking-change-request This tracks requests for feedback on breaking changes

Comments

@nshahan
Copy link
Contributor

nshahan commented Oct 18, 2019

Intended Change

Remove support for running the Analyzer based DDC from versions of the Dart SDK >= 2.7.0.

  • Default all invocations of dartdevc to use Kernel based DDC and begin ignoring the -k and --kernel arguments.
  • Delete the versions of dart_sdk.js compiled by Analyzer based DDC that are distributed with the SDK.
dart-sdk/lib/dev_compiler/amd/dart_sdk.js
dart-sdk/lib/dev_compiler/common/dart_sdk.js
dart-sdk/lib/dev_compiler/es6/dart_sdk.js

Rationale

The Analyzer based DDC is pure technical debt now. None of our supported build systems rely on this implementation and it is unused. It slows down development of the Analyzer team as they must keep it updated when they make breaking API changes.

Expected Impact

The exact number of users affected by this change is unknown but we expect it to be low based on the large groups that we know will not be.

Projects known to break

  • Projects with a dependency on build_web_compilers: < 2.0.0

Projects that will not be affected

  • Flutter web projects (never used Analyzer based DDC)
  • Web projects created by stagehand: ^3.3.2 (published for Dart v2.4 on Jul 3, 2019)
  • Web projects that depend on AngularDart: ^6.0.0-alpha+1
  • All Google internal web applications (already migrated to Kernel based DDC)

Migration Steps

The migration path is simple, update your package to depend on build_web_compilers: ^2.0.0 (the latest as of this writing is v2.7.0).

The typical dependency on build_web_compilers does not include any API usage so there should be no breaking changes.

@nshahan nshahan added the breaking-change-request This tracks requests for feedback on breaking changes label Oct 18, 2019
@mit-mit
Copy link
Member

mit-mit commented Oct 22, 2019

@Hixie @matanlurey @dgrove - Please review and approve.

@sigmundch
Copy link
Member

@devoncarew - it came to my attention that this may affect flutter dartpad as well - I believe you were already aware, but let us know if there is any need to wait or if we can move forward.

@yjbanov
Copy link

yjbanov commented Oct 22, 2019

Flutter does not use the analyzer based DDC and should not be affected by this change.

@devoncarew
Copy link
Member

devoncarew commented Oct 22, 2019

@devoncarew - it came to my attention that this may affect flutter dartpad as well - I believe you were already aware, but let us know if there is any need to wait or if we can move forward.

@domesticmouse, @RedBrogdon - Dartpad is in the middle of moving off of DDC and onto DDK. Brett can better speak to the timing of this.

@domesticmouse
Copy link
Member

At this point I am swamped with unforking flutter web. I think @RedBrogdon is going to have to take point on looking into getting us off of DDC for normal Dart compilation purposes.

@devoncarew
Copy link
Member

Gotcha. Is there an issue to follow on dart-lang/dart-pad?

@domesticmouse
Copy link
Member

@devoncarew there is now =)

@Hixie
Copy link
Contributor

Hixie commented Oct 23, 2019

LGTM in principle, modulo practical short term concerns.

@devoncarew devoncarew added the area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). label Oct 23, 2019
@nshahan
Copy link
Contributor Author

nshahan commented Nov 25, 2019

Closing the loop: Speaking with @RedBrogdon in person we have confirmed the change migrating flutter pad from "DDC" to "DDK" dart-archive/dart-services#467 has been deployed and the tracking issue has been closed dart-lang/dart-pad#1341.

I'll prepare a change that includes the deletion, thanks everyone! 😄

@mit-mit
Copy link
Member

mit-mit commented Dec 10, 2019

@nshahan what is the status of this?

@nshahan
Copy link
Contributor Author

nshahan commented Dec 10, 2019

We pushed it back until D28 but it's underway. I have landed the first change that removes the ability to run the analyzer based DDC and stops running our test suite. https://dart-review.googlesource.com/c/sdk/+/127067/12

I have some other changes in progress that will actually delete the source files.

@mit-mit
Copy link
Member

mit-mit commented Feb 19, 2020

@nshahan may be have an update please?

@nshahan
Copy link
Contributor Author

nshahan commented Feb 21, 2020

Thanks for following up. The code for analyzer based DDC has been deleted.
c561a9e

@nshahan nshahan closed this as completed Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). breaking-change-request This tracks requests for feedback on breaking changes
Projects
None yet
Development

No branches or pull requests

7 participants