Skip to content

refactor(dart): deduplicate what PR #78 left over - #83

Open
nikzen wants to merge 6 commits into
mainfrom
refactor/dart-native-nix
Open

refactor(dart): deduplicate what PR #78 left over#83
nikzen wants to merge 6 commits into
mainfrom
refactor/dart-native-nix

Conversation

@nikzen

@nikzen nikzen commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #78, which already resolved the bulk of a code review of nix/dart/ (shared OCI publishing, managed-file headers, fixture tests). This picks up the findings that remained, each as its own commit:

  • vodozemac: the source.nix instantiation existed twice — once in the option declaration, once for the flake's packages. A shared mkSource helper means the two cannot drift apart.
  • web image: the static-web-server feature-reduction override depends only on pkgs, so it now lives in the outer let instead of being restated per project and per call.
  • web assets: the package name dart-web-assets<suffix> was written out four times across assets.nix and the build workflow. It is now a derived read-only option beside workflowId, for the same reason that one exists.
  • project CLI: if flutter then "flutter" else "dart" was decided independently in the checks workflow and the pre-commit setup. It is now a derived read-only cli option, so every step makes the same choice.
  • vodozemac module tidy-up (from a detailed follow-up review): the native bindings are instantiated through one mkBindings helper instead of two call sites, the licence lives on the shared source spec instead of being restated by both targets, frbVersion moved into the env block, and the devshell no longer lists the library — the store path runtime.env interpolates already makes the shell depend on it, which was verified by instantiating the fixture's devshell and checking its closure still holds famedly-vodozemac.

Verification

  • nix build .#checks.<system>.dart-standards produces a store path byte-identical to the one built from main (7q6zfhikb987d2h1kjr1am9kmw91ibn6) — the refactor changes no generated output.

  • dart-standards-workflows (actionlint + shellcheck) passes.

  • The fixture devshell's derivation closure still contains famedly-vodozemac-0.5.0.drv after dropping the explicit devshell entry.

  • treefmt reports no changes; all pre-commit hooks passed on commit.

  • dart-vodozemac 0.5.0 → 0.7.1 (222d84c): the new release pins flutter_rust_bridge 2.12.0, whose build_web/executor.dart is byte-identical to 2.11.1's, so the wasm-pack flags stand; wasm-bindgen stays at 0.2.100, so the CLI pin does too. Both the native library and the WebAssembly module were built locally from the new release to verify the hashes and the frbVersion guard.

nikzen added 6 commits August 27, 2026 09:55
The native bindings are instantiated through one helper instead of two
call sites, the licence lives on the shared source spec instead of being
restated by both targets, and the devshell no longer lists the library:
the store path runtime.env interpolates already makes the shell depend
on it.
The release pins flutter_rust_bridge 2.12.0, whose build_web/executor.dart
is byte-identical to 2.11.1's, so the wasm-pack flags stand as they are.
wasm-bindgen stays at 0.2.100, so the CLI pin does too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant