-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rename module target to Knit and fix example project #105
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,17 @@ | |
archiveVersion = 1; | ||
classes = { | ||
}; | ||
objectVersion = 56; | ||
objectVersion = 60; | ||
objects = { | ||
|
||
/* Begin PBXBuildFile section */ | ||
2C360AEA2B4E1A2C00C88B99 /* Knit in Frameworks */ = {isa = PBXBuildFile; productRef = 2C360AE92B4E1A2C00C88B99 /* Knit */; }; | ||
C40D0D1F2A838D140095AC59 /* KnitExampleUserAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = C40D0D1E2A838D140095AC59 /* KnitExampleUserAssembly.swift */; }; | ||
C43334F32A3FDD43003BA9E3 /* KnitExampleApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43334F22A3FDD43003BA9E3 /* KnitExampleApp.swift */; }; | ||
C43334F52A3FDD43003BA9E3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43334F42A3FDD43003BA9E3 /* ContentView.swift */; }; | ||
C43334F72A3FDD44003BA9E3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C43334F62A3FDD44003BA9E3 /* Assets.xcassets */; }; | ||
C43334FA2A3FDD44003BA9E3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C43334F92A3FDD44003BA9E3 /* Preview Assets.xcassets */; }; | ||
C43335062A3FDDD3003BA9E3 /* KnitExampleAssembly.swift in Sources */ = {isa = PBXBuildFile; fileRef = C43335052A3FDDD3003BA9E3 /* KnitExampleAssembly.swift */; }; | ||
C433350A2A3FDF68003BA9E3 /* Knit in Frameworks */ = {isa = PBXBuildFile; productRef = C43335092A3FDF68003BA9E3 /* Knit */; }; | ||
C44754F72A3FE7570072333A /* KnitDITypeSafety.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44754F62A3FE7570072333A /* KnitDITypeSafety.swift */; }; | ||
C44755172A3FEA5E0072333A /* KnitDIRegistrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44755162A3FEA5E0072333A /* KnitDIRegistrationTests.swift */; }; | ||
C44755192A3FEA740072333A /* TestModuleAssembler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44755182A3FEA740072333A /* TestModuleAssembler.swift */; }; | ||
|
@@ -36,7 +36,6 @@ | |
C43334F42A3FDD43003BA9E3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; }; | ||
C43334F62A3FDD44003BA9E3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | ||
C43334F92A3FDD44003BA9E3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; }; | ||
C43335042A3FDD78003BA9E3 /* knit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = knit; path = ..; sourceTree = "<group>"; }; | ||
C43335052A3FDDD3003BA9E3 /* KnitExampleAssembly.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KnitExampleAssembly.swift; sourceTree = "<group>"; }; | ||
C44754F62A3FE7570072333A /* KnitDITypeSafety.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KnitDITypeSafety.swift; sourceTree = "<group>"; }; | ||
C447550D2A3FEA120072333A /* KnitExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KnitExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
|
@@ -49,7 +48,7 @@ | |
isa = PBXFrameworksBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
C433350A2A3FDF68003BA9E3 /* Knit in Frameworks */, | ||
2C360AEA2B4E1A2C00C88B99 /* Knit in Frameworks */, | ||
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
}; | ||
|
@@ -66,7 +65,6 @@ | |
C43334E62A3FDD43003BA9E3 = { | ||
isa = PBXGroup; | ||
children = ( | ||
C43335042A3FDD78003BA9E3 /* knit */, | ||
C43334F12A3FDD43003BA9E3 /* KnitExample */, | ||
C447550E2A3FEA120072333A /* KnitExampleTests */, | ||
C43334F02A3FDD43003BA9E3 /* Products */, | ||
|
@@ -139,7 +137,7 @@ | |
); | ||
name = KnitExample; | ||
packageProductDependencies = ( | ||
C43335092A3FDF68003BA9E3 /* Knit */, | ||
2C360AE92B4E1A2C00C88B99 /* Knit */, | ||
); | ||
productName = KnitExample; | ||
productReference = C43334EF2A3FDD43003BA9E3 /* KnitExample.app */; | ||
|
@@ -159,6 +157,8 @@ | |
C44755122A3FEA120072333A /* PBXTargetDependency */, | ||
); | ||
name = KnitExampleTests; | ||
packageProductDependencies = ( | ||
); | ||
productName = KnitExampleTests; | ||
productReference = C447550D2A3FEA120072333A /* KnitExampleTests.xctest */; | ||
productType = "com.apple.product-type.bundle.unit-test"; | ||
|
@@ -171,7 +171,7 @@ | |
attributes = { | ||
BuildIndependentTargetsInParallel = 1; | ||
LastSwiftUpdateCheck = 1430; | ||
LastUpgradeCheck = 1420; | ||
LastUpgradeCheck = 1520; | ||
TargetAttributes = { | ||
C43334EE2A3FDD43003BA9E3 = { | ||
CreatedOnToolsVersion = 14.2; | ||
|
@@ -191,6 +191,9 @@ | |
Base, | ||
); | ||
mainGroup = C43334E62A3FDD43003BA9E3; | ||
packageReferences = ( | ||
2C360AE82B4E1A2B00C88B99 /* XCLocalSwiftPackageReference ".." */, | ||
); | ||
productRefGroup = C43334F02A3FDD43003BA9E3 /* Products */; | ||
projectDirPath = ""; | ||
projectRoot = ""; | ||
|
@@ -230,6 +233,7 @@ | |
); | ||
inputPaths = ( | ||
"$(SRCROOT)/KnitExample/KnitExampleAssembly.swift", | ||
"$(SRCROOT)/KnitExample/KnitExampleUserAssembly.swift", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was getting a sandbox error so added the additional input assembly path |
||
); | ||
outputFileListPaths = ( | ||
); | ||
|
@@ -239,7 +243,7 @@ | |
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
shellPath = /bin/sh; | ||
shellScript = "/usr/bin/xcrun --sdk macosx swift run knit-cli gen \\\n--assembly-input-path KnitExample/KnitExampleAssembly.swift \\\n--assembly-input-path KnitExample/KnitExampleUserAssembly.swift \\\n--type-safety-extensions-output-path KnitExample/KnitDITypeSafety.swift \\\n--unit-test-output-path KnitExampleTests/KnitDIRegistrationTests.swift\n"; | ||
shellScript = "./knit-cli gen \\\n--assembly-input-path KnitExample/KnitExampleAssembly.swift \\\n--assembly-input-path KnitExample/KnitExampleUserAssembly.swift \\\n--type-safety-extensions-output-path KnitExample/KnitDITypeSafety.swift \\\n--unit-test-output-path KnitExampleTests/KnitDIRegistrationTests.swift\n"; | ||
}; | ||
/* End PBXShellScriptBuildPhase section */ | ||
|
||
|
@@ -280,6 +284,7 @@ | |
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ALWAYS_SEARCH_USER_PATHS = NO; | ||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; | ||
CLANG_ANALYZER_NONNULL = YES; | ||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; | ||
|
@@ -312,6 +317,7 @@ | |
DEBUG_INFORMATION_FORMAT = dwarf; | ||
ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
ENABLE_TESTABILITY = YES; | ||
ENABLE_USER_SCRIPT_SANDBOXING = YES; | ||
GCC_C_LANGUAGE_STANDARD = gnu11; | ||
GCC_DYNAMIC_NO_PIC = NO; | ||
GCC_NO_COMMON_BLOCKS = YES; | ||
|
@@ -340,6 +346,7 @@ | |
isa = XCBuildConfiguration; | ||
buildSettings = { | ||
ALWAYS_SEARCH_USER_PATHS = NO; | ||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; | ||
CLANG_ANALYZER_NONNULL = YES; | ||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; | ||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; | ||
|
@@ -372,6 +379,7 @@ | |
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; | ||
ENABLE_NS_ASSERTIONS = NO; | ||
ENABLE_STRICT_OBJC_MSGSEND = YES; | ||
ENABLE_USER_SCRIPT_SANDBOXING = YES; | ||
GCC_C_LANGUAGE_STANDARD = gnu11; | ||
GCC_NO_COMMON_BLOCKS = YES; | ||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | ||
|
@@ -516,8 +524,15 @@ | |
}; | ||
/* End XCConfigurationList section */ | ||
|
||
/* Begin XCLocalSwiftPackageReference section */ | ||
2C360AE82B4E1A2B00C88B99 /* XCLocalSwiftPackageReference ".." */ = { | ||
isa = XCLocalSwiftPackageReference; | ||
relativePath = ..; | ||
}; | ||
/* End XCLocalSwiftPackageReference section */ | ||
Comment on lines
+527
to
+532
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now using an SPM local package reference |
||
|
||
/* Begin XCSwiftPackageProductDependency section */ | ||
C43335092A3FDF68003BA9E3 /* Knit */ = { | ||
2C360AE92B4E1A2C00C88B99 /* Knit */ = { | ||
isa = XCSwiftPackageProductDependency; | ||
productName = Knit; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Example Project | ||
|
||
An example Xcode project that uses Knit. | ||
|
||
## Setup | ||
|
||
1. Run `./bootstrap` from the Example folder | ||
1. Open the `KnitExample.xcodeproj` project | ||
|
||
### Bootstrap Script | ||
|
||
The bootstrap script compiles the Knit CLI tool from local source and moves the resulting executable to the Example directory. | ||
|
||
|
||
For normal apps, the project should use the pre-complied executable binaries that are | ||
included in the GitHub release zips (per release version). | ||
(You are also free to download any of the released binary executables and place it in the Example directory to use it.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
cd .. | ||
swift build --arch x86_64 --arch arm64 --product knit-cli | ||
mv .build/apple/Products/Debug/knit-cli Example/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../KnitLibTests/ServiceCollectorTests.swift → Tests/KnitTests/ServiceCollectorTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import KnitLib | ||
import Knit | ||
import XCTest | ||
|
||
protocol ServiceProtocol {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer pulling in the parent directory into the project as a folder reference