squadron_builder
Dart code generator for Squadron workers. Implement your worker service and let squadron_builder bridge the gap with Web Workers and Isolates!
9.3.1
14K downloads/mo
#2522 most downloaded on pub.dev
d-markey/squadron_builder
What this package is like to depend on
Last release 8 days ago
15 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 56 of 59 stable releases
2 versions withdrawn
withdrawn after publishing
4 years old
61 releases · first in 2022
17 releases in the last 12 months
see the full history below
Release timeline
61 releases · Aug 2022 to Aug 2026Releases
latest 60 of 61-
9.3.115 Aug 2026 -
9.3.025 May 2026 -
9.2.009 Apr 2026Release notes
Open source →- Support
analyzerversions >=9.0.0 <13.0.0. - Upgrade
squadronto version >=7.4.3. - Remove generation of elements deleted in Squadron 7.4.3.
- Support
-
9.1.015 Feb 2026 -
9.0.029 Nov 2025 -
9.0.0+130 Nov 2025Nothing published for this version
-
9.0.0+207 Dec 2025Nothing published for this version
-
8.3.017 Nov 2025Release notes
Open source →- When provided in the
SquadronServiceannotation, include the version number as a query parameter to the Worker's URL. See also https://github.com/d-markey/squadron_builder/issues/40.
- When provided in the
-
8.2.015 Nov 2025Release notes
Open source →- Support passing services to other services at construction time, enabling worker cooperation.
-
8.1.006 Nov 2025Release notes
Open source →- Remove the date/time included in generated comments. Fixes https://github.com/d-markey/squadron_builder/issues/41.
-
8.0.020 Sep 2025Release notes
Open source →- Upgrade Dart (^3.7.0) +
source_gen(^4.0.0) /build(^4.0.0) /analyzer(^8.0.0) packages.
- Upgrade Dart (^3.7.0) +
-
8.0.0+122 Sep 2025Release notes
Open source →- Fix doc + formatting issues for https://pub.dev/packages/squadron_builder.
-
7.1.717 Sep 2025Release notes
Open source →- Fix extension lookup in case of cyclical imports/exports -- fixes https://github.com/d-markey/squadron_builder/issues/37.
-
7.1.606 Sep 2025Release notes
Open source →- Fix warnings from pub.dev.
- Fix discovery of marshalers implemented in extensions.
- Explicitly mention extensions used for marshaling.
- Support
toJson/fromJsonoperating onListandStringin addition toMapanddynamic. - EXPERIMENTAL: use marshalers/jsonifiers for classes covered by extensions targeting parent classes of the target class but not the target class itself. A class may be serialized with some extension and deserialized with another extension. Basic assessment is implemented to locate the best implementation (needs to be improved). For instance:
class A {} class B extends A {} extension _MarshalerA on A { List marshal(); // used to marshal A and B static A unmarshal(List payload); // used to unmarshal back to A } extension _UnmarshalerB on B { static B unmarshal(List payload); // used to unmarshal back to B }- EXPERIMENTAL: search inheritance trees for unmarshalers/jsonifiers. The search will also consider
unmarshal/fromJsonmethods and constructors from higher up in the inheritance tree. In this case, the deserialization method/factory must be aware of possible subtypes (serialization may need to include some information to tell one type vs. the other; see examples inexample\inheritance\persons.dart).
-
7.1.501 Sep 2025Release notes
Open source →- PR #35 (courtesy of https://github.com/mkidv): upgrade to
source_gen(^3.0.0) /build(^3.0.1) /analyzer(^7.6.0) packages.
- PR #35 (courtesy of https://github.com/mkidv): upgrade to
-
7.1.5+103 Sep 2025 -
7.1.5+203 Sep 2025 -
7.1.416 Jun 2025Release notes
Open source →- Rename
WorkerAssets.overridetooverride_to avoid confusion withdart:core's top-leveloverrideconstant -- fixes https://github.com/d-markey/squadron_builder/issues/34.
- Rename
-
7.1.315 Jun 2025Release notes
Open source →- Allow
analyzerversion above 7.4.0 and ignore deprecation warnings until https://github.com/dart-lang/source_gen/issues/743 and https://github.com/dart-lang/build/issues/3977 are fixed.
- Allow
-
7.1.210 Jun 2025Release notes
Open source →- Restrict
analyzerversion to forbid versions 7.4.0+ assource_gen/buildare not compatible with the *2analyzerAPIs yet. Cf. https://github.com/dart-lang/source_gen/issues/743 and https://github.com/dart-lang/build/issues/3977.
- Restrict
-
7.1.112 Apr 2025Release notes
Open source →- Serialize primary type values as is.
- Remove item type when serializing a list or set -- fixes https://github.com/d-markey/squadron_builder/issues/30.
-
7.1.026 Mar 2025Release notes
Open source →- Code Generator for Squadron 7.1: stop generating shortcut accessors for stats and concurrency settings.
-
7.0.016 Mar 2025Release notes
Open source →- Code Generator for Squadron 7.0: generate code for serialization contexts + local workers.
-
6.2.017 Jan 2025Release notes
Open source →- Set Dart SDK minimum version to 3.6.0.
- Upgrade dependency versions (source_gen --> 2.0.0, analyzers --> 7.1.0).
- Adapt source code where necessary.
-
6.1.522 Dec 2024 -
6.1.421 Dec 2024 withdrawn -
6.1.321 Dec 2024 withdrawnRelease notes
Open source →- Update version constraints for package
source_gen. - Implement
terminate()in disposable worker/worker pool. - Update examples.
- Update version constraints for package
-
6.1.214 Dec 2024 -
6.1.102 Nov 2024 -
6.1.002 Nov 2024 -
6.0.901 Nov 2024 -
6.0.820 Oct 2024Release notes
Open source →- Don't use marshaller tear-offs when method implementations do not use
dynamic(eg.GenericMarshaler<T>.marshal()could be overridden to return something more specific thandynamic).
- Don't use marshaller tear-offs when method implementations do not use
-
6.0.720 Oct 2024Release notes
Open source →- Don't generate converters for
dynamicorvoid. - Use tear-offs instead of lambdas for marshalers where pivot type is
dynamic. - Add support for generating local workers / local worker clients.
- Don't generate converters for
-
6.0.629 Sep 2024 -
6.0.529 Sep 2024 -
6.0.429 Sep 2024Release notes
Open source →- Update managed type cache asap in
handleDartType()(fixes a stack overflow exception). - Read value of boolean flags in annotations -- fixes https://github.com/d-markey/squadron/issues/44.
- Update managed type cache asap in
-
6.0.328 Sep 2024Release notes
Open source →- Added log messages.
- Implemented a cache for TypeManagers -- credits go to https://github.com/jpohhhh, thanks!
-
6.0.224 Sep 2024 -
6.0.123 Sep 2024Release notes
Open source →- Do not initialize the type manager before a Squadron annotation is effectively found -- fixes https://github.com/d-markey/squadron/issues/40.
-
6.0.022 Sep 2024Release notes
Open source →- squadron_builder for Squadron version >= 6.0. Please note there are no versions 3.x-5.x in order to align squadron_builder version numbers with that of Squadron.
- Removed support for 'useLogger' and 'SerializeWith' annotations.
- Added support for libraries imported with a prefix -- fixes https://github.com/d-markey/squadron_builder/issues/14.
- Added support for record types.
-
2.4.519 Jan 2024Release notes
Open source →- Fix bug for async service method decorated with a marshaler: the service method was called twice if the return value is nullable!
-
2.4.409 Sep 2023 -
2.4.307 Sep 2023Release notes
Open source →- Fix bug when generating code for generic service methods -- type arguments were lost in the process.
- Fix bug when a service method argument has no associated element per Dart's analyzer -- such arguments will always be marshalled as-is.
- These two corrections fix https://github.com/d-markey/squadron/issues/26.
- Added example
json.
-
2.4.223 Aug 2023Release notes
Open source →- Fix bug when service method returns
FutureOr<void>orFuture<void>. - Make the generated operations map unmodifiable.
- PR #7 by guid-empty: Minor changes to support required fields and fix to have Iterable parameters
- PR #8 by techouse: Allow usage of analyzer v6
- Updated examples.
- Added topics and funding information to pubspec.
- Fix bug when service method returns
-
2.4.127 Jun 2023 -
2.4.027 Jun 2023Release notes
Open source →- Reorganized example folder and updated README.
- Revised code generation strategy for operations map: previously, the operations map was generated in a mixin class and the (user-developed) service class had to derive from
WorkerServiceand mix in with the generated mixin class. This is no longer required and the generated code now implements a private service class (deriving from the user's service class) which implementsWorkerServicewith the generated operations map. This removes several constraints on service implementation and enables support of "plain old Dart objects" as Squadron services. User-developped service classes must be public and concrete (non-abstract, non-final, non-sealed...) and must provide an unnamed constructor which will be called by the associated generatedWorkerServiceclass. - Service method/constructor parameters whose type implement
marshal()/unmarshal()ormarshall()/unmarshall()methods will be automatically serialized using these methods if no explicit marshaler is provided.marshal()/unmarshal()have priority overmarshall()/unmarshall(). These methods also have priority over automatic JSON serialization available since version 0.9.0. The marshaling method must be an instance method taking no arguments; the unmarshaling method must be static and accept one argument.squadron_builderwill not verify parameter or return types of these methods, but obviously if the marshaling method of classTreturns typeU, the unmarshaling method must accept aUargument and return an instance ofT. Failure to comply with this contract may lead to Dart compilation errors.
-
2.3.119 Jun 2023Release notes
Open source →- Eliminate async code generation for additional assets.
- Properly resolve Squadron's main library.
-
2.3.011 Jun 2023Release notes
Open source →- Properly handle platform worker thread parameter + getter in generated worker/worker pool when
with_finalizersis enabled (fix for https://github.com/d-markey/squadron_builder/issues/5). - Refactored service/method parameter management.
- Enable code generation for libraries that define several services. This will run as expected on native platforms where worker entrypoints are top-level static methods. It will not work on Web platforms where worker entrypoints are URLs: each worker needs its own URL, hence its own library.
- Properly handle platform worker thread parameter + getter in generated worker/worker pool when
-
2.2.007 Jun 2023Release notes
Open source →- Automatically discover Squadron capabilities (
WorkerRequest/WorkerResponseserialization type + availability ofEntryPointandPlatformWorkerHook). - Retire option
serialization_typeas it is now discovered automatically.
- Automatically discover Squadron capabilities (
-
2.1.217 May 2023Release notes
Open source →- Downgrade version for
analyzer(fix for https://github.com/d-markey/squadron_builder/issues/4).
- Downgrade version for
-
2.1.116 May 2023Release notes
Open source →- Downgrade version for
analyzer(fix for https://github.com/d-markey/squadron_builder/issues/4).
- Downgrade version for
-
2.1.011 May 2023Release notes
Open source →- Enable support of Dart 3.
- Fix issues reported by
pub.devscore. - Add option
serialization_typeto configure the serialization type used for worker request/response (Mapfor Squadron < 5.0.0,Listfor Squadron >= 5.0.0).
-
2.0.006 May 2023Release notes
Open source →- Breaking changes: several renamings, in particular the builder name which is now
squadron_builder:worker_builder. - Generate appropriate code for fields used as parameters in the constructor of the service class. In previous versions, the generated code for constructors did not map parameters with fields, and fields were overriden with getters/setters throwing an
UnimplementedError. Please note that if the field is not final or if its value is mutable, updates will not be propagated to/from the platform worker. This is by design, because the service fields and the worker/pool fields are different instances living in different threads, and threads do not share memory in Dart and browsers. - Support
UseLoggerannotation to generate associated code during worther thread initialization. - Take builder options into account. In previous versions, builder options were ignored. Also upgraded
source_gento 1.3.0 (see pull request https://github.com/dart-lang/source_gen/pull/647 related to builders that produce multiple files). - Added explicit option
with_finalizersto force or disable code generation for finalization, and make finalization actually work. - Split
build.yamlin two to avoid interfering with the build process of client packages. - Reorganized the source code to make it more readable and maintainable.
- Breaking changes: several renamings, in particular the builder name which is now
-
1.0.226 Oct 2022Release notes
Open source →- Upgrade packages.
- Switch from deprecated
element2/enclosingElement3toelement/enclosingElement.
-
1.0.119 Oct 2022 -
1.0.018 Oct 2022 -
0.9.115 Oct 2022 -
0.9.014 Sep 2022Release notes
Open source →- Serialize arguments/return values when
toJson()/fromJson()is available.
- Serialize arguments/return values when
-
0.7.121 Aug 2022Release notes
Open source →- Annotations
SquadronService+SquadronMethod. - Support of cancellation tokens.
- Package upgrade.
- Sample code.
- Annotations
-
0.7.021 Aug 2022Nothing published for this version