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

chore: add example of SWIFT_PACKAGE defines #1261

Draft
wants to merge 1 commit into
base: luis/fix-swift-pacakge-defines
Choose a base branch
from
Draft
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
2 changes: 2 additions & 0 deletions examples/interesting_deps/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ swift_binary(
"@swiftpkg_libwebp_xcode//:libwebp",
"@swiftpkg_opencombine//:OpenCombine",
"@swiftpkg_swift_log//:Logging",
"@swiftpkg_swift_package_defines_example//:Foo",
"@swiftpkg_swift_package_defines_example//:FooSwift",
],
)

Expand Down
1 change: 1 addition & 0 deletions examples/interesting_deps/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ use_repo(
"swiftpkg_libwebp_xcode",
"swiftpkg_opencombine",
"swiftpkg_swift_log",
"swiftpkg_swift_package_defines_example",
)
17 changes: 13 additions & 4 deletions examples/interesting_deps/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/GEOSwift/GEOSwift",
"state" : {
"revision" : "2d23ede8c82c067655d3a9f0221bc73f08cd399a",
"version" : "10.1.0"
"revision" : "1fee0146ee06ca2d1e83070320b95526f3690f9d",
"version" : "10.2.0"
}
},
{
Expand All @@ -50,8 +50,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log",
"state" : {
"revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5",
"version" : "1.5.4"
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
"identity" : "swift-package-defines-example",
"kind" : "remoteSourceControl",
"location" : "https://github.com/luispadron/swift-package-defines-example",
"state" : {
"revision" : "58e32880dc2b5e1ac677a7e8dcf5b9f8e874b260",
"version" : "1.0.0"
}
}
],
Expand Down
1 change: 1 addition & 0 deletions examples/interesting_deps/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ let package = Package(
.package(url: "https://github.com/OpenCombine/OpenCombine", from: "0.14.0"),
.package(url: "https://github.com/SDWebImage/libwebp-Xcode.git", from: "1.3.2"),
.package(url: "https://github.com/apple/swift-log", from: "1.6.1"),
.package(url: "https://github.com/luispadron/swift-package-defines-example", from: "1.0.0"),
]
)
8 changes: 8 additions & 0 deletions examples/interesting_deps/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import CocoaLumberjack
import CocoaLumberjackSwiftLogBackend
import Foo
import FooSwift
import GEOSwift
import libwebp
import Logging
Expand All @@ -14,3 +16,9 @@ logger.info("Hello World!")

let webpVersion = WebPGetDecoderVersion()
logger.info("WebP version: \(webpVersion)")

let fooObjc = foo()
logger.info("fooObjc: \(fooObjc)")

let fooSwift = fooSwift()
logger.info("fooSwift: \(fooSwift)")