Skip to content

[webdev] Update canary default setting in Configuration - #2870

Open
nshahan wants to merge 5 commits into
mainfrom
fix-canary-flag
Open

nshahan wants to merge 5 commits into
mainfrom
fix-canary-flag

Conversation

@nshahan

@nshahan nshahan commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The canaryFeatures flag now defaults to true to match the expected value for the moduleFormat default.

New coercions based on the expected intent when setting other flags:

  • Passing --web-hot-reload coerces canary mode to true.
  • Setting 'amd' module format coerces canary mode to false.

The existing tests were passing because they always set the module format and canary flags explicitly.
The actual usage in VSCode saw the canaryFeatures flag default value in some code paths leading to
inconsistent settings.

Fixes: #2869

Now default to `true`.

New coercions:
* Passing `--web-hot-reload` coerces canary mode to `true`.
* Setting 'amd' module format coerces canary mode to `false`.
@github-actions

Copy link
Copy Markdown

Package publishing

If you have publishing permissions, you can use the links below to publish the changes after merging this PR.

Package Version Status Publish tag (post-merge)
package:webdev 4.0.3 ready to publish webdev-v4.0.3
  • 1 already published.
  • 1 WIP (no publish necessary).

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@nshahan nshahan changed the title [webdev] Update canary setting in Configuration [webdev] Update canary default setting in Configuration Sep 14, 2026
@nshahan
nshahan requested a review from Markzipan September 14, 2026 17:47
);
});

// TODO(nshahan): Remove when DDC no longer requires canary + ddc modules for

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we link to the tracking bug for this in github?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@Markzipan Markzipan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach looks good! We should add a cleanup item for when canary needs to be 'reset'. Its semantics have unfortunately drifted between webdev (just canary) and build_runner (synonymous with hot reload).

@nshahan
nshahan marked this pull request as ready for review September 16, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expression eval fails with "Error: Module dart_sdk not loaded in the browser."

2 participants