profile
viewpoint

apple/swift-format 1037

Formatting technology for Swift source code

tkremenek/swift 5

The Swift Programming Language

tkremenek/swift-corelibs-foundation 1

The Foundation Project, providing core utilities, internationalization, and OS independence

tkremenek/swift-package-manager 1

The Package Manager for the Swift Programming Language

tkremenek/rouge 0

A pure Ruby code highlighter that is compatible with Pygments

tkremenek/swift-corelibs-xctest 0

The XCTest Project, A Swift core library for providing unit test support

tkremenek/swift-lldb 0

This is the version of LLDB that supports the Swift programming language & REPL.

tkremenek/swift-source-compat-suite 0

The infrastructure and project index comprising the Swift source compatibility suite.

push eventapple/swift-evolution

Kyle Macomber

commit sha 9d5c3a22cb697cdddedddd74e8d43b8a9018b2d6

SE-0282 update link to atomics package (#1195)

view details

push time in 19 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventapple/swift

Saleem Abdulrasool

commit sha 86ddf43790d53cfc0c2313dc77492096991ed927

build: allow falling back to just built compiler When the native tools are sparse, and the toolchain is not being cross-compiled, it is possible to fallback to the just built compiler for running the tests. Adjust the build rules to permit this.

view details

Ted Kremenek

commit sha 4ab793392ff48173ceaf11caa629258de3d07042

Merge pull request #33947 from compnerd/5.3-test build: allow falling back to just built compiler

view details

push time in a month

PR merged apple/swift

build: allow falling back to just built compiler r5.3

When the native tools are sparse, and the toolchain is not being cross-compiled, it is possible to fallback to the just built compiler for running the tests. Adjust the build rules to permit this.

<!-- What's in this pull request? --> Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

<!-- If this pull request resolves any bugs in the Swift bug tracker, provide a link: --> Resolves SR-NNNN.

<!-- Before merging this pull request, you must run the Swift continuous integration tests. For information about triggering CI builds via @swift-ci, see: https://github.com/apple/swift/blob/master/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift! -->

+10 -2

3 comments

2 changed files

compnerd

pr closed time in a month

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

push eventapple/swift

Joe Groff

commit sha ba8362e5bc342a3947ebc56790c761d1ed629cdb

Stop ReplaceOpaqueTypesWithUnderlyingTypes recursion if it hits a fixpoint. This can happen when a non-substitutable opaque type appears in structural position, such as the root of an associated type archetype. Fixes rdar://problem/67040429.

view details

Ted Kremenek

commit sha 377a3bd8293abe10e635761be52b9130ba1e0271

Merge pull request #33880 from jckarter/replace-opaque-types-terminate-on-fix-point-5.3 [5.3] Stop ReplaceOpaqueTypesWithUnderlyingTypes recursion if it hits a fixpoint

view details

push time in a month

PR merged apple/swift

[5.3] Stop ReplaceOpaqueTypesWithUnderlyingTypes recursion if it hits a fixpoint r5.3

Explanation: The compiler would get stuck in an infinite loop when trying to substitute opaque types with associated types, such as some Gesture in SwiftUI.

Scope: Crash when trying to write custom Gesture types in SwiftUI.

Issue: rdar://problem/67040429

Reviewed by: @aschwaighofer

Risk: Low

+27 -2

2 comments

3 changed files

jckarter

pr closed time in a month

PullRequestReviewEvent

push eventapple/swift

Mishal Shah

commit sha 07c379c01bb7c97834e9420be3da8d49ab54f1b0

[Preset] Source compat suite cross compile for macOS arm64 (cherry picked from commit bfef9d4b1263a3d9a62be1522e685ed43e678d28)

view details

Mishal Shah

commit sha 400008591e99faede583ebf6a790fb69f6a99fbb

[Build System] Move host lipo step after install step (cherry picked from commit c123f4206f2fda4d5e75d3c6eaec03ccad7df62f)

view details

Mishal Shah

commit sha e56821c648b580d90f2d26eb0bccdbdecbec798a

Remove old symlink before creating new symlink (cherry picked from commit d52a159903dd1b5c6a19b7248fb2644b091d1322)

view details

Mishal Shah

commit sha d5298f9a026ef2ed5cff70976c368a81d772647f

Clean up the whitespace in build-script (cherry picked from commit e54127b15214c30a15de2775826b5b48e349d89d)

view details

Davide Italiano

commit sha a4356ab82312a3e2e67defa777b3f26c045a1b41

[CMake] Remove a redundant and potentially incorrect check. There's a more robust check for which SDK to support already. This also misses `arm64` as architecture. (cherry picked from commit ca3d37f1143eca702f8ba327d872e0d069f6b184)

view details

Ted Kremenek

commit sha 8a07bc279b263bddd9fda0bdc759264e94cdf051

Merge pull request #33779 from apple/shahmishal/5.3-source-compat-suite [5.3] [Preset] Source compat suite cross compile for macOS arm64

view details

push time in 2 months

delete branch apple/swift

delete branch : shahmishal/5.3-source-compat-suite

delete time in 2 months

PR merged apple/swift

[5.3] [Preset] Source compat suite cross compile for macOS arm64 r5.3

master PR - https://github.com/apple/swift/pull/33297

+10 -20

5 comments

4 changed files

shahmishal

pr closed time in 2 months

PullRequestReviewEvent
MemberEvent
MemberEvent

push eventapple/swift

Saleem Abdulrasool

commit sha 21a4b135529dc83efb4065333e12328c1b77054a

build: repair the build for newer MSVC release The newer VS2019 releases require conditional explicit support from C++2a unconditionally. This was added into the newer clang, but the clang for the 5.3 release does not have this. Add this workaround instead.

view details

Ted Kremenek

commit sha 5e0d42e9a6e8298eb2e4b9ecc4b98c1d164da96e

Merge pull request #33673 from compnerd/5.3-VS2019-16.27 build: repair the build for newer MSVC release

view details

push time in 2 months

PR merged apple/swift

build: repair the build for newer MSVC release r5.3

The newer VS2019 releases require conditional explicit support from C++2a unconditionally. This was added into the newer clang, but the clang for the 5.3 release does not have this. Add this workaround instead.

<!-- What's in this pull request? --> Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

<!-- If this pull request resolves any bugs in the Swift bug tracker, provide a link: --> Resolves SR-NNNN.

<!-- Before merging this pull request, you must run the Swift continuous integration tests. For information about triggering CI builds via @swift-ci, see: https://github.com/apple/swift/blob/master/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift! -->

+12 -0

3 comments

2 changed files

compnerd

pr closed time in 2 months

PullRequestReviewEvent

push eventapple/swift

Slava Pestov

commit sha 38fed6509a8bd61ac190508e53bbea450aca3c34

ASTDemangler: Fix reconstruction of opaque result type defined in a constrained extension The mangling includes all generic parameters, even non-canonical ones. Fixes <rdar://problem/67949286>.

view details

Ted Kremenek

commit sha 27f2cec0008f8f99bb78f2f2e91fb5e08e123e5d

Merge pull request #33709 from slavapestov/fix-opaque-type-decl-in-constrained-extension-5.3 ASTDemangler: Fix reconstruction of opaque result type defined in a constrained extension [5.3]

view details

push time in 2 months

PR merged apple/swift

ASTDemangler: Fix reconstruction of opaque result type defined in a constrained extension [5.3] r5.3

The mangling includes all generic parameters, even non-canonical ones.

Fixes rdar://problem/67949286.

+14 -10

1 comment

2 changed files

slavapestov

pr closed time in 2 months

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

push eventapple/swift

Saleem Abdulrasool

commit sha 6be8b33375e71c9e779edd25a0b67ee98a257f81

test: repair Serialization.autolinking after #33379 The order of attribution was swapped which failed on platforms which use `comdat` (i.e. Windows).

view details

Ted Kremenek

commit sha 40eb19d1f7b05e93dcf6883de8b831fd483b3957

Merge pull request #33568 from compnerd/33379-5.3 test: repair Serialization.autolinking after #33379

view details

push time in 2 months

PR merged apple/swift

test: repair Serialization.autolinking after #33379 r5.3

The order of attribution was swapped which failed on platforms which use comdat (i.e. Windows).

<!-- What's in this pull request? --> Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

<!-- If this pull request resolves any bugs in the Swift bug tracker, provide a link: --> Resolves SR-NNNN.

<!-- Before merging this pull request, you must run the Swift continuous integration tests. For information about triggering CI builds via @swift-ci, see: https://github.com/apple/swift/blob/master/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift! -->

+2 -2

2 comments

1 changed file

compnerd

pr closed time in 2 months

PullRequestReviewEvent

push eventapple/swift

Pavel Yaskevich

commit sha 4de7ea1a0f5907235dc237f02e5b9d975d802084

[FunctionBuilders] Implement graceful handling of pre-check failures Function builder bodies are applied in several stages. First of them is `pre-check` stage which is, among other things, responsible for member lookup and reference resolution, if that action fails it would be diagnosed inline and affected expression is going to be replaced with `ErrorExpr`. This works fine in context of regular expressions but not function builders, because matching of function builder bodies happens in the middle of type-checking of enclosing context, so solver needs to implement graceful handling of such problems and delay diagnostics until solver reaches a solution. To accommodate that `PreCheckFunctionBuilderRequest`, `ConstraintSystem::preCheckExpression`, and `TypeChecker::resolveDeclRefExpr` have been adjusted to know explicitly whether diagnosing and AST mutation is permitted. Solver is adjusted to ignore closure bodies which fail pre-check in their entirety. Resolves: rdar://problem/65320500

view details

Ted Kremenek

commit sha 2b8d3ea4a120b5dfd4de2d49590eb5905fef262e

Merge pull request #33614 from xedin/rdar-65320500-5.3 [5.3][FunctionBuilders] Implement graceful handling of pre-check failures

view details

push time in 2 months

PR merged apple/swift

[5.3][FunctionBuilders] Implement graceful handling of pre-check failures r5.3

Cherry-pick of https://github.com/apple/swift/pull/33509


  • Explanation:

Function builder bodies are applied in several stages. First of them is pre-check stage which is, among other things, responsible for member lookup and reference resolution, if that action fails it would be diagnosed inline and affected expression is going to be replaced with ErrorExpr.

This works fine in context of regular expressions but not function builders, because matching of function builder bodies happens in the middle of type-checking of enclosing context, so solver needs to implement graceful handling of such problems and delay diagnostics until solver reaches a solution.

To accommodate that PreCheckFunctionBuilderRequest, ConstraintSystem::preCheckExpression, and TypeChecker::resolveDeclRefExpr have been adjusted to know explicitly whether diagnosing and AST mutation is permitted. Solver is adjusted to ignore closure bodies which fail pre-check in their entirety.

  • Scope: Limited to function builder bodies with incorrect references in them e.g. non-existent global functions, names with typos etc.

  • Resolves: rdar://problem/65320500

  • Risk: Low

  • Testing: Added regression tests

  • Reviewer: @hborla, @DougGregor

Resolves: rdar://problem/65320500

<!-- Before merging this pull request, you must run the Swift continuous integration tests. For information about triggering CI builds via @swift-ci, see: https://github.com/apple/swift/blob/master/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift! -->

+232 -45

3 comments

14 changed files

xedin

pr closed time in 2 months

PullRequestReviewEvent

startedIdeaShakerLab/dem-to-stl

started time in 2 months

startedBondtechAB/Bondtech_Prusa_i3

started time in 2 months

MemberEvent
MemberEvent

push eventapple/swift

John McCall

commit sha 8128abac964a9b56e03a3a207b43a1bcd6e2a0fb

Add default IR attributes to helper functions and convert several more places to use getOrCreateHelperFunction. This means that several of these places are now emitting shared functions rather than private ones, which I've verified is okay. There are some other places where privacy is still unfortunately necessary. I've also fixed the name of the store-extra-inhabitants helper function to say "store" instead of "get", which is longstanding (but harmless because it's private). Fixes rdar://66707994.

view details

Ted Kremenek

commit sha 4ee498b19c4b3905292596746d97a68b4ca54a00

Merge pull request #33389 from rjmccall/default-attribute-helpers-5.3 [5.3] Add default IR attributes to helper functions

view details

push time in 2 months

PR merged apple/swift

Reviewers
[5.3] Add default IR attributes to helper functions r5.3

Add default IR attributes to helper functions and convert several more places to use getOrCreateHelperFunction.

This means that several of these places are now emitting shared functions rather than private ones, which I've verified is okay. There are some other places where privacy is still unfortunately necessary.

I've also fixed the name of the store-extra-inhabitants helper function to say "store" instead of "get", which is longstanding (but harmless because it's private).

Fixes rdar://66707994.

This is the 5.3 equivalent to #33379. It's just a direct cherry-pick, not an attempt to minimize.

+437 -292

9 comments

11 changed files

rjmccall

pr closed time in 2 months

PullRequestReviewEvent
MemberEvent
MemberEvent
MemberEvent
MemberEvent
MemberEvent

push eventapple/swift

Brent Royal-Gordon

commit sha 876d68985310b0339fd14c47a531374b1c158108

[NFC] Rework serialization changes in #32811 This tweaks the implementation of SE-0285 to preserve backwards compatibility with the previous module serialization format. Existing default arguments all keep their previous values when serialized; #fileID and Swift 6 #file are given previously unused values. Fixes rdar://66810027.

view details

Ted Kremenek

commit sha 2f10d43858777b41c3bbf7b62d95f3411b5ddc90

Merge pull request #33416 from brentdax/serialization-killer [NFC] Rework serialization changes in #32811

view details

push time in 2 months

PR merged apple/swift

[NFC] Rework serialization changes in #32811 r5.3

This tweaks the implementation of SE-0285 to preserve backwards compatibility with the previous module serialization format. Existing default arguments all keep their previous values when serialized; #fileID and Swift 6 #file are given previously unused values.

Fixes rdar://66810027.

+4 -4

1 comment

1 changed file

brentdax

pr closed time in 2 months

MemberEvent
MemberEvent

push eventapple/swift

Slava Pestov

commit sha d5a7cc4d3322ffef6dff6e4f3567a239f2723a94

Sema: Fix crash on circular reference in checkContextualRequirements() The call to getGenericSignature() might return nullptr if we encounter a circular reference. Fixes <rdar://problem/64992293>.

view details

Ted Kremenek

commit sha fc4539767b04ffe84ed1f8a326a7f4e64109ff82

Merge pull request #33350 from CodaFi/a-circle-most-vicious [5.3] Fix crash on circular reference in checkContextualRequirements()

view details

push time in 2 months

PR merged apple/swift

[5.3] Fix crash on circular reference in checkContextualRequirements() r5.3

Cherry pick of https://github.com/apple/swift/pull/32776


  • Explanation:

If a circularity issue is diagnosed while resolving a type’s generic signature, the resulting generic signature is null. Clients like type resolution must handle this case explicitly. This patch shores up a case where we did not consider this possibility. It provides a narrow fix for a class of crash-on-invalid bugs that often manifest when users are in the middle of editing code.

  • Scope: rdar://66287881 shows that users encounter this crash with some regularity while editing code.

  • Resolves: rdar://problem/66656428, rdar://64992293, rdar://66287881

  • Risk: Very Low

  • Testing: Added regression tests

  • Reviewer: @slavapestov, @CodaFi

+22 -1

2 comments

2 changed files

CodaFi

pr closed time in 2 months

push eventapple/swift

Nate Chandler

commit sha 43a2929d403b9d7be38dd0857152f160c6b5c34e

[IRGen] Add main() to __swift5_entry. To enable lookup of the entry point, emit a pointer to that entry point into a new section; on MachO, the __swift5_entry section of the __TEXT segment. rdar://problem/66402358

view details

Nate Chandler

commit sha ec8873e2cbff7038d428134571ea000e9ecd9194

[__swift5_entry] Do not emit segment for repl.

view details

Ted Kremenek

commit sha 94929b6fc50b2a5f082cae541a75e2e97a51766f

Merge pull request #33269 from nate-chandler/emit-main-into-entry-segment-53 [5.3] [IRGen] Add main() to __swift5_entry.

view details

push time in 3 months

PR merged apple/swift

Reviewers
[5.3] [IRGen] Add main() to __swift5_entry. r5.3

To enable lookup of the entry point, emit a pointer to that entry point into a new section; on MachO, the __swift5_entry section of the__TEXT segment.

PR against master: https://github.com/apple/swift/pull/33246

rdar://problem/66402358

+109 -2

13 comments

5 changed files

nate-chandler

pr closed time in 3 months

push eventapple/swift

Pavel Yaskevich

commit sha 09968d2ee6d69dd75922b1d2229e2b608cf03512

[Diagnostics] Do more checking before recording `force downcast` fix Solver should do more checking upfront before recording `force downcast` fix, to make sure that it's indeed always applicable when recorded, otherwise it would be possible to misdiagnose or omit diagnostics in certain situations. Resolves: rdar://problem/65254452 (cherry picked from commit d89c096af75524dd5e1cf7bc2d1d0fb43997db9c)

view details

Ted Kremenek

commit sha a277175247c45107d177485d9dfb9e75eed04d4e

Merge pull request #33273 from xedin/rdar-65254452-5.3 [5.3][Diagnostics] Do more checking before recording `force downcast` fix

view details

push time in 3 months

PR merged apple/swift

[5.3][Diagnostics] Do more checking before recording `force downcast` fix r5.3

Cherry-pick of https://github.com/apple/swift/pull/33272


  • Explanation:

Solver should do more checking upfront before recording force downcast fix, to make sure that it's indeed always applicable when recorded, otherwise it would be possible to misdiagnose or omit diagnostics in certain situations.

  • Scope: Limited to situations when it is possible to find an ObjC bridged type for right-hand side of the conversion ("to" type) but the other side ("from" type) can't be bridged to such a type.

  • Resolves: rdar://problem/65254452

  • Risk: Very Low

  • Testing: Added regression tests

  • Reviewer: @hborla

Resolves: rdar://problem/65254452 (cherry picked from commit d89c096af75524dd5e1cf7bc2d1d0fb43997db9c)

<!-- Before merging this pull request, you must run the Swift continuous integration tests. For information about triggering CI builds via @swift-ci, see: https://github.com/apple/swift/blob/master/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift! -->

+23 -2

1 comment

3 changed files

xedin

pr closed time in 3 months

MemberEvent

push eventapple/swift

Alexis Laferrière

commit sha d8b774258f04304333563966c04853308244ccfa

[Sema] Warn when exporting implementation-only types in SPI Downgrade to a warning the diagnostics on the use of an implemenetation-only type in SPI to allow support for -experimental-spi-imports. rdar://66336527

view details

Ted Kremenek

commit sha da8aff0bc6af81b955b6c5cae78a55f225be323e

Merge pull request #33213 from xymus/spi-ioi-check-workaround-5.3 [5.3][Sema] Warn on exporting implementation-only imported types in SPI

view details

push time in 3 months

PR merged apple/swift

[5.3][Sema] Warn on exporting implementation-only imported types in SPI r5.3

This completes type-checking work for #32902. Bringing back the diagnostic on exporting implementation-only imported types in SPI as a warning. This check was previously reverted from 5.3, and now it can be valid when relying solely on swiftmodule files or when using -experimental-spi-imports. This is part of a staged transition to a long term language feature of imports as SPI.

  • Scope of Issue: This is affecting projects using both @_implementationOnly and @_spi.
  • Origination: Introduction of @_spi, and revert in #32552.
  • Risk: Low, this only adds a warning on decls marked with @_spi.
  • Resolves: rdar://66336527
+118 -32

2 comments

3 changed files

xymus

pr closed time in 3 months

push eventapple/swift

Brent Royal-Gordon

commit sha df260af40bae6e1bbbdda0bc08020be9a2ecc496

Mark main() as used …except when the integrated REPL is in use. This prevents dead code stripping from removing the main() function used in widgets. Fixes rdar://65862827.

view details

Ted Kremenek

commit sha a8dcb578aca1c272705c41895a56ee2fae4b4768

Merge pull request #33177 from brentdax/they-buffed-my-main-5.3 [5.3] Mark main() as used

view details

push time in 3 months

PR merged apple/swift

[5.3] Mark main() as used r5.3

…except when the integrated REPL is in use. This prevents dead code stripping from removing the main() function used in widgets.

Fixes rdar://65862827.

+18 -4

16 comments

2 changed files

brentdax

pr closed time in 3 months

MemberEvent
more