From 89b0b2f00515a789a9f830452074346460ceae0f Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 2 Oct 2024 19:42:13 +0000 Subject: [PATCH 1/8] add the breaking API change health check --- .github/workflows/health.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml index 177cef9d7..286e8378e 100644 --- a/.github/workflows/health.yaml +++ b/.github/workflows/health.yaml @@ -8,7 +8,7 @@ jobs: health: uses: dart-lang/ecosystem/.github/workflows/health.yaml@main with: - checks: "version,changelog,do-not-submit" + checks: "version,changelog,do-not-submit,breaking" ignore_license: "**.g.dart" sdk: dev permissions: From df9a0f2979300de6d9c2573ae24d0f1069124b61 Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 2 Oct 2024 19:45:42 +0000 Subject: [PATCH 2/8] simulate a breaking change --- build_web_compilers/lib/builders.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_web_compilers/lib/builders.dart b/build_web_compilers/lib/builders.dart index efd5d7934..8c3bcae85 100644 --- a/build_web_compilers/lib/builders.dart +++ b/build_web_compilers/lib/builders.dart @@ -12,7 +12,7 @@ import 'src/sdk_js_compile_builder.dart'; import 'src/sdk_js_copy_builder.dart'; // Shared entrypoint builder -Builder webEntrypointBuilder(BuilderOptions options) => +WebEntrypointBuilder webEntrypointBuilder(BuilderOptions options) => WebEntrypointBuilder.fromOptions(options); // Ddc related builders From 01e02c984d7922c071b10c84c4fcec37f57c4020 Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 2 Oct 2024 19:47:25 +0000 Subject: [PATCH 3/8] simulate breaking change in non-published package --- _test/lib/app.dart | 4 ++-- _test/test/hello_world_deferred_test.dart | 2 +- _test/test/hello_world_test.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_test/lib/app.dart b/_test/lib/app.dart index 361b954ac..95079c455 100644 --- a/_test/lib/app.dart +++ b/_test/lib/app.dart @@ -4,8 +4,8 @@ import 'package:web/web.dart'; -void startApp({String? text}) { - text ??= 'Hello World!'; +void startApp({required String text}) { + // text ??= 'Hello World!'; var component = HTMLDivElement()..text = text; document.body!.append(component); } diff --git a/_test/test/hello_world_deferred_test.dart b/_test/test/hello_world_deferred_test.dart index ac61f9952..90515fa81 100644 --- a/_test/test/hello_world_deferred_test.dart +++ b/_test/test/hello_world_deferred_test.dart @@ -14,7 +14,7 @@ import 'package:web/web.dart'; import 'common/message.dart' deferred as m; void main() { - setUp(startApp); + setUp(() => startApp(text: 'Hello World!')); tearDown(() { document.body!.innerHTML = ''.toJS; diff --git a/_test/test/hello_world_test.dart b/_test/test/hello_world_test.dart index 8023208ed..31c89d726 100644 --- a/_test/test/hello_world_test.dart +++ b/_test/test/hello_world_test.dart @@ -16,7 +16,7 @@ import 'package:web/web.dart'; import 'common/message.dart'; void main() { - setUp(startApp); + setUp(() => startApp(text: 'Hello World!')); tearDown(() { document.body!.innerHTML = ''.toJS; From 7002d2dd397258182424a25b46569d11c2c9c020 Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 2 Oct 2024 19:50:34 +0000 Subject: [PATCH 4/8] actually make breaking change in published package --- build_web_compilers/lib/builders.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_web_compilers/lib/builders.dart b/build_web_compilers/lib/builders.dart index 8c3bcae85..c530eb260 100644 --- a/build_web_compilers/lib/builders.dart +++ b/build_web_compilers/lib/builders.dart @@ -12,7 +12,7 @@ import 'src/sdk_js_compile_builder.dart'; import 'src/sdk_js_copy_builder.dart'; // Shared entrypoint builder -WebEntrypointBuilder webEntrypointBuilder(BuilderOptions options) => +Object webEntrypointBuilder(BuilderOptions options) => WebEntrypointBuilder.fromOptions(options); // Ddc related builders From 52b7168a1a985d595e1f14b44f0eb5383c3ca367 Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 2 Oct 2024 19:58:03 +0000 Subject: [PATCH 5/8] fail on breaking changes --- .github/workflows/health.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml index 286e8378e..536f2c964 100644 --- a/.github/workflows/health.yaml +++ b/.github/workflows/health.yaml @@ -9,6 +9,7 @@ jobs: uses: dart-lang/ecosystem/.github/workflows/health.yaml@main with: checks: "version,changelog,do-not-submit,breaking" + fail_on: "version,changelog,do-not-submit,breaking" ignore_license: "**.g.dart" sdk: dev permissions: From a7cd50361e0aed45d7cd95b7d98b826370dea690 Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 2 Oct 2024 20:00:13 +0000 Subject: [PATCH 6/8] override warn_on also --- .github/workflows/health.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml index 536f2c964..9d5525c96 100644 --- a/.github/workflows/health.yaml +++ b/.github/workflows/health.yaml @@ -10,6 +10,7 @@ jobs: with: checks: "version,changelog,do-not-submit,breaking" fail_on: "version,changelog,do-not-submit,breaking" + warn_on: "" ignore_license: "**.g.dart" sdk: dev permissions: From ebfec794daccca4584f87554535f12691e795bcc Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 2 Oct 2024 20:05:44 +0000 Subject: [PATCH 7/8] specify the warn_on jobs explicitly instead of empty string --- .github/workflows/health.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml index 9d5525c96..879fb726d 100644 --- a/.github/workflows/health.yaml +++ b/.github/workflows/health.yaml @@ -10,7 +10,7 @@ jobs: with: checks: "version,changelog,do-not-submit,breaking" fail_on: "version,changelog,do-not-submit,breaking" - warn_on: "" + warn_on: "license,coverage,leaking" ignore_license: "**.g.dart" sdk: dev permissions: From 499a1ebfa0780a54015e457da6f0e6c55e01f1cd Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 2 Oct 2024 20:08:15 +0000 Subject: [PATCH 8/8] simulate releasing breaking change as non-breaking --- build_web_compilers/CHANGELOG.md | 2 ++ build_web_compilers/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build_web_compilers/CHANGELOG.md b/build_web_compilers/CHANGELOG.md index f402849ca..99334dccd 100644 --- a/build_web_compilers/CHANGELOG.md +++ b/build_web_compilers/CHANGELOG.md @@ -1,3 +1,5 @@ +## 4.2.0 + ## 4.1.0-beta.1 - Fix loading compiled modules from subdirectories. diff --git a/build_web_compilers/pubspec.yaml b/build_web_compilers/pubspec.yaml index 463b44383..e900e7683 100644 --- a/build_web_compilers/pubspec.yaml +++ b/build_web_compilers/pubspec.yaml @@ -1,5 +1,5 @@ name: build_web_compilers -version: 4.1.0-beta.1 +version: 4.2.0 description: Builder implementations wrapping the dart2js and DDC compilers. repository: https://github.com/dart-lang/build/tree/master/build_web_compilers # This package can't be part of the workspace because it requires a very recent