Commit Graph

950 Commits

Author SHA1 Message Date
Richard Howell
a04ddefb10 Do not prefix relative SDK paths twice 2024-09-27 14:28:06 -07:00
Meghana Gupta
0c3d10c8fa [NFC] Fix indentation on ModuleInterface/nonescapable_types.swift 2024-09-16 14:08:19 -07:00
Meghana Gupta
58c6a2fb31 Merge pull request #76455 from meg-gupta/enablestdlib
Enable NonEscapableTypes in standard library and make the feature suppressible
2024-09-16 11:52:41 -07:00
Meghana Gupta
68bfc0d3b4 Make NonEscapableTypes as a suppressible experimental feature 2024-09-13 13:13:17 -07:00
elsh
60f1ea4f85 Revert "Revert "Do not print package-name in non-package interface by default.""
This reverts commit 4b8e76fbeb.
2024-09-13 08:20:50 -07:00
Artem Chikin
1ce178bc11 Merge pull request #76372 from artemcm/PrebuiltModulesEnvVar
[Prebuilt Module Cache] Add an environment variable overload to specify location of the prebuilt module cache
2024-09-11 13:07:53 -07:00
Artem Chikin
12b7df87ee [Prebuilt Module Cache] Add an environment variable overload to specify location of the prebuilt module cache
Useful for allowing e.g. CI systems to share this parameter without needing to plumb through a new compiler flag everywhere

Resolves rdar://135033114
2024-09-11 09:36:45 -07:00
Alex Hoppen
cd1f02d314 Merge pull request #76330 from swiftlang/value-generics-no-parser-round-trip 2024-09-08 00:16:40 -07:00
Ellie Shin
5f41d084c7 Merge pull request #76315 from swiftlang/elsh/check-interface-srckind
[PackageInterface] Fix isInterfacePackageEffectivelyPublic.
2024-09-07 22:06:37 -07:00
Alex Hoppen
3e645368cc [test] Disable experimental parser round trip in ModuleInterface/value_generics.swift 2024-09-07 13:11:04 -07:00
elsh
bd9272c695 [PackageInterface] Fix isInterfacePackageEffectivelyPublic.
ValueDecl::isInterfacePackageEffectivelyPublic is used to check if a package decl in
interface file can be skipped for typecheck; if the decl is inlinable and in public or
private interface, it should be allowed to skip. This PR adds a missing check which
looks up the Interface source kind.

Resolves rdar://135388095
2024-09-07 08:49:23 -07:00
Alex Hoppen
702474fedf Merge pull request #76312 from ahoppen/disable-parser-round-trip-value-generics
[test] Add `-disable-experimental-parser-round-trip` to value generic tests
2024-09-06 13:43:34 -07:00
Doug Gregor
cc98822ada Merge pull request #76314 from DougGregor/postfix-if-strip-member-expressions
Ensure that #if stripping for postfix expressions works in interface generation
2024-09-06 13:24:59 -07:00
Doug Gregor
08eefcbbcc Ensure that #if stripping for postfix expressions works in interface generation
Test case from rdar://117491193
2024-09-06 09:47:35 -07:00
Xi Ge
f1d2da16dd Merge pull request #76304 from swiftlang/revert-76244-elsh/do-not-print-package-name
Revert "Do not print package-name in non-package interface by default."
2024-09-06 09:34:16 -07:00
Alex Hoppen
50a892425d [test] Add -disable-experimental-parser-round-trip to value generic tests
Parsing of integer literals as generic arguments isn’t implemented in SwiftParser yet, blocking swift-syntax PR testing.
2024-09-06 08:16:23 -07:00
Allan Shortlidge
85068f0d4d Merge pull request #76300 from tshortli/module-interface-patterns-with-opaque-results
ModuleInterface: Print patterns with opaque result types using `some` keyword
2024-09-05 22:45:37 -07:00
Xi Ge
4b8e76fbeb Revert "Do not print package-name in non-package interface by default." 2024-09-05 21:36:32 -07:00
Alexis Laferrière
d71bd2df00 Merge pull request #76267 from xymus/warn-on-ioi-clang-targets
Sema: Warn on all non-resilient uses of `@_implementationOnly import`, even for clang targets
2024-09-05 20:01:18 -07:00
Allan Shortlidge
a770371a80 ModuleInterface: Print patterns with opaque result types using some keyword.
Previously, the opaque types in patterns were printed using their full stable
reference which cannot be resolved when parsing a swiftinterface.

