Conversation
-Xswiftc -warnings-as-errors was applied to the whole build graph, so any warning surfacing in swift-argument-parser under a newer Swift compiler broke the build. Scope the flag to our own targets via Package.swift swiftSettings instead, bump swift-argument-parser past 1.3.x to pick up its Sendable-conformance fixes, and migrate off its now-deprecated single-argument completion closure API.
chore: fix build-release failing under newer Swift toolchain
chore: add CLAUDE.md and VS Code launch configuration
When a parsed date included a significant time (e.g. "tomorrow 9pm"), components(from:) returned the unfiltered result of Calendar.dateComponents(in:from:) instead of narrowing it to the declared component set like the no-time branch already did. On newer macOS SDKs that method also populates .dayOfYear, silently leaking an extra field into DateComponents values used for reminder due dates. Both branches now derive from the same explicit component set via a zone-adjusted Calendar.
…oice The exact hour NSDataDetector picks for "tonight" is an OS/locale implementation detail that has changed across macOS versions (18:00 vs the previously hardcoded 19:00), making the test flaky. Assert it resolves to today, on the hour, within a broad evening window instead of an exact time.
Author
|
sry, only meant for my fork... |
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
components(from:)inNaturalLanguage.swiftreturned the unfiltered result ofCalendar.dateComponents(in:from:)whenever a parsed date included a significant time, instead of narrowing it to the declared component set the way the no-time branch already did. On newer macOS SDKs that method also populates.dayOfYear, silently leaking an extra field intoDateComponentsvalues used for reminder due dates. Both branches now derive from the same explicit component set via a zone-adjustedCalendar.testTonighthardcoded an expected hour of 19:00, butNSDataDetector's interpretation of "tonight" is an OS/locale-dependent implementation detail that has changed across macOS versions (now 18:00 here), making the test flaky. Loosened it to assert "today, on the hour, within an evening window" instead of an exact time.Test plan
swift test --filter RemindersTests.NaturalLanguageTests— all 11 tests passmake build-releasesucceedsswift build -Xswiftc -warnings-as-errors(CI-matching build) succeeds