Skip to content

Repro dnix packages - #1505

Merged
julian-CStack merged 17 commits into
stagingfrom
repro-dnix-packages
Nov 13, 2026
Merged

julian-CStack merged 17 commits into
stagingfrom
repro-dnix-packages

Conversation

@julian-CStack

Copy link
Copy Markdown
Collaborator

No description provided.

slopbot9k added 2 commits November 9, 2026 10:01
Pin the merged Frost, Tor, Epic and MWC packages. Configure verified source builds by default and verified prebuilts with -d, including before asset generators can execute hooks.

Handle native Windows secp256k1 builds, raise the macOS deployment target to 12, keep CI on prebuilts, remove obsolete Rust setup, and refresh build requirements. Add app/mode and host dispatch regression coverage.

Validation: 39 script tests and 8 Apple Silicon native consumer smoke tests passed; all three app dependency sets resolve; generated adapters and the new tests analyze cleanly; workflow lint, formatting and shell syntax checks pass. Full app and Windows/WSL builds were not run locally.
Document xcodes and Apple download installation alongside existing Xcode versions, using DEVELOPER_DIR for builds without changing the system default.

Launch installation in a separate Terminal session with a clean environment. Download using xcodes --no-superuser, then invoke only the selected xcodebuild via sudo -k so sudo reads the administrator password and does not cache authorization. Never run build commands from the installer.

Validation: 10 fixture tests passed, including environment isolation, shell/AppleScript quoting, reuse and failure paths. Dart analysis, formatting, shell syntax and workflow lint pass. No real Xcode installation or privileged setup was run.
@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.11%. Comparing base (4b88ce9) to head (207ac93).
⚠️ Report is 1 commits behind head on staging.

Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1505      +/-   ##
===========================================
+ Coverage    16.08%   16.11%   +0.02%     
===========================================
  Files         1145     1145              
  Lines       114390   114390              
===========================================
+ Hits         18401    18429      +28     
+ Misses       95989    95961      -28     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

slopbot9k added 4 commits November 10, 2026 10:18
Keep Rustup for DNSSEC in every app and CI job. Check prerequisites before replacing configuration, persist WSL selection through an environment default or -w, and correct the docs about executable hook closures and DEVELOPER_DIR.

Build Windows secp256k1 independently of dnix mode using one pinned v0.5.0 source for MSVC and MinGW. Discover VS CMake and SDK tools, stop on failed commands, and reuse only matching local build receipts. Fix PowerShell prebuild paths, malformed stubs and write failures.

Select the Xcode 27.0 release build, support xcodes outside Homebrew, launch a shell-portable installer in one Terminal session, and keep results visible. Detect dnix's separate beta-selection limitation without changing global Xcode settings. Inject native tools into tests instead of rewriting privileged command strings.

Validation: 92 targeted Dart tests and 4 PowerShell regression cases passed; Dart analysis/formatting, Bash syntax, workflow lint and diff checks passed. No full native Windows app build or privileged Xcode installation ran. Package-level xcodeBuild pins remain a documented upstream follow-up.
Preserve Windows build results when cleanup fails, remove unused Docker Rust toolchain layers, and reject package-local dnix mode overrides on the actual Flutter host. Read Xcode requirements from pinned dependency metadata with revision-specific compatibility for packages missing build pins. Share WSL validation, check dependency contracts, simplify hook settings, and update setup guidance.

Validation: Dart analysis and formatting, Bash syntax, actionlint, and git diff --check. Final changes were validated statically only; new regression tests and native Windows/Build workflow execution remain pending. Upstream Xcode build-number pins are still needed.
Exclude uppercase /C and mklink /D from MSYS argument conversion per command, preserving existing user exclusions. Apply the same fix to Windows CI asset cleanup. Keep native path conversion and failure handling in place.

Validation: Bash syntax, actionlint, whitespace checks, and independent static review. Native Windows execution remains unverified; no changes to dnix lock handling.
@parasew

parasew commented Nov 12, 2026

Copy link
Copy Markdown

Compatibility check from my side while drafting #1482:

I did not merge your draft into #1482; it stays independent until this PR is ready. No action needed from you right now — just flagging the overlap.

slopbot9k added 3 commits November 12, 2026 07:11
The xcodesorg/made tap no longer installs on macOS 27: Homebrew 7 cannot match its mojave bottle tags, and its source build fails with the Swift 6.4 toolchain. The homebrew-core formula ships a macOS 27 bottle.

