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

Now custom configuration types are supported #4

Merged
merged 42 commits into from
Mar 24, 2019
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4ea3252
Implemented support for custom user types in configuration using type…
IgorMuzyka Mar 15, 2019
e6681df
Updated README.md
IgorMuzyka Mar 16, 2019
f941fe9
Updated README.md
IgorMuzyka Mar 16, 2019
ff21fff
minor changes
IgorMuzyka Mar 16, 2019
7dc56a6
Added PackageName type to allow for strict configuration keys for pac…
IgorMuzyka Mar 16, 2019
5ed88bf
Updated README.md
IgorMuzyka Mar 16, 2019
0a40c60
Stabilised TypePreservingCodingAdapter version
IgorMuzyka Mar 16, 2019
6dd2fba
Updated README.md
IgorMuzyka Mar 16, 2019
b3f82d0
Simplifed specific library configuration loading even further
IgorMuzyka Mar 16, 2019
2a0d7b6
Updated README.md
IgorMuzyka Mar 16, 2019
fea2070
Testing with external dependency to make it work
IgorMuzyka Mar 16, 2019
7224fdf
Reverted changes
IgorMuzyka Mar 16, 2019
ede013e
Seems to work, now to test on external project
IgorMuzyka Mar 16, 2019
1f28c47
minor improvements
IgorMuzyka Mar 16, 2019
a0880c2
Updated README.md
IgorMuzyka Mar 16, 2019
42f744c
Removed xcodeproj and Test folder; generate Xcode project using swift…
IgorMuzyka Mar 16, 2019
b5fcfa1
Removed test target from Package.swift
IgorMuzyka Mar 16, 2019
a1dd45c
Updated README.md
IgorMuzyka Mar 16, 2019
34aae32
Added /*.xcodeproj to .gitignore
IgorMuzyka Mar 16, 2019
03bd496
Unmade PackageConfig a dynamic library
IgorMuzyka Mar 17, 2019
66f55d2
Added executable package-config which would generate the directory fo…
IgorMuzyka Mar 17, 2019
f8c766d
Fixed a mistake in order of script execution in executable
IgorMuzyka Mar 17, 2019
3ee67c7
More fixes after messing up with Package.swift
IgorMuzyka Mar 17, 2019
0451f4f
Updated script
IgorMuzyka Mar 17, 2019
6733876
Updated README.md
IgorMuzyka Mar 17, 2019
fbafd1f
Updated README.md
IgorMuzyka Mar 17, 2019
e3ff450
Update README.md
IgorMuzyka Mar 17, 2019
08ec748
Update README.md
IgorMuzyka Mar 17, 2019
374d99c
Updated package-config executable script
IgorMuzyka Mar 17, 2019
d895239
Merge branch 'master' of github.com:IgorMuzyka/PackageConfig
IgorMuzyka Mar 17, 2019
7b49aac
Updated README.md; Removed unneeded files
IgorMuzyka Mar 17, 2019
2e48284
Added property to protocol
IgorMuzyka Mar 17, 2019
21195da
Resolving required dynamic libraries from PackageConfigs target
IgorMuzyka Mar 19, 2019
8852c64
minor improvements
IgorMuzyka Mar 19, 2019
8c9a63c
Commented out PackageConfigs target
IgorMuzyka Mar 19, 2019
ad7941d
commented out test target
IgorMuzyka Mar 19, 2019
f4426ac
Improved Package.swift parsing to ignore comments
IgorMuzyka Mar 19, 2019
7d93c41
Updated README.md
IgorMuzyka Mar 19, 2019
03fae7d
minor improvements
IgorMuzyka Mar 19, 2019
765d990
Updated README.md
IgorMuzyka Mar 19, 2019
89d8045
Updated README.md
IgorMuzyka Mar 20, 2019
242ae21
minor improvements
IgorMuzyka Mar 20, 2019
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
Prev Previous commit
Next Next commit
minor improvements
IgorMuzyka committed Mar 19, 2019
commit 03fae7d446706f00092914a5bc794d967afddc6e
11 changes: 2 additions & 9 deletions Sources/PackageConfig/Package.swift
Original file line number Diff line number Diff line change
@@ -18,24 +18,18 @@ enum Package {
arguments += ["Package.swift"] // The Package.swift in the CWD

// Create a process to eval the Swift Package manifest as a subprocess

process.launchPath = swiftC
process.arguments = arguments
process.standardOutput = FileHandle.standardOutput
process.standardError = FileHandle.standardOutput

debugLog("CMD: \(swiftC) \( arguments.joined(separator: " "))")



let standardOutput = FileHandle.standardOutput
process.standardOutput = standardOutput
process.standardError = standardOutput

// Evaluation of the package swift code will end up
// creating a file in the tmpdir that stores the JSON
// settings when a new instance of PackageConfig is created
process.launch()
process.waitUntilExit()

debugLog("Finished launching swiftc")
}

@@ -51,7 +45,6 @@ enum Package {

process.launch()
process.waitUntilExit()

return String(data: pipe.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8)!
.trimmingCharacters(in: .whitespacesAndNewlines)
}
2 changes: 1 addition & 1 deletion Sources/PackageConfig/PackageConfig.swift
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ extension PackageConfig {
}
}

import Foundation
import class Foundation.ProcessInfo

func debugLog(_ message: String) -> Void {
let isVerbose = CommandLine.arguments.contains("--verbose") || (ProcessInfo.processInfo.environment["DEBUG"] != nil)