Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
Migrate to Xcode New Build System (#29)
Browse files Browse the repository at this point in the history
* use build system

* bump version and add changelog

* update changelog
  • Loading branch information
wendyliga authored Nov 12, 2021
1 parent 0b603fa commit 1719419
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# CHANGELOG

## 0.6.0
<h2>Tulsi++ 0.6.0 🔥 </h2>
<h4>What's new:</h4>
<ol>
<li>By default, will use Xcode New Build System</li>
<li>Add Option to use Legacy Build System, false by default</li>
</ol>

<h4>New Build System Fixes:</h4>
<ol>
<li>unit test will build & test successfully on Xcode 13</li>
<li>Fix issue where unit test failure doesn't pin to the exact code line</li>
<li>eliminate error couldn't find framework folder</li>
<li>Xcode will properly indexing the whole codebase in the background</li>
</ol>

----

## 0.5.3
<h2>Tulsi++ 0.5.3 🔨 </h2>
<h4>What's new:</h4>
Expand Down
6 changes: 5 additions & 1 deletion src/TulsiGenerator/TulsiOptionSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ public enum TulsiOptionKey: String {
PreBuildPhaseRunScript,

// Custom build phase run script that runs after bazel build.
PostBuildPhaseRunScript
PostBuildPhaseRunScript,

// option to fallback to xcode legacy build system
UseLegacyBuildSystem

// Options for build invocations.
case BazelBuildOptionsDebug,
Expand Down Expand Up @@ -345,6 +348,7 @@ public class TulsiOptionSet: Equatable {
addBoolOption(.TreeArtifactOutputs, .Generic, true)
addBoolOption(.Use64BitWatchSimulator, .Generic, false)
addBoolOption(.DisableCustomLLDBInit, .Generic, false)
addBoolOption(.UseLegacyBuildSystem, .Generic, false)

let defaultIdentifier = PlatformConfiguration.defaultConfiguration.identifier
let platformCPUIdentifiers = PlatformConfiguration.allValidConfigurations.map { $0.identifier }
Expand Down
14 changes: 9 additions & 5 deletions src/TulsiGenerator/XcodeProjectGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -635,14 +635,18 @@ final class XcodeProjectGenerator {
try writeDataHandler(workspaceSettingsURL, data)
}


let workspaceSharedDataURL = projectURL.appendingPathComponent("project.xcworkspace/xcshareddata")
let sharedWorkspaceSettings: [String: Any] = [
"BuildSystemType": "Original",
"DisableBuildSystemDeprecationWarning": true as AnyObject,
"DisableBuildSystemDeprecationDiagnostic": true as AnyObject,
var sharedWorkspaceSettings: [String: Any] = [
"IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded": false as AnyObject,
]

let useLegacyBuildSystem: Bool = config.options[.UseLegacyBuildSystem].commonValueAsBool ?? false
if useLegacyBuildSystem {
sharedWorkspaceSettings["BuildSystemType"] = "Original"
sharedWorkspaceSettings["DisableBuildSystemDeprecationWarning"] = true as AnyObject
sharedWorkspaceSettings["DisableBuildSystemDeprecationDiagnostic"] = true as AnyObject
}

try writeWorkspaceSettings(sharedWorkspaceSettings,
toDirectoryAtURL: workspaceSharedDataURL,
replaceIfExists: true)
Expand Down
3 changes: 3 additions & 0 deletions src/TulsiGenerator/en.lproj/Options.strings
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"ProjectGenerationUseRealFilePath" = "Use real Groups file path";
"ProjectGenerationUseRealFilePath_DESC" = "Experimental Feature! By default Tulsi use dummy file path for Groups to prevents some issues related to project-generation. By turning this ON, the generated-project will use real path for Groups. This can let developer to maintain file easily on Xcode, but may can cause some issues.";

"UseLegacyBuildSystem" = "Use Legacy Build System";
"UseLegacyBuildSystem_DESC" = "Option to fallback to xcode legacy build system";

"BazelBuildStartupOptions" = "'build' startup options";
"BazelBuildStartupOptions_DESC" = "Startup options for bazel 'build' invocations.";
"BazelBuildStartupOptionsDebug" = "Debug";
Expand Down
4 changes: 2 additions & 2 deletions version.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

# Version number (recorded into the Info.plist)
TULSI_VERSION_MAJOR = "0"
TULSI_VERSION_MINOR = "5"
TULSI_VERSION_FIXLEVEL = "3"
TULSI_VERSION_MINOR = "6"
TULSI_VERSION_FIXLEVEL = "0"

TULSI_VERSION_COPYRIGHT = "2021"
TULSI_PRODUCT_NAME = "Tulsi++"
Expand Down

0 comments on commit 1719419

Please sign in to comment.