Commit Graph

9 Commits

Author SHA1 Message Date
Allan Shortlidge
49b59f69c9 Revert https://github.com/swiftlang/swift/pull/75745.
Finishes resolving rdar://139236053.
2024-11-05 14:37:56 -08: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
Ellie Shin
5e58876b16 Update tests 2024-07-11 13:13:00 -07:00
Steven Wu
3e903688a2 [ScanDependency] Do not use public/private swiftinterface in the same package
When scanning finds a dependency in the same package, do not load
public/private swiftinterface since they do not have the package level
decl to compile the current module. Always prefer package module (if
enabled), or use binary module, unless it is building a public/private
swiftinterface file in which case the interface file is preferred.

This also does some clean up to sync up the code path between implicit
and explicit module finding path.

rdar://122356964
2024-02-28 17:34:03 -08:00
Ellie Shin
e5ca8e5c0b Allow loading package interface if in same package.
Add a new flag to enable package interface loading.
Use the last value of package-name in case of dupes.
Rename PrintInterfaceContentMode as InterfaceMode.
Update diagnostics.
Test package interface loading with various scenarios.
Test duplicate package-name.
2023-11-09 18:44:06 -08:00
Ellie Shin
7c80976081 Package name is only printed in private swiftinterface. This causes
ambiguity during lookup when there are multiple public or inlinalbe
package decls in public interfaces. This PR adds a package name to
public swiftinterface and lets typecheck look up the package name
to narrow down the scope of access to package decls from an external
module.

Resolves rdar://117699160
2023-10-30 13:38:17 -07:00
Ellie Shin
b081404daa Print package-name in .private.swiftinterface only for better abstraction
Resolves rdar://107638447
2023-04-20 17:45:22 -07:00
Ellie Shin
f87ba95d73 Warn if a package binary module is loaded from SDK
Resolves rdar://107074380
2023-03-25 17:09:10 -07:00
Ellie Shin
fc2b61da71 - Do not load modules of the same package if built from interface.
- Show diagnostics with an interface path

Resolves rdar://104617990
2023-03-22 17:30:27 -07:00