Validation: xcode_setup_test.dart passes. brew install xcodes was not run on a real machine.
Select Isar's Rust toolchain explicitly, filter Xcode metadata by app, and preserve Windows Dart PATH precedence. Remove secp receipt caching and update focused tests and docs.

Validation: Dart analysis, formatting, shell syntax, and git diff --check passed. Regression tests and native builds were not executed.
@parasew

parasew commented Nov 12, 2026

Copy link
Copy Markdown

Build-compatibility update: I test-merged repro-dnix-packages (a3ba099) into the #1482 branch in a throw-away worktree.

  • Only conflict: docs/building.md.
  • make build-macos VERSION=0.0.0 BUILD_NUM=1 succeeded: Stack Wallet.app, 320.0 MB, bundle ID com.cypherstack.stack_wallet.
  • First attempt hit a stale dnix entry in .dart_tool/package_graph.json; a second flutter pub get fixed it and the build completed. Not a compiler/code failure.
  • make verify-bom still needs dart tool/verify_bom.dart --update after your pin changes.
  • A real merge will need the build: Makefile wrappers for macOS/Linux/Windows/Android/iOS, Nix bootstrap, BOM checks and docs #1482 “Building with make” docs section folded into your rewritten guide.

The throw-away merge was removed; #1482 is untouched.

slopbot9k and others added 8 commits November 12, 2026 16:36
Native Windows Flutter always builds the app, and Git Bash is already the documented route and the one CI uses. Remove the legacy WSL-shell configuration route: build_app.sh and the preflight reject Windows configuration from other hosts, the override guard no longer dispatches to PowerShell and takes only the app, and the preflight no longer probes Windows Rustup through cmd.exe. Build secp256k1 with MSVC only, removing its WSL wrapper and the orphaned MinGW deps script. Call cygpath, flutter and dart directly in the asset scripts. Build mwebd.exe from source only on Windows (fetching still works anywhere) and drop MinGW from the CI image. dnix and the MWEB helper still use WSL2 as their Windows build backend.

Validation: build_input, native_build_config, configure_native_assets, build_environment, windows_secp_build and xcode_setup tests pass on macOS; native_dependency_contract fails only its app-package metadata test, as on the parent commit. Dart analysis with the repo lints, formatting, Bash syntax, and git diff --check passed. Nothing was run on Windows, and the Windows release workflow has not run.
Reject iOS and macOS targets on non-macOS hosts before the prebuilt early return, so -d can no longer start configuring Apple builds on Linux or Windows. Reject an empty -w instead of letting it silently replace DNIX_WSL_DISTRIBUTION with the WSL default; the Dart validator already refuses empty names. List Go and mingw-w64 in the default WSL distribution among the Windows prerequisites for Stack Wallet's MWEB build. Compare the secp test's checkout directory with platform-aware paths so the test passes on native Windows.

Validation: build_input, native_build_config, configure_native_assets, build_environment, windows_secp_build and xcode_setup tests pass on macOS; native_dependency_contract fails only its app-package metadata test, which needs the app's flutter pub get. The new tests fail when the Apple host rule or the -w check is removed. Dart analysis with the repo lints, formatting, Bash syntax, and git diff --check passed. Nothing was run on Windows.
Delete scripts/windows/build_secp256k1.bat, which nothing calls now that Windows configuration runs from Git Bash. Drop the pushd/popd around the secp256k1 helper in build_app.sh: the helper locates the project from its own path and gives its commands explicit working directories, so the configuration test now checks only where the DLL lands. Keep only the Windows SDK version the helper passes to CMake, dropping the unused SDK root.

Validation: build_input, native_build_config, configure_native_assets, build_environment, windows_secp_build and xcode_setup tests pass on macOS; native_dependency_contract fails only its app-package metadata test, which needs the app's flutter pub get. Dart analysis with the repo lints reports only an existing info lint; formatting, Bash syntax, and git diff --check passed. Nothing was run on Windows.
Stop documenting -s, which only CI uses, and explain it next to the CI steps that need it. Document that -d ignores native edits in a locked local checkout, that source mode on a Mac needs Xcode 27.0 for every target, the manual Xcode name the setup helper uses, and Android release signing. Load the pinned Xcode metadata only on an Apple Silicon Mac, where it is used, and advise checking the network connection when the download fails. Check for Go and MinGW in the default WSL distribution before configuring Stack Wallet for Windows, unless MWEBD_FETCH=1 or CI applies. Run flutter pub get on Linux before the second override check. Read vswhere output as UTF-8. Make the Xcode ordering tests fail when the ordering logic breaks, and correct a misleading CI comment about symlink permissions.

