refactor(dart): deduplicate what PR #78 left over - #83
Open
nikzen wants to merge 6 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:source.nixinstantiation existed twice — once in the option declaration, once for the flake's packages. A sharedmkSourcehelper means the two cannot drift apart.static-web-serverfeature-reduction override depends only onpkgs, so it now lives in the outerletinstead of being restated per project and per call.dart-web-assets<suffix>was written out four times acrossassets.nixand the build workflow. It is now a derived read-only option besideworkflowId, for the same reason that one exists.if flutter then "flutter" else "dart"was decided independently in the checks workflow and the pre-commit setup. It is now a derived read-onlyclioption, so every step makes the same choice.mkBindingshelper instead of two call sites, the licence lives on the shared source spec instead of being restated by both targets,frbVersionmoved into theenvblock, and the devshell no longer lists the library — the store pathruntime.envinterpolates already makes the shell depend on it, which was verified by instantiating the fixture's devshell and checking its closure still holdsfamedly-vodozemac.Verification
nix build .#checks.<system>.dart-standardsproduces a store path byte-identical to the one built frommain(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.drvafter dropping the explicit devshell entry.treefmtreports no changes; all pre-commit hooks passed on commit.dart-vodozemac 0.5.0 → 0.7.1 (
222d84c): the new release pinsflutter_rust_bridge2.12.0, whosebuild_web/executor.dartis byte-identical to 2.11.1's, so the wasm-pack flags stand;wasm-bindgenstays 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 thefrbVersionguard.