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

Conversation

wendyliga
Copy link
Owner

@wendyliga wendyliga commented Oct 13, 2022

Tulsi++ 0.12.0

⚠️ IMPORTANT:

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 here

Changelog:

  1. Use New Build System by default
  2. Fix Xcode 14 issues
  3. Fix New Build System Issues
  4. Bump minimum macos version to 11.0
  5. Sync with Upstream

cpsauer and others added 30 commits September 10, 2021 13:17
External BuildLabels were keeping their // halfway through their path, leading to projects xcode would refuse to load.

As an example: @google_toolbox_for_mac//Foundation:BUILD was going to external//Foundation/BUILD, not external/Foundation/BUILD.
This lead the pbjproj to assign the file the path //Foundation/BUILD, which Xcode refuses to load, along with groups named '/' and the omission of other associated source files.
…le Execroot (#255)

* Fix breaking of external workspaces after builds

Previously, paths to files in external workspaces went through execroot.
Execroot is reconfigured on every rebuild to contain only the external
workspaces (and top-level packages) required by that build. Therefore,
executing a build that used a subset of the project's external
workspaces broke the file references and include paths for the other
external workspaces. Bad times.

This commit points to external workspaces through the stable external
subdirectory of output_base instead of the unstable external subdir
of execroot. This requires a new tulsi symlink for output base; Xcode
doesn't properly resolve ../ paths through symlinks for file references.
Plus, we should probably try to move away from linking through a
temporary build sandbox anyway; it'll just keep leading to subtle bugs.

This should close bazelbuild/tulsi#164
This patches bazelbuild/tulsi#227 and
bazelbuild/tulsi#229.

This commit also contains a fix for an (I think unreported) bug I
noticed while editing ProjectPatcher. In trying to fix paths for files
not on disk, it was unintentionally setting their paths to (an
incorrect) path that was group relative, but meant to be project
relative. It also created inconsistent state in the PBGroup hierarchy.
Since this fixes the paths for generated Info.plists in most projects,
it leads to many of the file ref path changes in the tests. The code
now does what the author clearly intended, and I've added some defence
against future issues into PBXObjects.

* Make execroot symlink's names reflect what it is

tulsi-workspace -> tulsi-execution-root
TULSI_BWRS -> TULSI_EXECUTION_ROOT

* Re-add legacy names for execroot build setting and symlink for backwards compatibility

Fixes bazelbuild/tulsi#164.
…i's E2E tests.

PiperOrigin-RevId: 367058875
(cherry picked from commit debe5ac)
…plicit module maps. LLDB will transitively include an option that disables implicit module maps when importing a Swift module that depends on an Objective-C library that was built with explicit modules. Depending on the build graph, this can mean LLDB's clang module importer can fail to find the required module maps and provide no debug info.

PiperOrigin-RevId: 371927956
(cherry picked from commit dbb0fc4)
PiperOrigin-RevId: 372147605
(cherry picked from commit 5ef399c)
PiperOrigin-RevId: 373199701
(cherry picked from commit 9939243)
PiperOrigin-RevId: 374475916
(cherry picked from commit ee965f2)
PiperOrigin-RevId: 374489201
(cherry picked from commit 21cc1c8)
…he of any modules that are found in a metadata file that is intended to be created by a bazel aspect that collects explicit module build outputs. This tool is needed to avoid a crash with LLDB that occurs when the LLDB module cache contains a module that is also generated in a build as an explicit module.

This chnage handles reading metadata files that a bazel aspect will write to come up with a list of names of all explicit modules that will have been created from a build.

PiperOrigin-RevId: 378248354
(cherry picked from commit 078e311)
…he of any modules that are found in a metadata file that is intended to be created by a bazel aspect that collects explicit module build outputs. This tool is needed to avoid a crash with LLDB that occurs when the LLDB module cache contains a module that is also generated in a build as an explicit module.

This change handles reading the contents of the implicit module cache and map the name of each module to the absolute path of that module.

PiperOrigin-RevId: 378402314
(cherry picked from commit a03f6ef)
…he of any modules that are found in a metadata file that is intended to be created by a bazel aspect that collects explicit module build outputs. This tool is needed to avoid a crash with LLDB that occurs when the LLDB module cache contains a module that is also generated in a build as an explicit module.

To summarize how this works:
 - Read the contents of the implicit module cache and map the name of each module to the absolute path of that module.
 - Read metadata files that a bazel aspect will write to come up with a list of names of all explicit modules created from a build.
 - Iterate through the list of explicit module names and delete any module with the same name from the implicit module cache.
 - Compute a hash of the list of explicit module names that were used to prune the implicit module cache.
 - Save that hash to a special sentinel file in the implicit module cache.
 - Compare the hash of subsequent builds to the one in the file to determine if subsequent builds should prune the implicit module cache.

PiperOrigin-RevId: 378666180
(cherry picked from commit 55b6a92)
Disable this as it can annoy users; we're working on new build system support.

PiperOrigin-RevId: 378916679
(cherry picked from commit 3f25dd7)
…ests.

Tulsi doesn't allow list ios_static_framework rules, so the e2e test appears to ignore this target.

PiperOrigin-RevId: 378933587
(cherry picked from commit 31da848)
…f Unstable Execroot (#255)"

This reverts commit c7609aa.
…ule in the build graph to use Swift explicit modules.

  - Updates the Tulsi outputs aspect to output the Swift explicit modules generated from a build.
  - Bundles the module cache pruning tool with the Tulsi app bundle and installs it to the same location as the bazel_cache_reader.
  - Runs the module cache pruning tool after each Tulsi build, providing the output from the aspect, to prevent lldb from loading the outdated implicit module.

PiperOrigin-RevId: 378936605
(cherry picked from commit 98d6f25)
Significant changes:
- Fixed a crash with lldb-rpc-server that can occur after
  migrating a rule to use Swift explicit modules.

PiperOrigin-RevId: 379284179
(cherry picked from commit e4fcc3c)
…eeding to explicitly drop the return value when not using it.

PiperOrigin-RevId: 382075141
(cherry picked from commit 552b356)
This allows us to remove the special internal entitlements rule and convert nearly all of the existing macro-wrapped rules into pure rules, with the exception of some macOS rules which still have some straggling items to migrate.

PiperOrigin-RevId: 382347912
(cherry picked from commit 286d21b)
…isabled by default. bazel_cache_reader has been observed to result in significant hits to symbolication in some cases.

PiperOrigin-RevId: 382537207
(cherry picked from commit 6fe2926)
PiperOrigin-RevId: 382571317
(cherry picked from commit d3e3536)
Significant changes:
- Unsupported tests in test_suites are now skipped instead of
  throwing an error.
- Disable fallback dSYM searching by default. The fallback can be
  reenabled with the "Enable fallback dSYM searches" option.
  Reenabling is only recommended if Spotlight is disabled as it
  can impact time to symbolicate a binary.
- Fixed a crash with lldb-rpc-server that can occur after
  migrating a rule to use Swift explicit modules.

PiperOrigin-RevId: 384527057
(cherry picked from commit 7440ba0)
PiperOrigin-RevId: 386871254
(cherry picked from commit febfc91)
Show the entire diff at once instead of line-by-line

PiperOrigin-RevId: 389889488
(cherry picked from commit d16d184)
```
buildfiles(deps($T1)+deps($T2)+deps($T3)+[...])
```

is equivalent to, but generally much slower than

```
buildfiles(deps($T1+$T2+$T3+[...]))
```

PiperOrigin-RevId: 389912462
(cherry picked from commit a5ef86e)
Also fix an issue with the OSS tests.

PiperOrigin-RevId: 390164332
(cherry picked from commit d1a4d3c)

#  Conflicts:
# 	.bazelci/presubmit.yml
# 	.bazelrc
# 	WORKSPACE
Significant changes:
- Improved performance when querying for BUILD/bzl files

PiperOrigin-RevId: 391546363
(cherry picked from commit 53d31b0)
- Use the newer `--run_validations` flag
- Disable the `dsyms` output group that some folks might manually enable by accident

PiperOrigin-RevId: 393791135
(cherry picked from commit 043040df1bc175b5f71d7af80877af0fa98e28f1)
PiperOrigin-RevId: 396918740
(cherry picked from commit f151befb3900ae1f122fdf5a4dc2b0870dffd95c)
Updated to be in sync with our current Xcode target of Xcode 12.5.1

PiperOrigin-RevId: 399783838
(cherry picked from commit a3dec4cc165ca4044215f523bac06b1bf7623861)
Googler and others added 27 commits July 26, 2022 07:27
This is currently not used.

PiperOrigin-RevId: 430227601
(cherry picked from commit f1104d368fb47fcdfbeb2e0d89c4b960920219a1)
Significant changes:
- Added a mechanism to create announcement messages in Tulsi CLI
  output
- Added a dismissible announcement mechanism.

PiperOrigin-RevId: 433782888
(cherry picked from commit 023e5751f849ea5d3a7d69117e35106b90b84734)
…proj.sh

build_and_run.sh now install to $HOME/Applications by default. Change
the default Tulsi location in generate_xcodeproj.sh to sync with this.
This ensures framework search paths are collected properly for indexing
targets.
- Use Bazel rolling as the default, latest rules_apple requires this.
- Disable `--incompatible_unambiguous_label_stringification` in tests
- Add missing `testonly = True` attribute
- Disable testing on BazelCI, this is already covered by GitHub Actions
  anyways.
1. Not overlap the other controls on the splash screen
2. Accept clicks on the entire banner, not just the label
3. Have more muted colors that work both in light and dark mode

Also bumped the target macOS version to 11.0

PiperOrigin-RevId: 438868252
(cherry picked from commit 2ae8dd5968567c5ef69f3a90022e6ba1145bc64a)
PiperOrigin-RevId: 445422722
(cherry picked from commit 4b8a5444a426bd687edfc10f121837065489ae3f)
Significant changes:
- --mark-read can now be used as an argument to any command.
- Improved the notifications banner and bumped min macOS version
  to 11.0.

PiperOrigin-RevId: 447526365
(cherry picked from commit 603b61479ca7e561526977f75a47aa0967646e55)
"deps" implies code dependencies, which the existing watchos_application rule does not support. However, single target watchOS applications which will be supported by a watchos_single_target_application rule and eventually the watchos_application rule itself do own code dependencies. That changes the meaning of "deps" as it is used today.

The "deps" attr will be removed from the watchos_application in a future change on rules_apple, which will be tracked in [].

PiperOrigin-RevId: 474890643
(cherry picked from commit 6b532f6e877bdae7ec30f0c68940eb5f4f3590a6)
Apple framework import rules processing will now enforce framework
bundles include a binary file with the same name as the framework bundle.
This change adds a dummy framework binary file to the `ObjCFramework`
test target to conform to this (future) enforcement.

PiperOrigin-RevId: 452401907
(cherry picked from commit c454b1dc22d4c8f99326026491342a991abb8a91)
PiperOrigin-RevId: 470000427
(cherry picked from commit 152c55885b3913fa4a7e0f440e8da9f8b34e5397)
PiperOrigin-RevId: 448328593
(cherry picked from commit ff519ded6a897ec2375bbdd5e4ca845e474d0680)
…c files instead of the umbrella `swift.bzl`.

PiperOrigin-RevId: 449304144
(cherry picked from commit 3ffd508789877221a145c6028aa1f146b57cac9f)
… Bazel build artifacts over to DerivedData. This matches Xcode behavior and more importantly prevents an issue on iOS 16 or newer devices where incrmeental installations fail due to delta bundles not having a bundle ID because they don't have an Info.plist.

PiperOrigin-RevId: 476908178
(cherry picked from commit fc3edc67433192d4742d80de49a6ffbb58e76d63)
- Add resigner targets to test_suite targets' schemes so the test
  suites schemes work properly
- Mark our build script as always needing to run (always out of date)
  since we always need to run bazel to make sure it's up to date.
- Don't disable signing for iOS simulator since we still need Xcode
  to codesign the test runner + injected dylibs.
- Resign the new XCTestSupport.framework

PiperOrigin-RevId: 457805542
(cherry picked from commit b28485834eafe807c3a3bac0484801b20e98c7ac)
The workflows reference the master branch so has to be done before
bazelbuild/tulsi#369.
We would like to migrate all such usage to CppConfiguration so that we
can delete the info in ObjcConfiguration.

PiperOrigin-RevId: 457484452
(cherry picked from commit c57119b4bc6c1ce34cc4f331fb359c973276f940)
PiperOrigin-RevId: 457510067
(cherry picked from commit f423a52ad4199c0826348f553a1cab61ab587797)
…icon machines will create arm64 watch simulators. This change also dynamically determines the target architecture when building for watch simulators because Xcode sets both x86_64 and arm64 when building for watch simulator so we need to dynamically determine the architecture we need based on the architecture of the host machine.

PiperOrigin-RevId: 468340824
(cherry picked from commit 6e039178388e436f8d61e0bcff7adc750d41db4e)

 Conflicts:
	src/TulsiGenerator/DeploymentTarget.swift
	src/TulsiGenerator/Scripts/bazel_build.py
PiperOrigin-RevId: 460756259
(cherry picked from commit 057bfb3dfe53769b60d8e9aec3597f9d8a2dacea)

 Conflicts:
	src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl
PiperOrigin-RevId: 461256470
(cherry picked from commit a35154e043cf388975d98edcb350cc1bd25411c0)
@wendyliga wendyliga self-assigned this Oct 13, 2022
@wendyliga wendyliga merged commit 15cdcbe into main Oct 13, 2022
@wendyliga wendyliga deleted the sync_with_upstream branch October 13, 2022 10:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.