Skip to content

Commit 7897b2b

Browse files
committed
Fix #73
1 parent 9ac8d20 commit 7897b2b

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

Plugins/UpdateModule/UpdateModuleCommand.swift

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,7 @@ import Foundation
1111
struct UpdateModuleCommand: CommandPlugin {
1212
func performCommand(context: PackagePlugin.PluginContext, arguments: [String]) async throws {
1313
let process = Process()
14-
#if os(macOS)
15-
let path: String = try context.tool(named: "zsh").url.path()
16-
let url: URL? = if #available(macOS 14, *) {
17-
URL(filePath: path)
18-
} else {
19-
URL(string: "file://\(path)")
20-
}
21-
#else
22-
let path = try context.tool(named: "zsh").path.string
23-
let url = URL(string: "file://\(path)")
24-
#endif
25-
process.executableURL = url
14+
process.executableURL = try context.tool(named: "zsh").url
2615
process.arguments = ["AG/update.sh"]
2716
try process.run()
2817
process.waitUntilExit()

Tests/OpenGraphCompatibilityTests/Attribute/Attribute/PointerOffsetTests.swift

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ struct PointerOffsetTests {
145145
#expect((pointer + secondOffset).pointee == 4)
146146
#expect((pointer + thirdOffset).pointee == 5)
147147
}
148-
#if !(!canImport(Darwin) && !DEBUG)
149148
withUnsafePointer(to: triple) { pointer in
150149
#expect((pointer + firstOffset).pointee == 3)
151150
#expect((pointer + secondOffset).pointee == 4)
@@ -154,31 +153,6 @@ struct PointerOffsetTests {
154153
#expect(triple.first == 3)
155154
#expect(triple.second == 4)
156155
#expect(triple.third == 5)
157-
#endif
158-
}
159-
}
160-
161-
#if !canImport(Darwin) && !DEBUG
162-
@Test("Undefined Behavior Issue for PointerOffset", .bug("#73", relationship: .uncoveredBug))
163-
func unsafePointerAndUnsafeMutablePointerExtensionUB() {
164-
var tuple = Tuple(first: 1, second: 2)
165-
typealias Base = Tuple<Int, Int>
166-
let firstOffset = PointerOffset<Base, Int>(byteOffset: 0)
167-
withUnsafeMutablePointer(to: &tuple) { pointer in
168-
#expect(pointer[offset: firstOffset] == 1)
169-
pointer[offset: firstOffset] = 3
170-
}
171-
let unexpectedValue = tuple.first
172-
// The value will be unexpected due to UB
173-
#expect(unexpectedValue == 1)
174-
// The value will be expected after and within a withKnownIssue block
175-
withKnownIssue {
176-
let expectedValue = tuple.first
177-
#expect(expectedValue == 3)
178-
Issue.record("To make withKnownIssue pass")
179156
}
180-
let expectedValue = tuple.first
181-
#expect(expectedValue == 3)
182157
}
183-
#endif
184158
}

0 commit comments

Comments
 (0)