Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automerge repo package #41

Merged
merged 68 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
dbf5d7c
establishing basic package structure
heckj Mar 2, 2024
a408302
getting the depdency links sorted
heckj Mar 2, 2024
11ca7e2
moves all existing files into package, updated references for an init…
heckj Mar 3, 2024
dd5869c
fixing up privacy manifests
heckj Mar 3, 2024
8612ffd
roughing in protocol layouts for adapters, subsystems matching Autome…
heckj Mar 3, 2024
49f6762
fixing test compilation in MeetingNotes after move
heckj Mar 3, 2024
c75e19d
Adding documentation stubs for AutomergeRepo, renaming V1 to SyncV1 f…
heckj Mar 5, 2024
4f2f8cd
package cleanup, notes moved into package
heckj Mar 5, 2024
51d3477
prep work to update Peer2Peer with V1 message data types
heckj Mar 5, 2024
4168af1
reorganization of files and types in prep for bringing connections to…
heckj Mar 5, 2024
7281edb
breaking out components, tightly constraining imports
heckj Mar 5, 2024
a5011df
organzing by component
heckj Mar 5, 2024
7aa0a5f
wrapping up the storage subsystem to use in the synchronizer
heckj Mar 5, 2024
f22c963
storage subsystem optimization on reading from provider to determine …
heckj Mar 6, 2024
0a15bc5
extending V1 protocol to include 'leave' message as found in automerg…
heckj Mar 7, 2024
5fb3164
incremental thinking and exploration of how to break up existing netw…
heckj Mar 7, 2024
759a09f
fleshing out repo, and higher level pieces to replicate functionality…
heckj Mar 8, 2024
c965f30
pausing with partial updates in play - DocHandle resolution needs thi…
heckj Mar 9, 2024
10d7a0f
enabling full concurrency checking and isolation analysis
heckj Mar 9, 2024
604b68a
working on concurrency warnings in Swift 5.10
heckj Mar 9, 2024
1a728f2
taking care of low-handing fruit in sendable conformances and proper …
heckj Mar 10, 2024
8f8c6bf
moving CBOR into an actor isolated area, experimenting with a globalA…
heckj Mar 10, 2024
c39e9fc
align with concurrency updates in the Automerge-repo package being ex…
heckj Mar 10, 2024
396cdb3
fiddling with GH action declaration - not spotting the build failure …
heckj Mar 10, 2024
ee73999
updating CI to macOS 14, and adding some MainActor annotation around …
heckj Mar 10, 2024
b6ddd15
next iteration of chasing down the iOS sendable compilation issues
heckj Mar 10, 2024
63d3caf
hup! again!
heckj Mar 10, 2024
0ef9aec
resolving concurrency warnings for existing data races by applying is…
heckj Mar 13, 2024
30f6255
removing un-used preconcurrency marker applied while working out isol…
heckj Mar 13, 2024
3085080
embracing explicit existential-any annotations
heckj Mar 13, 2024
d333298
package import means i can't have unsafe flags...
heckj Mar 13, 2024
51343ed
WIP
heckj Mar 15, 2024
1e9c285
fleshing in repo methods and docHandle resolve process/state machine
heckj Mar 15, 2024
64c83a2
resolve with repo/docHandle against background state updates
heckj Mar 15, 2024
a73fc37
fixing protection level for local peer metadata, adding placeholder f…
heckj Mar 16, 2024
969a32e
fleshed out core of network subsystem and sync handling
heckj Mar 17, 2024
1f7090e
making a simple network testing setup to conform to the provider
heckj Mar 17, 2024
f80a441
get a merge function involved in there...
heckj Mar 17, 2024
06ce8b9
starting to add testing
heckj Mar 20, 2024
5d42ab4
switch InMemNetwork to vend connection instances that can be terminat…
heckj Mar 21, 2024
9b3cc49
working on tests and coverage for DocHandle, DocumentId, and StorageS…
heckj Mar 21, 2024
8232aa8
adding a future-check to determine status of Sendability markings on …
heckj Mar 22, 2024
1ebe119
iterating on repo and return types
heckj Mar 22, 2024
34e0fc8
exposing a doc+id wrapper externally - smaller, simpler 'docHandle'
heckj Mar 22, 2024
3389a94
fix bs58 to not use checksum version for encode/decode
heckj Mar 25, 2024
0b90c7c
code coverage OCD on DocumentId
heckj Mar 25, 2024
82af0ca
move UUID/base58 tests into package
heckj Mar 25, 2024
78bf240
fixing compacting to include provided doc, adding test coverage
heckj Mar 25, 2024
e96ad55
setting up for network tests
heckj Mar 25, 2024
17606c2
establish connect in test network
heckj Mar 25, 2024
e0a676c
properly wipe test networks
heckj Mar 25, 2024
fb43b84
enabling virtual tracing with logging on InMem Network Connection
heckj Mar 25, 2024
ae8bf5c
cleanup
heckj Mar 25, 2024
d04db7f
logging cleanup, setting up repos and endpoints completely
heckj Mar 27, 2024
d18c6fc
create, no replication automatic
heckj Mar 27, 2024
a8d2e2e
progress on sync on connect
heckj Mar 27, 2024
ac59f5b
adding dependencies for emitting tracing from tests
heckj Mar 29, 2024
b17ca96
spans from tests showing up - pending adding span links within InMemo…
heckj Mar 29, 2024
f7c7745
idempotent global tracer for testing, and capturing some basic traces…
heckj Mar 30, 2024
19f3e6a
adding in more tracing detail to the in-memory network provider
heckj Mar 31, 2024
5ebf18c
reconfigure to set adapter peerId and metadata on configuration call …
heckj Apr 1, 2024
ccd84d1
move testtracer into it's own package
heckj Apr 1, 2024
a3f92a9
wip - error with infinite sync due to always-new-sync-state
heckj Apr 1, 2024
397273a
fixed infinite sync issue, converted InternalDocHandle into a class, …
heckj Apr 3, 2024
57f84f5
cleaning now placeholder test location
heckj Apr 4, 2024
72d28a7
getting fetch/find operational
heckj Apr 4, 2024
77b0d42
websocket provider, first cut - need to test
heckj Apr 5, 2024
262c611
integration test passing with websocket
heckj Apr 5, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/mac_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:

jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-13
name: Build and Test default scheme using an iPhone simulator
runs-on: macos-14
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-13-Readme.md
# target macOS 12.4 isn't supported in default Xcode for macOS 12
# - default Xcode version is 14.3.1 for macos-13 builder image
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: iOS build for MeetingNotes
# Xcode 15.2 settings
run: xcodebuild clean build -scheme 'MeetingNotes' -destination 'platform=iOS Simulator,OS=17.0.1,name=Any iOS Simulator Device' -sdk iphonesimulator17.2 -showBuildTimingSummary
run: xcodebuild clean build -scheme 'MeetingNotes' -destination 'platform=iOS Simulator,OS=17.0.1,name=iPhone 14' -sdk iphonesimulator17.2 -showBuildTimingSummary

- name: iOS test
# Xcode 15.2 settings
Expand Down
240 changes: 83 additions & 157 deletions MeetingNotes.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

8 changes: 0 additions & 8 deletions MeetingNotes/Data+hexEncodedString.swift

This file was deleted.

14 changes: 14 additions & 0 deletions MeetingNotes/Logger+extensions.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Foundation
import OSLog

// using : @unchecked Sendable here because I think Logger _is_ sendable,
// but isn't yet marked as such. Alternatively I think we could use @preconcurrency import,
// but doing this due to the conversation on the forums (Mar2024):
// https://forums.swift.org/t/preconcurrency-doesnt-suppress-static-property-concurrency-warnings/70469/2
extension Logger: @unchecked Sendable {
/// Using your bundle identifier is a great way to ensure a unique identifier.
private nonisolated static let subsystem = Bundle.main.bundleIdentifier!

/// Logs the Document interactions, such as saving and loading.
static let document = Logger(subsystem: subsystem, category: "Document")
}
4 changes: 1 addition & 3 deletions MeetingNotes/MeetingNotesApp.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import AutomergeRepo
import SwiftUI

/// A shared instance of a document sync coordinator.
let sharedSyncCoordinator = DocumentSyncCoordinator()

/// The document-based Meeting Notes application.
@main
struct MeetingNotesApp: App {
Expand Down
9 changes: 6 additions & 3 deletions MeetingNotes/MeetingNotesDocument.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Automerge
import AutomergeRepo
import Combine
import OSLog
import PotentCBOR
Expand All @@ -19,13 +20,15 @@ extension UTType {
struct WrappedAutomergeDocument: Codable {
let id: DocumentId
let data: Data
static let fileEncoder = CBOREncoder()
static let fileDecoder = CBORDecoder()
}

extension WrappedAutomergeDocument: Transferable {
static var transferRepresentation: some TransferRepresentation {
CodableRepresentation(contentType: .meetingnote, encoder: fileEncoder, decoder: fileDecoder)
CodableRepresentation(
contentType: .meetingnote,
encoder: CBORCoder.encoder,
decoder: CBORCoder.decoder
)
}
}

Expand Down
18 changes: 0 additions & 18 deletions MeetingNotes/OSLog+extensions.swift

This file was deleted.

32 changes: 0 additions & 32 deletions MeetingNotes/Sync/WebSocketNetworking/Task+timeout.swift

This file was deleted.

Loading