Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f92c54

Browse files
committed
only import swiftprotobuf in vpnlib to debug runtime crash
1 parentfbe7ca8 commit7f92c54

File tree

7 files changed

+15
-17
lines changed

7 files changed

+15
-17
lines changed

‎Coder Desktop/Coder Desktop/Coder_DesktopApp.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import FluidMenuBarExtra
22
import NetworkExtension
33
import SwiftUI
4+
import VPNLib
45

56
@main
67
structDesktopApp:App{

‎Coder Desktop/Coder Desktop/FileSync/FileSyncDaemon.swiftrenamed to‎Coder Desktop/VPNLib/FileSync/FileSyncDaemon.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ import NIO
44
import os
55

66
@MainActor
7-
protocolFileSyncDaemon:ObservableObject{
7+
publicprotocolFileSyncDaemon:ObservableObject{
88
varstate:DaemonState{get}
99
func start()asyncthrows
1010
func stop()asyncthrows
1111
}
1212

1313
@MainActor
14-
classMutagenDaemon:FileSyncDaemon{
14+
publicclassMutagenDaemon:FileSyncDaemon{
1515
privateletlogger=Logger(subsystem:Bundle.main.bundleIdentifier!, category:"mutagen")
1616

17-
@Publishedvarstate:DaemonState=.stopped
17+
@Publishedpublicvarstate:DaemonState=.stopped
1818

1919
privatevarmutagenProcess:Process?
2020
privatevarmutagenPipe:Pipe?
@@ -26,7 +26,7 @@ class MutagenDaemon: FileSyncDaemon {
2626
privatevarchannel:GRPCChannel?
2727
privatevarclient:Daemon_DaemonAsyncClient?
2828

29-
init(){
29+
publicinit(){
3030
#if arch(arm64)
3131
mutagenPath=Bundle.main.url(forResource:"mutagen-darwin-arm64", withExtension:nil)
3232
#elseif arch(x86_64)
@@ -47,7 +47,7 @@ class MutagenDaemon: FileSyncDaemon {
4747
}
4848
}
4949

50-
func start()asyncthrows{
50+
publicfunc start()asyncthrows{
5151
if case.unavailable= state{return}
5252

5353
// Stop an orphaned daemon, if there is one
@@ -97,7 +97,7 @@ class MutagenDaemon: FileSyncDaemon {
9797
group=nil
9898
}
9999

100-
func stop()asyncthrows{
100+
publicfunc stop()asyncthrows{
101101
if case.unavailable= state{return}
102102
state=.stopped
103103
guardFileManager.default.fileExists(atPath: mutagenDaemonSocket.path)else{
@@ -158,14 +158,14 @@ class MutagenDaemon: FileSyncDaemon {
158158
}
159159
}
160160

161-
enumDaemonState{
161+
publicenumDaemonState{
162162
case running
163163
case stopped
164164
case failed(String)
165165
case unavailable
166166
}
167167

168-
enumMutagenDaemonError:Error{
168+
publicenumMutagenDaemonError:Error{
169169
case daemonStartFailure(Error)
170170
case connectionFailure(Error)
171171
}

‎Coder Desktop/Coder Desktop/FileSync/daemon.grpc.swiftrenamed to‎Coder Desktop/VPNLib/FileSync/daemon.grpc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// swift-format-ignore-file
44
//
55
// Generated by the protocol buffer compiler.
6-
// Source: Coder Desktop/Coder Desktop/FileSync/daemon.proto
6+
// Source: Coder Desktop/VPNLib/FileSync/daemon.proto
77
//
88
import GRPC
99
import NIO

‎Coder Desktop/Coder Desktop/FileSync/daemon.pb.swiftrenamed to‎Coder Desktop/VPNLib/FileSync/daemon.pb.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// swiftlint:disable all
44
//
55
// Generated by the Swift generator plugin for the protocol buffer compiler.
6-
// Source: Coder Desktop/Coder Desktop/FileSync/daemon.proto
6+
// Source: Coder Desktop/VPNLib/FileSync/daemon.proto
77
//
88
// For information on using the generated types, please see the documentation:
99
// https://github.com/apple/swift-protobuf/

‎Coder Desktop/project.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ targets:
161161
-package:FluidMenuBarExtra
162162
-package:KeychainAccess
163163
-package:LaunchAtLogin
164-
-package:GRPC
165-
-package:SwiftProtobuf
166-
-package:SwiftProtobuf
167-
product:SwiftProtobufPluginLibrary
168164
scheme:
169165
testPlans:
170166
-path:Coder Desktop.xctestplan
@@ -263,6 +259,7 @@ targets:
263259
-package:SwiftProtobuf
264260
-package:SwiftProtobuf
265261
product:SwiftProtobufPluginLibrary
262+
-package:GRPC
266263
-target:CoderSDK
267264
embed:false
268265

‎Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ $(XCPROJECT): $(PROJECT)/project.yml
4848
$(PROJECT)/VPNLib/vpn.pb.swift:$(PROJECT)/VPNLib/vpn.proto
4949
protoc --swift_opt=Visibility=public --swift_out=.'Coder Desktop/VPNLib/vpn.proto'
5050

51-
$(PROJECT)/Coder\Desktop/FileSync/daemon.pb.swift:$(PROJECT)/Coder\ Desktop/FileSync/daemon.proto
51+
$(PROJECT)/VPNLib/FileSync/daemon.pb.swift:$(PROJECT)/VPNLib/FileSync/daemon.proto
5252
protoc\
5353
--swift_out=.\
5454
--grpc-swift_out=.\
55-
'Coder Desktop/Coder Desktop/FileSync/daemon.proto'
55+
'Coder Desktop/VPNLib/FileSync/daemon.proto'
5656

5757
$(KEYCHAIN_FILE):
5858
security create-keychain -p"""$(APP_SIGNING_KEYCHAIN)"
@@ -136,7 +136,7 @@ clean/build:
136136
rm -rf build/ release/$$out
137137

138138
.PHONY: proto
139-
proto:$(PROJECT)/VPNLib/vpn.pb.swift$(PROJECT)/Coder\ Desktop/FileSync/daemon.pb.swift## Generate Swift files from protobufs
139+
proto:$(PROJECT)/VPNLib/vpn.pb.swift$(PROJECT)/VPNLib/FileSync/daemon.pb.swift## Generate Swift files from protobufs
140140

141141
.PHONY: help
142142
help:## Show this help

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp