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

Sync with upstream #46

Merged
merged 50 commits into from
Jan 5, 2022
Merged

Sync with upstream #46

merged 50 commits into from
Jan 5, 2022

Conversation

wendyliga
Copy link
Owner

No description provided.

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)
ivanhernandez13 and others added 20 commits December 21, 2021 14:07
PiperOrigin-RevId: 404053261
(cherry picked from commit 4fd4d4caa99220b55fb592488bddc89c73b86d22)
PiperOrigin-RevId: 406138012
(cherry picked from commit 152959785010edc7cc99afde2bbb5e6a54f0a5bf)
Also remove some sneaky semicolons.

PiperOrigin-RevId: 406397098
(cherry picked from commit fe0cc3c1f39cf9d66346dbba45f795900e1b9a73)
Just have some hashable warnings left now plus
2 xibs with clipping warnings.

PiperOrigin-RevId: 407392908
(cherry picked from commit ec25d2f8b4076d7bfeb17ae1b5a925e3dc512aa1)
PiperOrigin-RevId: 408976515
(cherry picked from commit 619e87e1db4c72a59a37803978bd9eba06cea2db)
…nstead of Unstable Execroot (#255)""

This reverts commit c681436feee92d038b6cf87343771ffae667afc2.
PiperOrigin-RevId: 411826911
(cherry picked from commit 45060a05093fd8614680d298456b78ae2d381986)
Xcode 13 adds new frameworks which are injected into the test runner.
These must be resigned as well otherwise the app will fail to install
due to a certificate expired/revoked error.

PiperOrigin-RevId: 417654389
(cherry picked from commit 7ff52cd4f8482bac6db148be1c5dea3408a7dd80)
The new build system isn't officially supported yet, so I've added
this flag in preparation for support although it's `true` (legacy)
by default.

This should supplement #277 although I haven't thoroughly tested the new build system support (especially on device + for tests) yet.

PiperOrigin-RevId: 417654737
(cherry picked from commit 2cbc9236818025b471689bd8a1810e6c0655a18a)
…s` to make Tulsi works with projects that are still using Bazel 4 (#297)

Note that building Tulsi itself still requires Bazel 5.0+.
@wendyliga wendyliga merged commit 84fbaf7 into main Jan 5, 2022
@wendyliga wendyliga deleted the sync_with_upstream branch January 5, 2022 07:03
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.

6 participants