This lets the flag be emitted in the swiftinterface file of the stdlib
(or other modules with -enable-ossa-modules specified),
so that whenever stdlib is recompiled, -enable-ossa-modules will be on.
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.
It has an extension .package.swiftinterface and contains package decls
as well as SPIs and public/inlinable decls. When a module is loaded
from interface, it now looks up the package-name in the interface
and checks if the importer is in the same package. If so, it uses
that package interface found to load the module. If not, uses the existing
logic to load modules.
Resolves rdar://104617854
When printing the CustomAttrs attached to a decl, those attrs may not have been
type checked yet if lazy typechecking is enabled. We need to make sure that
printing invokes a request that will resolve the type.
Resolves rdar://117443319
Enhance the -experimental-lazy-typecheck suite of tests by adopting
-debug-forbid-typecheck-prefix instead of including broken code in the source
file that would cause diagnostics to be emitted if the compiler typechecks too
much during lazy typechecking. The content of .tbds and .swiftinterfaces
emitted with and without lazy typechecking enabled can now be compared since
the source compiles regardless of mode. This new test regime is less tedious to
maintain and should catch regressions more reliably since it doesn't
require new CHECK lines to be added to several tests every time a new
test case is added in the shared input file.
* Strip comments from inlinable text
* Simplify implementation, and avoid trimming trailing whitespace after the comment.
* Update test
* Feedback and handle more cases (with added tests)
* Handle #sourceLocation
* Fix #sourceLocation and fix FileCheck tests
Always print the real module name for references in private
swiftinterfaces, ignoring export-as declarations. Keep using the
export-as name for the public swiftinterface only.
The flag `ModuleInterfaceExportAs` used to enable this behavior and
we're removing it to make it the default.
rdar://115922907
Update the test for imports defaulting to internal by adding the
explicit `public` modifier on all imports and the expected warnings.
Modernized a test somehow as it can't use previously shared files.
This revealed an issue with the warning about superfluous imports on
imports of submodules. I've marked one of them as a FIXME as it will
require a fix in the diagnostic.
The feature InternalImportsByDefault makes imports default to internal instead
of public. Applying the Swift 6 behavior of SE-0409 in Swift 5.
Let's use only that flag to track the Swift 6 behavior as well instead
of separately checking for the language version.
This looks like it was never properly implemented, since when we generate the
memberwise initializer for the struct in SILGen, it incorrectly tries to apply
the entire initializer expression to each variable binding in the pattern,
rather than destructuring the result and pattern-matching it to the variables.
Since it never worked it doesn't look like anyone is using this, so let's
put up an error saying it's unsupported until we can implement it properly.
Add `StructLetDestructuring` as an experimental feature flag so that tests around
the feature for things like module interface printing can still work.
Add the thrown type into the AST representation of function types,
mapping from function type representations and declarations into the
appropriate thrown type. Add tests for serialization, printing, and
basic equivalence of function types that have thrown errors.
In case import resolution order somehow sometimes matters, it's prudent to process/resolve/locate implicitly-imported modules first.
Resolves rdar://113917657
When we run an interface verification tasks with Explicit module builds, we directly invoke a '-explicit-interface-module-build' instance with a '-typecheck-module-from-interface' action. So the builder needs to recognize this as a typechecking invocation. In implicit builds, this gets lowered into a separate compiler sub-instance with a '-typecheck' action, for some reason.
resolves rdar://115565571
In order to support lazy typechecking during module emission for modules
containing specialized functions, the computation of generic signatures for
`@_specialized` attributes must be requestified.
Resolves rdar://115569606