Resolves rdar://127771885.
2024-09-05 16:08:42 -07:00
Ellie Shin
2fd182acdc Merge pull request #76244 from swiftlang/elsh/do-not-print-package-name
Do not print package-name in non-package interface by default.
2024-09-05 15:45:06 -07:00
Alejandro Alonso
45d7ea39a5 Merge pull request #75518 from Azoy/integer-generics
Implement Value generics
2024-09-05 15:33:46 -07:00
Alexis Laferrière
750b141f31 Tests: enable library-evolution in tests using @_implementationOnly imports 2024-09-05 10:40:14 -07:00
Allan Shortlidge
a0a4ac3d55 ModuleInterface: Don't alias Foundation module in swiftinterfaces.
Skip aliasing Foundation when `-alias-module-names-in-module-interface` is
specified since it appears to confuse the typechecker. The module name
"Foundation" is hardcoded and checked in several places, so aliasing Foundation
may be changing some subtle behaviors.

Resolves rdar://128897610.
2024-09-04 20:28:55 -07:00
elsh
be71aa378c Update test 2024-09-04 15:48:39 -07:00
Alejandro Alonso
9faf615c88 Add runtime availability checking for value generics 2024-09-04 15:13:51 -07:00
Alejandro Alonso
451e7259a1 Add ValueGenerics experimental feature 2024-09-04 15:13:49 -07:00
Alejandro Alonso
f25545b785 Add a module interface test 2024-09-04 15:13:48 -07:00
Doug Gregor
601a5c3c0c Merge pull request #76187 from DougGregor/extract-inlinable-text-swift-syntax
Implement extractInlinableText with swift-syntax
2024-09-04 07:53:40 -07:00
Allan Shortlidge
eafb40588c Merge pull request #76240 from tshortli/maccatalyst-tests
Tests: Adjust several macCatalyst tests
2024-09-04 02:47:05 -07:00
elsh
640b1252fc Do not print package-name in non-package interface by default.
Having package-name printed in public or private interface led to strange dependency errors in the past. For example, an SPI module is a dependency within a package, but due to the package-name being printed in public or private interface, dependency scanner tries to find it even for an external client of the package, causing a `no such module found` error. The  -disable-print-package-name-for-non-package flag helps with such case, but to enforce the correct behavior, we should make it a default to not print package-name in public or private interface.

Resolves rdar://135260270
2024-09-04 02:40:19 -07:00
Allan Shortlidge
0ea7ee8229 Tests: Upstream default-prebuilt-module-location-maccatalyst.swift. 2024-09-03 22:14:24 -07:00
Alex Hoppen
c5aa49ba64 Revert "Isolated synchronous deinit" 2024-09-03 18:11:26 -07:00
Doug Gregor
a73711ef4b Implement extractInlinableText with swift-syntax
Replace the existing C++ implementation of extractInlinableText with
a new implementation based on swift-syntax. It uses SwiftIfConfig to
remove inactive regions (with a special mode), and a new compiler-only
entrypoint in the library to remove comments and `#sourceLocation`.
2024-08-30 16:43:41 -07:00
Mykola Pokhylets
50b1313175 Merge branch 'main' into mpokhylets/isolated-deinit
# Conflicts:
#	lib/SILGen/SILGenDistributed.cpp
#	lib/Sema/TypeCheckConcurrency.cpp
2024-08-15 16:58:43 +02:00
Ellie Shin
dc1c34dfa1 [Sema] Treat @usableFromInline package decls from interface as public and skip access checks
Resolves rdar://133319906
2024-08-13 17:01:19 -07:00
Alexis Laferrière
eea22c2f09 Merge pull request #75659 from xymus/shadow-dont-warn-with-alias-workaround
ModuleInterface: Don't warn on name conflict when the alias workaround is enabled
2024-08-05 12:38:00 -07:00
Alexis Laferrière
b4fb5720b2 ModuleInterface: Don't warn on name conflict when the alias workaround is enabled
This warning is designed to be an early report of name conflicts in
swiftinterfaces caused by a type having the same name as a module.
Make sure we silence this warning when the workaround
-alias-module-names-in-module-interface is enabled. This is what we
already do for -module-interface-preserve-types-as-written.

