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

Sync with upstream, and fixed for Xcode 14 #78

Merged
merged 103 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
00a73c9
Fix broken external BuildLabel filename parsing (#257)
cpsauer Sep 10, 2021
63bab0d
Add support for ios_sim_arm64 CPU type
thii Sep 29, 2021
c7609aa
Point External Paths into Stable External Directory instead of Unstab…
cpsauer Oct 14, 2021
88bb140
Add `generates_header = True` to `swift_library` targets used by Tuls…
a-googler Apr 6, 2021
81c650c
Add a setting to the Tulsi-generated lldbinit to explicitly enable im…
ivanhernandez13 May 4, 2021
bc7e6c9
Updates version number to 0.4.372144887.20210505.
ivanhernandez13 May 5, 2021
50cef26
Internal Change
a-googler May 11, 2021
bf9aeba
Only show one amibigous rule warning per build label.
ivanhernandez13 May 18, 2021
a69355d
Updates version number to 0.4.374474001.20210518.
ivanhernandez13 May 18, 2021
ef064f5
Change 1/3 to add a new tool that handles pruning the LLDB module cac…
ivanhernandez13 Jun 8, 2021
ee758c3
Change 2/3 to add a new tool that handles pruning the LLDB module cac…
ivanhernandez13 Jun 9, 2021
5d43e09
Change 3/3 to add a new tool that handles pruning the LLDB module cac…
ivanhernandez13 Jun 10, 2021
a21f4fe
Disable legacy build system error in Xcode 13
DavidGoldman Jun 11, 2021
3608a9f
Removing this ios_static_framework target that isn't covered by any t…
nglevin Jun 11, 2021
f03c721
Revert "Point External Paths into Stable External Directory instead o…
thii Oct 22, 2021
ea2d59e
Prevent a crash in lldb-rpc-server that can occur after migrating a r…
ivanhernandez13 Jun 11, 2021
fb42ee4
Updates version number to 0.4.374498161.20210614.
ivanhernandez13 Jun 14, 2021
547c972
Add @discardableResult to pruneModuleCache function so we can avoid n…
ivanhernandez13 Jun 29, 2021
f77310d
Move entitlements handling into the rule implementations.
a-googler Jun 30, 2021
72346f3
Move usage of bazel_cache_reader behind a Tulsi option and leave it d…
ivanhernandez13 Jul 1, 2021
44d0200
Skip over unsupported test targets in test_suites
DavidGoldman Jul 1, 2021
c9ffd24
Updates version number to 0.4.384524523.20210713.
ivanhernandez13 Jul 13, 2021
96b352e
Automatic code cleanup.
a-googler Jul 26, 2021
8ff249a
Improve failure messages when goldens are outdated
DavidGoldman Aug 10, 2021
e65f985
Improve performance of fetching build/bzl files for a project
DavidGoldman Aug 10, 2021
2bb4432
Swap to build and test with Xcode 12.5.1
DavidGoldman Aug 11, 2021
2eb1def
Updates version number to 0.4.391542404.20210818.
DavidGoldman Aug 18, 2021
d88dacc
Slight tweaks to build flags used for project generation
DavidGoldman Aug 30, 2021
498a680
Updates version number to 0.4.396915249.20210915.
DavidGoldman Sep 15, 2021
dcaf13d
Update iOS sim device to use for E2E tests
DavidGoldman Sep 29, 2021
739fdcb
Update Tulsi to Xcode 13.0.
ivanhernandez13 Oct 18, 2021
fe2721c
Automatic code cleanup.
a-googler Oct 28, 2021
afd7ee9
Fix some warnings in the Tulsi module
DavidGoldman Oct 29, 2021
9c7b6eb
Fix some warnings in TulsiGenerator + a xib
DavidGoldman Nov 3, 2021
179d062
Updates version number to 0.4.408971104.20211110.
DavidGoldman Nov 10, 2021
d736378
Add GitHub Actions
thii Dec 13, 2021
9ffda6c
Use rules_apple and rules_swift at HEADs
thii Dec 18, 2021
e6b3292
Update golden
thii Dec 18, 2021
697ad1a
Revert "Revert "Point External Paths into Stable External Directory i…
thii Dec 18, 2021
703eb7b
Point to master branch for the reusing workflow
thii Dec 21, 2021
7caf69b
Fix tulsi tests after unknown commit.
a-googler Nov 23, 2021
068aaaa
Fix signing of test runners with Xcode 13
DavidGoldman Dec 21, 2021
27981b2
Add UseLegacyBuildSystem option to swap between new/old build systems
DavidGoldman Dec 21, 2021
3dd2bed
Use `--noexperimental_run_validations` instead of `--norun_validation…
thii Dec 29, 2021
d3c7c71
Update Tulsi python 2.7 scripts to python 3. This will silence the wa…
ivanhernandez13 Jan 5, 2022
c677e4f
Increase timeout of //src/TulsiGeneratorIntegrationTests:EndToEndGene…
thii Jan 6, 2022
0236b16
Updates version number to 0.4.419907671.20220105.
ivanhernandez13 Jan 5, 2022
4eb4edc
minor README updates (#298)
skofgar Jan 6, 2022
89b2e96
Add minimum bazel version check (#302)
keith Jan 22, 2022
907dde2
Update rules_apple (#281)
keith Jan 23, 2022
a23f0a7
Switch back to building with latest Bazel (#306)
thii Feb 18, 2022
5662dfa
Move the attributes for which Tulsi will search for dependencies into…
ivanhernandez13 Jan 6, 2022
6432208
Add the ability to specify extra build flags via the CLI during proje…
DavidGoldman Jan 28, 2022
b591ddb
Fetch E2E build flags from the BazelIntegrationTestCase
DavidGoldman Feb 1, 2022
a148834
Update to build with Xcode 13.2.1
DavidGoldman Feb 2, 2022
f17f58e
Update GitHub Actions' `xcode_version` config to 13.2.1
thii Feb 21, 2022
1c768c8
Fix minor warning in TulsiGenerator
DavidGoldman Feb 3, 2022
fe55135
Updates version number to 0.4.427587075.20220209.
DavidGoldman Feb 10, 2022
e9b40a0
Do not override user-defined output groups
thii Mar 2, 2022
18d0ca9
Add swiftsourceinfo/swiftdoc to list of copied includes (#317)
erikkerber Mar 11, 2022
e241b42
Use an unreleased revision of rules_apple for now (#319)
thii Mar 15, 2022
2b8fbf5
Add support for stub binaries
DavidGoldman Feb 11, 2022
955d42b
Always build Tulsi with WMO for now
thii Mar 20, 2022
2f206d7
Change size of AspectTests
thii Mar 23, 2022
97f645b
Update dependencies
keith Mar 23, 2022
1bb2f18
Add CODEOWNERS
keith Apr 29, 2022
b0c0bf7
Fix CODEOWNERS format
keith May 3, 2022
26fa79d
Update rules_apple
keith May 2, 2022
ebe65c4
Added "ios_dynamic_framework" in filteredFileTypes
ivoleko May 22, 2022
e69bbfb
wip[
wendyliga Apr 21, 2022
791c784
fix typo
wendyliga Apr 21, 2022
b8906ec
Update rules_apple
keith Jun 17, 2022
a93a265
Remove RULES_SWIFT_BUILD_DUMMY_WORKER
keith May 24, 2022
8f0ebdf
Use rolling release for `macos_latest_head_deps`
thii Jul 25, 2022
d8f05bc
Add support for resigning UI tests with the new build system
DavidGoldman Feb 11, 2022
5f6e382
Added announcement banner class for announcing things to Tulsi users
a-googler Feb 16, 2022
3e6c282
Added announcement message to CLI output
a-googler Feb 22, 2022
be38baf
Updates version number to 0.4.433764481.20220310.
DavidGoldman Mar 10, 2022
518f18d
Change default Tulsi location to $HOME/Applications in generate_xcode…
kkpattern Jul 29, 2022
cef8cee
Collect framework paths from xcframework imports (#351)
thii Aug 3, 2022
e91ee77
Add `testonly = True` to `swift_library` targets in tests (#355)
thii Aug 4, 2022
b4c82ea
Add document for integrating Tulsi into project (#354)
kkpattern Aug 4, 2022
5b6ac9e
Fix CI (#375)
thii Oct 12, 2022
f35e8b0
Modified the announcement banner to:
reinhillmann Apr 1, 2022
6791677
Made --mark-read work as an argument to other modes
a-googler Apr 29, 2022
8742b3e
Updates version number to 0.4.447517280.20220509.
ivanhernandez13 May 9, 2022
8ed12dd
Update rules_apple to 1.1.2 (#359)
thii Oct 12, 2022
92f153f
Migrate away from "deps" to "storyboards" and "resources".
nglevin Sep 16, 2022
01af475
Add dummy framework binary to ObjCFramework test target
a-googler Jun 1, 2022
567aa57
Automatic code cleanup.
a-googler Aug 25, 2022
c51ef6b
Internal change.
ivanhernandez13 May 12, 2022
43a7843
Upload `load` statements in Tulsi to use the build-definition-specifi…
a-googler May 17, 2022
3a6d924
Update the Info.plist mtime of any embedded bundles after copying the…
ivanhernandez13 Sep 26, 2022
dd35a9e
Various fixes for the new build system (+ Xcode 14)
DavidGoldman Jun 28, 2022
e6868a2
Use Xcode 13.4.1 on GitHub Actions (#377)
thii Oct 13, 2022
039c5a3
Migrate ObjcConfiguration usage to equivalent info in CppConfiguration
a-googler Jun 27, 2022
ba116fd
Fix a typo from https://github.com/bazelbuild/tulsi/commit/c57119b4bc…
a-googler Jun 27, 2022
ab9fe09
Add arm64 to list of compatible watchOS architectures since Apple Sil…
ivanhernandez13 Aug 18, 2022
db26423
Automatic code cleanup.
a-googler Jul 13, 2022
cd2c862
Internal change.
a-googler Jul 15, 2022
40148d9
Merge branch 'master_upstream' into sync_with_upstream
wendyliga Oct 13, 2022
e561051
fix merge conflict and bump version
wendyliga Oct 13, 2022
f375ed3
add migration message on changelog
wendyliga Oct 13, 2022
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
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build --cpu=darwin_x86_64
build --apple_platform_type=macos
build --compilation_mode=dbg
build --swiftcopt=-whole-module-optimization
build --macos_minimum_os=11.0

# Disable the Swift compilation worker when running integration tests, since it
# requires the protobuf dependency which is infeasible to get working on Bazel.
Expand All @@ -27,3 +28,7 @@ test --curses=no
test --show_timestamps
# This is required for re-invoking bazel in shell tests. CI adds it implicitly
test --test_env=HOME

# Print test logs for failed tests. This makes it easier to debug without
# having to download test logs from CI everytime.
test --test_output=errors
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0rc3
5.3.1
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: macos_latest
uses: bazelbuild/tulsi/.github/workflows/macos.yml@master
with:
bazel: latest
bazel: rolling
name: macos_latest
macos_last_green:
name: macos_last_green
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
type: string
bazel:
type: string
default: latest
default: rolling
xcode_version:
type: string
default: "13.2.1"
default: "13.4.1"
build_targets:
type: string
default: //:tulsi
Expand All @@ -24,7 +24,7 @@ on:

jobs:
macos:
runs-on: macos-11
runs-on: macos-12
env:
USE_BAZEL_VERSION: ${{ inputs.bazel }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ load("@build_bazel_rules_apple//apple:macos.bzl", "macos_application")

package(default_visibility = ["//:__subpackages__"])

licenses(["notice"]) # Apache 2.0
licenses(["notice"])

exports_files(["LICENSE"])

Expand Down Expand Up @@ -79,7 +79,7 @@ macos_application(
"//conditions:default": None,
}),
infoplists = [":Info.plist"],
minimum_os_version = "10.13",
minimum_os_version = "11.0",
strings = [":strings"],
version = ":AppVersion",
visibility = ["//visibility:public"],
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# CHANGELOG

## 0.12.0
<h2>Tulsi++ 0.12.0 </h2>

<h2>⚠️ IMPORTANT:</h2>
<h4>Tulsi++ 0.12.0 and forward will have different codesign credential. This means you need to manually remove your Old Tulsi++ and download and install it manually from <a href="https://github.com/wendyliga/tulsi-plus-plus/releases">here</a><h4>

<h2>Changelog:</h2>
<ol>
<li>Use New Build System by default</li>
<li>Fix Xcode 14 issues</li>
<li>Fix New Build System Issues</li>
<li>Bump minimum macos version to 11.0</li>
<li>Sync with Upstream</li>
</ol>

----

## 0.11.0
<h2>Tulsi++ 0.11.0 </h2>
<ol>
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "build_bazel_rules_apple",
sha256 = "36072d4f3614d309d6a703da0dfe48684ec4c65a89611aeb9590b45af7a3e592",
url = "https://github.com/bazelbuild/rules_apple/releases/download/1.0.1/rules_apple.1.0.1.tar.gz",
sha256 = "90e3b5e8ff942be134e64a83499974203ea64797fd620eddeb71b3a8e1bff681",
url = "https://github.com/bazelbuild/rules_apple/releases/download/1.1.2/rules_apple.1.1.2.tar.gz",
)

load(
Expand Down
100 changes: 43 additions & 57 deletions src/Tulsi/AnnouncementBanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import Cocoa
class AnnouncementBanner: NSView {
let announcement: Announcement

var delegate: AnnouncementBannerDelegate?

let messageView = NSView(frame: CGRect.zero)
let messageLabel = NSTextField(wrappingLabelWithString: "Placeholder")
let dismissButton = NSButton(frame: CGRect.zero)

Expand All @@ -30,22 +33,22 @@ class AnnouncementBanner: NSView {

super.init(frame: CGRect.zero)
wantsLayer = true
layer?.opacity = 1
translatesAutoresizingMaskIntoConstraints = false

messageView.translatesAutoresizingMaskIntoConstraints = false

messageLabel.stringValue = announcement.bannerMessage
messageLabel.setAccessibilityLabel(announcement.bannerMessage)
messageLabel.isBezeled = false
messageLabel.isEditable = false
messageLabel.isSelectable = false
messageLabel.backgroundColor = NSColor.clear
messageLabel.translatesAutoresizingMaskIntoConstraints = false

if announcement.link != nil {
let gestureRecognizer = NSClickGestureRecognizer(
target: self,
action: #selector(openUrl(_:)))
messageLabel.addGestureRecognizer(gestureRecognizer)
messageView.addGestureRecognizer(gestureRecognizer)
}

dismissButton.target = self
Expand All @@ -55,24 +58,19 @@ class AnnouncementBanner: NSView {
dismissButton.isBordered = false
dismissButton.translatesAutoresizingMaskIntoConstraints = false

let accessiblityComment = "Dismisses the announcement banner."
let dismissButtonAccessibilityLabel = NSLocalizedString(
"AnnouncementBanner_DismissButtonAccessibilityLabel",
comment: "Accessibility label for the announcement banner dismiss button")
"AnnouncementBanner_DismissButtonAccessibilityLabel", comment: accessiblityComment)
dismissButton.setAccessibilityLabel(dismissButtonAccessibilityLabel)

// If dark mode is supported, use a system color. Otherwise, default to
// colors that are suitable for light mode.
if #available(macOS 10.14, *) {
layer?.backgroundColor = NSColor.controlAccentColor.cgColor
messageLabel.textColor = NSColor.controlTextColor
dismissButton.attributedTitle = createTitle(withColor: NSColor.controlTextColor)
} else {
layer?.backgroundColor = NSColor.lightGray.cgColor
messageLabel.textColor = NSColor.black
dismissButton.attributedTitle = createTitle(withColor: NSColor.black)
}
dismissButton.image = NSImage(
systemSymbolName: "xmark.circle.fill", accessibilityDescription: accessiblityComment)
dismissButton.contentTintColor = NSColor.white
layer?.backgroundColor = NSColor.systemGray.cgColor
messageLabel.textColor = NSColor.white

self.addSubview(messageLabel)
self.addSubview(messageView)
messageView.addSubview(messageLabel)
self.addSubview(dismissButton)

activateConstraints()
Expand All @@ -89,9 +87,10 @@ class AnnouncementBanner: NSView {
@objc func didClickDismissButton(_ sender: NSButton) {
announcement.recordDismissal()
self.removeFromSuperview()
self.delegate?.announcementBannerWasDismissed(banner: self)
}

@objc func openUrl(_ sender: NSView) {
@objc func openUrl(_ sender: Any?) {
if let link = announcement.link, let url = URL(string: link) {
NSWorkspace.shared.open(url)
}
Expand All @@ -102,45 +101,32 @@ class AnnouncementBanner: NSView {
func activateConstraints() {
removeConstraints(self.constraints)

// Message label constraints
let messageLabelCenterYContstraint = NSLayoutConstraint(
item: messageLabel, attribute: .centerY, relatedBy: .equal, toItem: self,
attribute: .centerY, multiplier: 1, constant: 0)
let messageLabelLeadingConstraint = NSLayoutConstraint(
item: messageLabel, attribute: .leading, relatedBy: .equal, toItem: self,
attribute: .leading, multiplier: 1, constant: margin)
let messageLabelTrailingConstraint = NSLayoutConstraint(
item: messageLabel, attribute: .trailing, relatedBy: .lessThanOrEqual, toItem: dismissButton,
attribute: .leading, multiplier: 1, constant: -margin)
let messageLabelTopConstraint = NSLayoutConstraint(
item: messageLabel, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top,
multiplier: 1, constant: margin)

// Dismiss button constraints
let dismissButtonTrailingConstraint = NSLayoutConstraint(
item: dismissButton, attribute: .trailing, relatedBy: .equal, toItem: self,
attribute: .trailing, multiplier: 1, constant: -margin)
let dismissButtonTopConstraint = NSLayoutConstraint(
item: dismissButton, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top,
multiplier: 1, constant: margin)
let dismissButtonCenterYConstraint = NSLayoutConstraint(
item: dismissButton, attribute: .centerY, relatedBy: .equal, toItem: self,
attribute: .centerY, multiplier: 1, constant: 0)

NSLayoutConstraint.activate([
messageLabelCenterYContstraint, messageLabelLeadingConstraint,
messageLabelTrailingConstraint, messageLabelTopConstraint, dismissButtonTrailingConstraint,
dismissButtonTopConstraint, dismissButtonCenterYConstraint,
])
let views = ["view": messageView, "btn": dismissButton]
let labels = ["msg": messageLabel]

messageView.addConstraints(
NSLayoutConstraint.constraints(
withVisualFormat: "H:|-8-[msg]-8-|", options: .alignAllCenterX, metrics: nil,
views: labels))
messageView.addConstraints(
NSLayoutConstraint.constraints(
withVisualFormat: "V:|-8-[msg]-8-|", options: .directionLeadingToTrailing, metrics: nil,
views: labels))

self.addConstraints(
NSLayoutConstraint.constraints(
withVisualFormat: "H:|-0-[view]-0-[btn]-8-|",
options: NSLayoutConstraint.FormatOptions.alignAllCenterY, metrics: nil, views: views))
messageView.setContentHuggingPriority(.defaultLow, for: .horizontal)
dismissButton.setContentHuggingPriority(.defaultHigh, for: .horizontal)

self.addConstraints(
NSLayoutConstraint.constraints(
withVisualFormat: "V:|-0-[view]-0-|", options: .directionLeadingToTrailing, metrics: nil,
views: views))
}
}

private func createTitle(withColor color: NSColor) -> NSAttributedString {
let pstyle = NSMutableParagraphStyle()

pstyle.alignment = .center

return NSAttributedString(
string: "X",
attributes: [.foregroundColor: color, .paragraphStyle: pstyle])
}
protocol AnnouncementBannerDelegate {
func announcementBannerWasDismissed(banner: AnnouncementBanner)
}
8 changes: 5 additions & 3 deletions src/Tulsi/BUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package(default_visibility = ["//:__subpackages__"])
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")

licenses(["notice"])
package(
default_visibility = ["//:__subpackages__"],
)

load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
licenses(["notice"])

exports_files(["Info.plist"])

Expand Down
Loading