Commit graph

40 commits

Author SHA1 Message Date
e9e56e28d3 Declare MainExecutor conformance explicitly for GLibMainExecutor
swift run/build failed on this toolchain (stock swift.org 6.3.3 aarch64 Linux) with:

  GLibMainExecutor.swift:227: error: value of type 'GLibMainExecutor' does
  not conform to specified type 'MainExecutor'

despite the class already implementing every method MainExecutor requires
(enqueue, run, runUntil, stop) via its separate RunLoopExecutor and
SerialExecutor conformances. Root cause: Swift protocol refinement is
one-directional. MainExecutor : RunLoopExecutor, SerialExecutor adds no
requirements of its own, but conforming to the two parent protocols
separately does not implicitly satisfy the refined protocol - the
existential conversion to 'any MainExecutor' needs an explicit conformance
declaration for MainExecutor itself, confirmed with a minimal repro against
the stdlib's private _Concurrency interface.

Fix: add 'extension GLibMainExecutor: MainExecutor {}' (no new members
needed - the class already satisfies every requirement), scoped inside the
existing '#if canImport(Glibc)' block. Kept off Darwin deliberately:
MainExecutor carries a much higher Darwin '@available' floor than this
package targets, and GLibMainExecutor is only ever installed as the process
main executor on Linux (DarwinMainQueuePump is the Apple equivalent) - on
Darwin it is used solely as a plain SerialExecutor for individual actors,
which does not require MainExecutor conformance.

Verified: 'swift build' and 'swift test' both clean (286/286 tests) in this
package standalone, and a full 'swift build' of Luminate against this
checkout via 'swift package edit' succeeds end to end.
2026-08-12 21:45:03 -04:00
e0dd29297a Bridge MainActor to GLib main loop on Darwin without SPI 2026-08-12 02:39:44 -04:00
e52f9c06e8 Raise deployment target to macOS 15 for Synchronization APIs 2026-08-12 02:28:44 -04:00
1ae3a4ed37 Make Clipboard Observable to remove manual subscription plumbing 2026-08-12 00:44:12 -04:00
2a0a15d38f Add a display-scoped Clipboard API 2026-08-12 00:19:16 -04:00
9f1afe9a91 Update main loop scheduling, lifecycle, and reactive teardown 2026-08-11 22:55:55 -04:00
7c651e2064 Add breakpoint modifiers and condition DSL 2026-08-11 18:17:01 -04:00
3919f1fe34 Optimize Portico state and collection updates 2026-08-11 11:27:24 -04:00
af7fa6656d Resolve App dynamic properties before startup 2026-08-10 23:44:42 -04:00
44f95fe0ad Add onChange view modifiers 2026-08-10 23:06:49 -04:00
dcaa660b78 Add Adwaita convenience initializers 2026-08-09 22:27:56 -04:00
3d77903a57 Surface inherited initializer parameters 2026-08-09 19:57:36 -04:00
b1e11a8553 Restore ToolbarView convenience initializers 2026-08-09 19:15:25 -04:00
23d7508763 Expand generated widget initializers 2026-08-09 19:06:48 -04:00
facca97f73 Spread ForEach rows into dynamic containers 2026-08-08 20:22:35 -04:00
6772b805b7 Add dialog, alert, and toast presentation modifiers 2026-08-08 14:48:02 -04:00
30f84b0aee Fix child-adder code generation 2026-08-05 21:55:39 -04:00
e5f483a7a7 All for extra ToolbarView init flexibility 2026-08-05 18:46:54 -04:00
6950051bae Fix ambiguous ToolbarView init 2026-08-05 18:41:47 -04:00
667400ea71 Add ToolbarView extension 2026-08-05 18:38:06 -04:00
f3bcae1f74 Add typed widget references 2026-08-05 17:56:30 -04:00
5e625d6123 Add application shutdown lifecycle hooks 2026-08-04 21:37:16 -04:00
0b3761db4b Add reactive if/else scene branching to SceneBuilder 2026-08-02 18:10:26 -04:00
b398edf3ee Add path-driven NavigationView with NavigationStack semantics 2026-08-02 16:24:43 -04:00
772a3c3a71 Add @Bindable property wrapper 2026-08-01 13:26:42 -04:00
da91b02a6a Port @Environment and @Observable support
Adds SwiftUI-style @Environment property wrapper with key-path and
object-injection flavors, an @Observable bridge that flushes on a GLib
idle source at highIdle priority (ahead of GTK redraw), targeted widget
updates driven by Observation tracking, and two-way observable bindings
that ride the existing bindProperty path.

New library files (4):
- State/ObservationBridge.swift -- coalesced flush bridge
- State/EnvironmentValues.swift -- scope-local key-to-box map
- State/Environment.swift -- @Environment wrapper, DynamicProperty
- Core/View+Environment.swift -- .environment(...) modifiers

Modified library files (8):
- DependencyTracker: import Observation, observing: param, didArmObservation
- EitherView/ForEach: opt container trackers out of Observation
- NodeRegistry: isEmpty for retention check
- PropertyBinding: hasDependencies || didArmObservation gate
- Binding: readOnly init, observable key-path init
- MountContext: environment field, withEnvironment, inheritance
- AnyView: _resolveDynamicProperties hook before user body eval

New tests (21 across 3 files):
- EnvironmentTests (7): scoping, nesting, projections, ForEach, lazy branches, reuse
- ObservableTests (11): acceptance case, write-back, coalescing, teardown,
  binding echo, re-arm de-dupe, retention, flush ordering
- StateTests (+3): Observation arming unit tests

Example: EnvironmentDemoPage demonstrates the feature end to end.
2026-07-30 16:53:10 -04:00
058945af03 Add GLibMainExecutor and async .task modifier 2026-07-29 23:55:09 -04:00
a12a9198dc Add GLib main-loop Idle/Timeout sources and view lifecycle modifiers 2026-07-29 01:24:49 -04:00
4f31f74a7d Add Adwaita style class view modifiers 2026-07-28 23:37:03 -04:00
c35d039634 Add InterpolatedText for reactive string interpolation inits and modifiers 2026-07-28 22:33:05 -04:00
519f7b4384 Make Binding modifiers two-way for readable properties 2026-07-26 23:11:53 -04:00
14d8160889 Implement DocC generation 2026-07-26 19:18:45 -04:00
3130fb1471 Migrate to generated wrappers 2026-07-26 18:28:50 -04:00
9a2e167661 Initial Adwaita widget wrappers (except actually include the files this time) 2026-07-24 02:21:56 -04:00
4c7054e31f Initial Adwaita widget wrappers 2026-07-24 02:20:00 -04:00
4594728770 Implement collections and teardown 2026-07-24 00:07:02 -04:00
fd2cae3808 Complete native drop-in 2026-07-23 23:29:52 -04:00
d177a85236 Conditionals: EitherView and OptionalView with reactive branch visibility 2026-07-23 22:35:34 -04:00
c309fc3d1a State module with reactive label bindings and tracked closures
Add @State, StateBox, Binding, DependencyTracker, and
SubscriptionToken for targeted reactive updates.

Label gains two reactive overloads: Label(Binding<String>)
for the explicit-binding path and Label(() -> String) for
tracked closures. Both update the Gtk.Label text in-place
without re-mounting.

Regression tests verify label updates survive when the
Swift wrapper is deallocated after the GObject is attached
to the widget tree (GTK does not retain wrappers).

Includes 28 new tests across ReactiveLabelTests and
StateTests suites.
2026-07-23 21:06:09 -04:00
145d0a710d Foundation implementation 2026-07-23 19:36:28 -04:00