Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/VerifyChanges.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ on:
branches: ["main"]

env:
XCODE_VERSION: 26.3
XCODE_VERSION: 27.2

jobs:
lint:
name: Lint
runs-on: macos-26
runs-on: xcode-27
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Select Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app
- name: Lint
run: Scripts/lint
run: Tools/lint

build-and-test:
name: Build and Test (${{ matrix.platform }})
needs: lint
runs-on: macos-26
runs-on: xcode-27
strategy:
fail-fast: false
matrix:
include:
- platform: iOS
xcode_destination: "platform=iOS Simulator,name=iPhone 17 Pro"
xcode_destination: "platform=iOS Simulator,OS=27.2,name=iPhone 18 Pro"
- platform: macOS
xcode_destination: "platform=macOS,arch=arm64"
- platform: tvOS
xcode_destination: "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)"
xcode_destination: "platform=tvOS Simulator,OS=27.2,name=Apple TV 4K (4th generation)"
- platform: watchOS
xcode_destination: "platform=watchOS Simulator,name=Apple Watch Series 11 (46mm)"
xcode_destination: "platform=watchOS Simulator,OS=27.2,name=Apple Watch Series 12 (46mm)"

env:
DEV_BUILDS: DevBuilds/Sources
Expand Down Expand Up @@ -97,8 +97,12 @@ jobs:
path: ${{ env.XCODE_TEST_PRODUCTS_PATH }}
key: ${{ steps.cache-xctestproducts-restore.outputs.cache-primary-key }}

# Optional until Xcode records coverage for Swift packages again. With Xcode 27.2, result
# bundles have no coverage for package targets, so xccov can’t report it.
- name: Log Code Coverage
id: coverage
if: github.event_name != 'push'
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -124,7 +128,7 @@ jobs:
include-hidden-files: true

- name: Upload xccovPretty output
if: github.event_name != 'push'
if: github.event_name != 'push' && steps.coverage.outcome == 'success'
uses: actions/upload-artifact@v7
with:
name: xccovPrettyOutput-${{ matrix.platform }}
Expand All @@ -141,11 +145,14 @@ jobs:

steps:
- name: Download xccovPretty output
id: download-coverage
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: xccovPrettyOutput-macOS

- name: Post Code Coverage Comment
if: steps.download-coverage.outcome == 'success'
uses: thollander/actions-comment-pull-request@v3
with:
file-path: xccovPretty-macOS.output
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ DerivedData/
.netrc
Open Sourcing/
.claude/settings.local.json

.rumdl_cache/
30 changes: 30 additions & 0 deletions .rumdl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# MD005 is off with it, since it flattens indented lists. MD029 is off because list numbers are
# content: rumdl splits lists whose markers are right-aligned (" 9.", "10.") and its fix renumbers
# the second half from 1. MD076 is off because the style guide puts nested lists and code blocks
# inside list items without blank lines between items.
[global]
disable = ["MD005", "MD029", "MD032", "MD033", "MD036", "MD025", "MD041", "MD046", "MD057", "MD060", "MD076"]
respect_gitignore = true

[MD004]
style = "dash"

[MD007]
indent = 4
start-indented = true
start-indent = 2
style = "fixed"

[MD012]
maximum = 2

[MD013]
line-length = 100
code-blocks = false
tables = false
headings = false
reflow = true

[MD022]
lines-above = [0, 2, 1, 1, 1, 1]
lines-below = 1
72 changes: 72 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Agent Guidelines

DevConfiguration is a type-safe configuration wrapper built on Apple’s
swift-configuration. It adds config variables, access reporting through DevFoundation’s
`EventBus`, extensible metadata, and a SwiftUI editor for overriding values at runtime.


## Building and testing

- `swift build` and `swift test` build and test the package.
- Xcode test plans in `Build Support/Test Plans/` run the tests with coverage, as CI does.
- The example app in `App/` builds with Xcode.


## Writing style

- Follow the [Markdown Style Guide](Documentation/MarkdownStyleGuide.md) for all Markdown.
- **Use typographic quotes and apostrophes, not straight ones,** in all Markdown, all code
documentation (doc comments and standalone comments), and all user-facing strings:
- Apostrophes: ’ (U+2019), as in “it’s”
- Single quotes: ‘ (U+2018) and ’ (U+2019)
- Double quotes: “ (U+201C) and ” (U+201D)