Validation: build_input, native_build_config, configure_native_assets, build_environment, windows_secp_build and xcode_setup tests pass on macOS; native_dependency_contract fails only its app-package metadata test, which needs the app's flutter pub get. The new tests fail when the sort, the setup helper's conflict check, the MWEB check, the Apple Silicon condition, -utf8 or the Linux pub get is removed. Dart analysis with the repo lints reports only an existing info lint; formatting, Bash syntax, workflow YAML and git diff --check passed. The preflight passes on an Apple Silicon Mac for Android prebuilt and iOS source. Nothing was run on Windows or on a Linux host.
flutter_mwebd's hook builds Stack Wallet's MWEB library with the host's Go for Android, iOS, Linux and macOS during flutter build, run and test, but the preflight only checked the Windows route. Require Go 1.24.1 or newer on the Flutter host for those targets in both modes, matching the go.mod of the mwebd-wrapper commit that flutter_mwebd 0.0.1-pre.12 builds. The Windows WSL check now also requires Go 1.24.0 or newer, from mwebd v0.1.19's go.mod, so an old Go there fails before configuration changes files instead of partway through. Document both minimums.

Validation: build_input, native_build_config, configure_native_assets, build_environment, windows_secp_build and xcode_setup tests pass on macOS; native_dependency_contract fails only its app-package metadata test, which needs the app's flutter pub get. The new tests fail when the host Go check, the version comparison or the WSL version check is removed. Dart analysis with the repo lints, formatting and git diff --check passed. On an Apple Silicon Mac with Go 1.27.3 the preflight passes, and with a fake Go 1.22.2 first on PATH it reports the old version. Nothing was run on Windows or on a Linux host.
docs/building.md now covers how a build works, source builds and prebuilts, the configuration options and troubleshooting, and links to a step-by-step guide for each host: docs/building/linux.md, docs/building/macos.md and docs/building/windows.md. Native library details (pinning and verification, local overrides and checkouts, when native hooks run, Xcode pins and CI images) move to docs/building/native-libraries.md, and test instructions to docs/building/testing.md. The macOS guide now says that only dnix's source builds of its four packages need Xcode 27.0 (27A266a), installed under /Applications without being selected; the app builds with your usual Xcode, and building the whole app with 27.0 is optional.

Validation: a script checked that every relative link and heading anchor in the six files resolves under GitHub's heading slugs, and that all 17 code blocks and 14 URLs from the old docs/building.md are still present; git diff --check passed. Apart from a prebuilt macOS configuration on an Apple Silicon Mac, the documented commands were not rerun for this change.
@julian-CStack
julian-CStack marked this pull request as ready for review November 13, 2026 20:28
@julian-CStack
julian-CStack merged commit 9c89083 into staging Nov 13, 2026
5 checks passed
@julian-CStack
julian-CStack deleted the repro-dnix-packages branch November 13, 2026 20:55
parasew added a commit to parasew/stack_wallet that referenced this pull request Nov 14, 2026
parasew added a commit to parasew/stack_wallet that referenced this pull request Nov 18, 2026
…used secp copy

- bootstrap-macos invoked $(MAKE) bootstrap-xcode; a recipe line containing
  $(MAKE) is executed even under `make -n`, so a dry run accepted the Xcode
  license and ran first-launch setup for real (observed: sudo prompt and
  exit 2 under make -n). Call scripts/install_xcode.sh directly instead --
  exactly what the bootstrap-xcode target runs.
- verify-bom with no dart on PATH expanded $(DART) to empty and /bin/sh
  tried to execute tool/verify_bom.dart as a command ("Permission denied",
  exit 126). Guard it the same way check-reqs guards Flutter/Dart.
- scripts/linux/build_secp256k1.sh copied the library to
  build/linux/x64/release/secp256k1/lib ("Location expected by
  Flutter/CMake install step"). No consumer exists in this tree or in cypherstack#1505
  (coinlib_flutter, pinned f0e12dac, builds its own secp256k1 via CMake
  ExternalProject into its own CMAKE_BINARY_DIR), and the path hardcoded x64
  instead of deriving the arch. Drop it; keep the legacy
  build/libsecp256k1.so copy consumed by coinlib:build_linux and
  test/utilities/electrum_seed_utils_test.dart.
parasew added a commit to parasew/stack_wallet that referenced this pull request Nov 18, 2026
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.

2 participants