rdar://132990400
2024-08-02 14:48:29 -07:00
Allan Shortlidge
2899aa5660 ModuleInterface: Add more test cases to actor_init.swift.
Resolves rdar://133012963.
2024-08-02 07:50:51 -07:00
Allan Shortlidge
403156b088 Revert "AST: Don't print convenience on actor initializers."
This reverts commit 3453b136c3.
2024-08-02 07:50:51 -07:00
Pavel Yaskevich
4efb210823 Merge pull request #75546 from xedin/rdar-132551887
[Tests] NFC: Fix init accessors test-case to support both 32 and 64 b…
2024-07-30 00:04:15 -07:00
Kavon Farvardin
972373b129 NCGenerics: begin process of removing compat hack
The reverse-condfail workaround needs to be removed, and this is the
first step to allowing the stdlib to build with conditionally escapable
types.

resolves rdar://132453000
2024-07-29 17:27:17 -07:00
Pavel Yaskevich
3a974fa545 [Tests] NFC: Fix init accessors test-case to support both 32 and 64 bit platforms
Resolves: rdar://132551887
2024-07-29 09:50:23 -07:00
Allan Shortlidge
d81f8db52f Merge pull request #75411 from tshortli/module-interface-lazy-typecheck-invalid-extension
ModuleInterface: Avoid crashing on invalid extensions in lazy typechecking mode
2024-07-23 15:49:57 -07:00
Kavon Farvardin
5230b19ef6 Test: replace '@_moveOnly' with '~Copyable' 2024-07-23 11:05:33 -07:00
Allan Shortlidge
a621059f80 ModuleInterface: Avoid crashing on invalid extensions in lazy typechecking mode.
With `-experimental-lazy-typecheck` specified during module interface emission,
`collectProtocols()` may be the first piece of code to request the extended
type for a given extension and it therefore needs to ignore invalid extensions
and ensure that diagnostics are emitted.

Also, add some `PrettyStackTrace` coverage to `ModuleInterfaceSupport.cpp` to make
investigating future issues easier.

Resolves rdar://126232836.
2024-07-23 10:32:50 -07:00
Kavon Farvardin
99dec9fcd2 Test: finish noncopyable accessor test
rdar://106164128
2024-07-23 08:11:37 -07:00
Allan Shortlidge
e836fea314 ModuleInterface: Print -target-variant flag in .swiftinterface files.
This is necessary to ensure that availability checks contained in inlined
functions are compiled correctly for zippered modules when built from
interface.

Resolves rdar://130094532.
2024-07-18 12:43:34 -07:00
Kavon Farvardin
1fa02fb0fe Revert "NCGenerics: remove the reverse-condfail workaround"
This reverts commit 5b2f2cbfcf.
2024-07-16 08:10:00 -07:00
Pavel Yaskevich
cfb50a0aef Merge pull request #75191 from xedin/inlinable-init-accessors
[AST/Sema] Make it possible to use init accessors in inlinable initializers
2024-07-15 09:16:30 -07:00