Skip to content

Release 0.8.6

Latest

Choose a tag to compare

@idexus idexus released this 19 Nov 11:08
Immutable release. Only release title and notes can be modified.
40e1edc

StateUI 0.8.6 names a build's host by a package trait, so each head is a package of its own and Xcode, SourceKit-LSP and SwiftPM see the host as declared. An application is now a folder holding its stateui.json, which says what it is on every platform. The stateui tool lets one machine work every host: a Mac runs its GTK and WinUI heads in Parallels guests, and any machine works another through the tool's service. Every change, with its new spelling, is in the changelog.

Breaking changes

  • A build names its host by a package trait, and each head is a package of its own. STATEUI_HOST is gone. Platforms/<Host> has its own Package.swift, which builds the application with its host's trait and depends on lib/StateUI.Head with the same trait. The application's own package declares a trait per host and defines each host's condition (#if APPKIT, …) from it; nothing is read from an environment. WebAssembly takes the static products StateUIStatic and StateUIHostStatic.
  • An application is a folder holding its stateui.json, with its identifier, name, version and build; neither the tool nor the VS Code extension takes a folder without one. Apple bundles take CFBundleIdentifier, CFBundleShortVersionString, CFBundleVersion, CFBundleDisplayName and CFBundleName from it, and an application's own Info.plist may no longer say them. An Android head takes its applicationId, versionName, versionCode and label from it.
  • WinUI, GTK and the Web read what the application is from its stateui.json, and app.info tells its name, identifier, version and build there too. GTKHost.run(applicationID:) is GTKHost.run() and WebHost.run(name:applicationID:) is WebHost.run(). The browser keeps an application's values under its identifier, so values a page kept under its name are not read again.
  • A workspace's file is stateui-workspace.json, and what was chosen stands out of git. The application to start lives in .stateui/workspace-settings.json, and each application's host and devices in its .stateui/settings.json. stateui settings shows and changes both, and a workspace file still saying startup is refused.
  • stateui project library changes the StateUI a project builds with, in one application or in a whole workspace. stateui workspace library and workspace/useLibrary are gone; the protocol's call is project/useLibrary.

New

  • Every host from one Mac. stateui devices --host gtk|winui lists the Mac's Parallels guests. With --device <guest>, stateui build, run, package and repo test --suite host:gtk|winui copy the project into the guest and have the guest's own stateui do the work; a package lands in the Mac's artifacts, and Ctrl+C on the Mac stops the application in the guest. stateui guest prepare lays the guest's tool, stateui guest pair its service, and stateui doctor --device <guest> checks the way there. Handbook: Every host from one Mac.
  • Working on another machine. stateui service --listen <address:port> serves the tool's protocol over TCP to paired clients alone. Pairing takes a code, and every connection then proves its token by an HMAC-SHA256 challenge without ever sending the token. stateui remote add, declare, list, probe and remove pair a project with machines, which a workspace's manifest may declare for everyone. A paired machine's hosts, devices and browsers are destinations: builds, runs, packages, host suites, conformance runs and the portable and native plans run there, the checkout copied through the connection itself. stateui service install starts the service with the user's session on macOS, Linux and Windows. Handbook: Working on another machine.
  • A debugger on every host, through the tool. The tool says how a debugger reaches every application it readies, and the VS Code extension maps that to lldb-dap or to its JavaScript debugger. A GTK or WinUI head on another machine is debugged through the service's relay to a port of this machine's loopback, so no debugger port listens on the network. A Web page is debugged with LLDB in Safari 27, which shows Swift's lines and call stack, or in Chromium's browsers with the WebAssembly DWARF Debugging extension. stateui run --host gtk --gdb runs a GTK head under gdb, here or in a guest.
  • The tool decides, and every client shows it. server/info names the hosts this machine builds and where each one's heads run. devices/list says which destinations a debugger reaches and which architectures each runs emulated. The VS Code extension reads all of it from the tool and keeps no table of its own.
  • Smaller additions. stateui new --platforms appkit,web,winui makes an application with those heads alone. stateui run hands an application on a simulator, a device, Android or a page every STATEUI_ variable of its environment. The operation journal keeps the newest 50 operations.

Fixed

  • The tool:
    • A checkout path changed to one that begins as the old one did is written once in a manifest.
    • repo test --plan native --device gives the device to its own host's suite alone.
    • A failed operation's compiler error reaches the editor.
    • A launch that simctl refuses says what simctl said.
    • A build gives SwiftPM five minutes to say where it laid the products, so a host's suite no longer fails without a word.
    • stateui doctor no longer asks for Python 3 for the Web.
  • VS Code:
    • Run Without Debugging runs the Debug build with no debugger on every host.
    • Folders opened at once share one connection to the tool.
    • No language server's configuration is written while the index's lease is unanswered.
  • Web:
    • A debug build keeps the DWARF the browser's debugger reads.
    • A bar button whose look follows the pointer takes its click in Safari.
  • WinUI: the host and the web view's backend build with Visual Studio 18.12, whose MSVC 14.52 refused the toolchain's Clang 21.
  • GTK:
    • A page replaced while the focus stood in it is let go.
    • On Wayland, a field that takes the keyboard and goes at once no longer ends the process.

Moving over

  • Move each head into a package of its own, Platforms/<Host>/Package.swift, and declare the host traits in the application's manifest, as apps/HelloWorld does. Drop STATEUI_HOST; a head's files need no condition.
  • Add a stateui.json beside each application's Package.swift, for example { "build": 1, "identifier": "com.example.notes", "schemaVersion": 1, "version": "1.0.0" }. Take the bundle's identifier, versions and names out of an Info.plist. Have Platforms/Android/build.gradle.kts and AndroidManifest.xml read the file, as the changelog shows.
  • Call GTKHost.run() and WebHost.run() with no arguments.
  • Rename a workspace's stateui.json to stateui-workspace.json, and move its startup out with stateui settings --startup <application>.
  • Use stateui project library where you used stateui workspace library.
  • An application with a WinUI relay of its own defines _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH in that target's cxxSettings.
  • Rebuild the tool as the README's Quick start shows, reinstall the VS Code extension with stateui repo integration install --editor vscode, and raise StateUI to 0.8.6.