Straight quotes (`'` and `"`) are still correct in code itself: string literal delimiters,
code spans, code blocks, identifiers, and configuration files.


## Attribution

Never credit an agent or other code generation tool. Don’t add `Co-Authored-By` trailers or
“Generated with” lines to commits or pull requests, and don’t name an agent in file headers,
comments, or documentation. File headers name the git user. The programmer who uses a tool is
accountable for the changes it helped make.


## Commits and pull requests

A commit message is a short summary of what the commit does, then a blank line and a bulleted list
of the changes, close to what a changelog would say. Messages are plain text with lines of 72
characters or fewer. A pull request uses its commit message: the title is the summary, and the
body is the bullets.

Add an entry to `CHANGELOG.md` for changes that affect the library’s users.


## Code

Follow these guides before writing or reviewing Swift:

- [Dependency Injection](Documentation/DependencyInjection.md)
- [MVVM for SwiftUI](Documentation/MVVMForSwiftUI.md) and its
[background](Documentation/MVVMForSwiftUIBackground.md)
- [Swift Style Guide](Documentation/SwiftStyleGuide.md)
- [Testing Guidelines](Documentation/Testing/TestingGuidelines.md)
- [Test Mocks](Documentation/Testing/TestMocks.md)
- [Async Test Patterns](Documentation/Testing/AsyncTestPatterns.md)

Also:

- Document and test every public API, and keep test coverage above 99%.
- SwiftUI views don’t have automated tests; their view models do.


## Formatting and linting

- `Tools/format` formats Swift with swift-format and Markdown with rumdl, in place.
- `Tools/lint` checks both, plus comment line length, which swift-format doesn’t check.
- Configuration is in `.swift-format` (120-character lines) and `.rumdl.toml` (100-character
lines for Markdown).
- `Tools/install-git-hooks` installs a pre-push hook that runs `Tools/lint`.

Run `Tools/lint` before considering a change done.
93 changes: 60 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,52 @@
# DevConfiguration Changelog


## 1.0.0: TBD
## 1.0.0: November 24, 2026

Description forthcoming.
This is DevConfiguration’s first stable release. It requires Swift 6.4 (Xcode 27) to build. It also
enables Swift’s `NonisolatedNonsendingByDefault` upcoming feature, so `ConfigVariableReader`’s
`fetchValue` and `watchValue` functions now run on their caller’s actor instead of on the global
concurrent executor.


## 0.12.0: TBD
## 0.13.1: July 27, 2026

This release contains **breaking changes** to the configuration variable editor’s custom content API.
This is a small release that fixes a bug in which the overrides-only filter toggle in the config
editor’s variable list could get stuck in an on, non-interactive state after clearing all overrides.

- `ConfigVariableEditor` no longer takes a `customSectionTitle` parameter. Instead, the `customContent` view
builder is responsible for providing its own `Section` views (or other list content).
- The `customSection` view builder parameter has been renamed to `customContent`.

If you previously presented the editor with a custom section title and content, move the section title into a
`Section` view inside `customContent`.
## 0.13.0: July 27, 2026

This release adds the ability to organize configuration variables into logical groups in the
editor’s variable list, along with a filter for quickly finding overridden variables.

- Config variables can now be assigned a `ConfigVariableGroup` via the new `group` metadata key.
Variables sharing a group are rendered together under a section header; ungrouped variables
appear in a headerless section at the bottom of the list.
- The variable list can now be filtered to show only variables with overrides.
- Variable list rows are now more compact.


## 0.12.0: June 24, 2026

This release contains **breaking changes** to the configuration variable editor’s custom content
API.

- `ConfigVariableEditor` no longer takes a `customSectionTitle` parameter. Instead, the
`customContent` view builder is responsible for providing its own `Section` views (or other list
content).
- The `customSection` view builder parameter has been renamed to `customContent`.
- If `customContent` contains multiple `Section` views, each is displayed in a grouped section of
its own.

If you previously presented the editor with a custom section title and content, move the section
title into a `Section` view inside `customContent`.


