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
31 changes: 31 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,34 @@ that still calls a removed/renamed API. The goal is for Demo to stay complete
and up to date with the package, not silently lag behind. Only skip this
build when the change clearly cannot affect Demo (docs, CI config, tests-only
changes, etc.).

## Foundation types that don't exist on Linux

CI builds and tests this package on Linux (Swift 5.10, 6.0, 6.3) in addition
to Apple platforms. Several `Foundation` types you'd normally reach for
without a second thought — `HTTPURLResponse`, `URLSession.*` nested types
(e.g. `ResponseDisposition`), `URLRequest` in some contexts, etc. — live in
the separate `FoundationNetworking` module on Linux, not in `Foundation`
itself. Code that uses them compiles fine on macOS and fails on Linux CI
only, with an error like `'HTTPURLResponse' is unavailable: This type has
moved to the FoundationNetworking module.`

Whenever a new file (source *or* test) references one of these types, guard
the import the way existing files already do:

```swift
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
```

`swift build` / `swift test` passing locally on macOS does not confirm this —
the failure only shows up on Linux. If you can't run the Linux job yourself,
at least double-check new files against this pattern before considering the
change done.

## Wait for explicit instructions to push

CI takes several minutes to run, so commit locally as you go but don't run
`git push` unless the user explicitly asks for it at that point.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 32 additions & 32 deletions Demo/DemoChat/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions Demo/DemoChat/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ let package = Package(
],
dependencies: [
.package(name: "OpenAI", path: "../.."),
.package(url: "https://github.com/exyte/Chat.git", from: "2.5.7"),
.package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.9.0")
.package(url: "https://github.com/exyte/Chat.git", from: "3.3.3"),
Comment thread
nezhyborets marked this conversation as resolved.
.package(url: "https://github.com/modelcontextprotocol/swift-sdk.git", from: "0.9.0"),
// Pinned explicitly: MediaPicker 3.4.x calls PopupParameters.displayMode(_:), which
// AnchoredPopup only added in 1.2.0. MediaPicker's own manifest still declares
// `from: "1.1.3"`, so without this override SwiftPM's version resolution can pick
// 1.1.3 and fail to build.
.package(url: "https://github.com/exyte/AnchoredPopup.git", from: "1.2.2")
],
targets: [
.target(
Expand Down
Loading
Loading