## 0.11.0: April 13, 2026

This release adds a confirm keyboard button on the variable detail screen so that users who edit numeric types can
actually commit the edit.
This release adds a confirm keyboard button on the variable detail screen so that users who edit
numeric types can actually commit the edit.


## 0.10.1: April 5, 2026
Expand All @@ -39,18 +64,19 @@ DevConfiguration and Configuration.

This release makes the following changes:

- `ConfigVariableEditor` now takes an optional `dismiss` closure instead of an `onSave` closure. This closure takes
an array of modified variables just like `onSave`. However, if the `dismiss` closure is provided, it is the
caller’s responsibility to dismiss the editor. If no closure is provided, the editor will use the environment’s
dismiss action.
- The `requiresRelaunch` config variable metadata key has been removed. In general, consumers should try to
respond to variable changes at runtime. If this is not possible, you can create your own similar metadata key.
- `ConfigVariableEditor` now takes an optional `dismiss` closure instead of an `onSave` closure.
This closure takes an array of modified variables just like `onSave`. However, if the `dismiss`
closure is provided, it is the caller’s responsibility to dismiss the editor. If no closure is
provided, the editor will use the environment’s dismiss action.
- The `requiresRelaunch` config variable metadata key has been removed. In general, consumers
should try to respond to variable changes at runtime. If this is not possible, you can create
your own similar metadata key.


## 0.8.1: March 19, 2026

This is a small release that updates to DevFoundation 1.8.1 and makes `RegisteredConfigVariable`’s metadata
subscript public.
This is a small release that updates to DevFoundation 1.8.1 and makes `RegisteredConfigVariable`’s
metadata subscript public.


## 0.8.0: March 17, 2026
Expand All @@ -60,14 +86,14 @@ This is a small release that sorts metadata keys on the variable detail view of

## 0.7.0: March 17, 2026

This release adds the `isEditable` metadata value to config variables. When `false`, a config variable will not be
editable in the Config Variable Editor. `true` by default.
This release adds the `isEditable` metadata value to config variables. When `false`, a config
variable will not be editable in the Config Variable Editor. `true` by default.


## 0.6.0: March 11, 2026

This release enhances the editor UI to show pickers for `CaseIterable` integers and strings, allow editing arrays
and JSON payloads in text editors, and handle formatting better for scalar types.
This release enhances the editor UI to show pickers for `CaseIterable` integers and strings, allow
editing arrays and JSON payloads in text editors, and handle formatting better for scalar types.


## 0.5.0: March 10, 2026
Expand All @@ -77,31 +103,32 @@ This release adds the ability for consumers to add a custom section to the confi

## 0.4.1: March 10, 2026

This release fixes a bug in which editor overrides were read from one UserDefaults instance, but saved to another.
This release fixes a bug in which editor overrides were read from one UserDefaults instance, but
saved to another.


## 0.4.0: March 10, 2026

This release adds a configuration editor written in SwiftUI. The editor allows consumers to view registered variable
values in a list, see the values of a variables across all the different providers, override values for development
and testing, and view variable metadata values.
This release adds a configuration editor written in SwiftUI. The editor allows consumers to view
registered variable values in a list, see the values of a variables across all the different
providers, override values for development and testing, and view variable metadata values.

The UI has only meaningfully been tested on iOS. It has not been accessibility tested.


## 0.3.0: March 10, 2026

This is a small release that updates `ConfigVariableReader` from a struct to a class to make variable registration
easier for consumers.
This is a small release that updates `ConfigVariableReader` from a struct to a class to make
variable registration easier for consumers.


## 0.2.0: March 10, 2026

Adds the ability to register variables with `ConfigVariableReader`. This functionality is not yet used, but sets up
the public interface for consumers.
Adds the ability to register variables with `ConfigVariableReader`. This functionality is not yet
used, but sets up the public interface for consumers.


## 0.1.0: March 10, 2026

Initial version of DevConfiguration with the ability to read variables, with scalar, array, `RawRepresentable`, and
`Codable` types. Also emits access telemetry on the event bus.
Initial version of DevConfiguration with the ability to read variables, with scalar, array,
`RawRepresentable`, and `Codable` types. Also emits access telemetry on the event bus.
Loading
Loading