Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-10984] [property wrappers] Assertion failed: No interface type was set #53374

Closed
swift-ci opened this issue Jun 20, 2019 · 3 comments
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software property wrappers Feature: property wrappers

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-10984
Radar None
Original Reporter tannernelson (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-19-a
macOS 10.14.4
Xcode 11 Beta 2

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, PropertyWrappers
Assignee @DougGregor
Priority Medium

md5: 2eb8c69f432ddd39bd4d98a59988ef2c

Issue Description:

Adding a `wrapperValue` property to one of my property wrappers is causing a compiler assertion.

To recreate:

1: Open SPM package in Xcode 11
Use the attached project
Or, clone the following url: https://user-images.githubusercontent.com/2727770/164963345-191e1bee-f03c-46d0-a9fa-5a5056b58fac.gz

2: Build
FluentKit module should fail to compile w/ assertion:

Assertion failed: (hasInterfaceType() && "No interface type was set"), function getInterfaceType, file /Users/buildnode/jenkins/workspace/oss-swift-5.1-package-osx/swift/lib/AST/Decl.cpp, line 2535.

1.  While type-checking 'MigrationLog' (at /Users/tanner0101/dev/vapor/fluent-kit/Sources/FluentKit/Migration/MigrationLog.swift:4:14)
2.  While type-checking declaration 0x7f8d3da244c0 (at /Users/tanner0101/dev/vapor/fluent-kit/Sources/FluentKit/Migration/MigrationLog.swift:7:16)
3.  While evaluating request PropertyWrapperBackingPropertyInfoRequest(FluentKit.(file).MigrationLog.id@/Users/tanner0101/dev/vapor/fluent-kit/Sources/FluentKit/Migration/MigrationLog.swift:7:20)
0  swift                    0x0000000103e8afd5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  swift                    0x0000000103e8a2c5 llvm::sys::RunSignalHandlers() + 85
2  swift                    0x0000000103e8b5b8 SignalHandler(int) + 264
3  libsystem_platform.dylib 0x00007fff5e9e5b5d _sigtramp + 29
4  swift                    0x00000001061ae3b3 cmark_strbuf__initbuf + 125342
5  libsystem_c.dylib        0x00007fff5e8a56a6 abort + 127
6  libsystem_c.dylib        0x00007fff5e86e20d basename_r + 0
7  swift                    0x00000001042b8d03 swift::AbstractStorageDecl::getValueInterfaceType() const (.cold.4) + 35
8  swift                    0x00000001012fa263 swift::AbstractStorageDecl::getValueInterfaceType() const + 147
9  swift                    0x0000000100f4b643 swift::PropertyWrapperBackingPropertyInfoRequest::evaluate(swift::Evaluator&, swift::VarDecl*) const + 2259
10 swift                    0x0000000101063031 swift::SimpleRequest<swift::PropertyWrapperBackingPropertyInfoRequest, (swift::CacheKind)1, swift::PropertyWrapperBackingPropertyInfo, swift::VarDecl*>::evaluateRequest(swift::PropertyWrapperBackingPropertyInfoRequest const&, swift::Evaluator&) + 17
11 swift                    0x0000000101314f44 llvm::Expected<swift::PropertyWrapperBackingPropertyInfoRequest::OutputType> swift::Evaluator::getResultUncached<swift::PropertyWrapperBackingPropertyInfoRequest>(swift::PropertyWrapperBackingPropertyInfoRequest const&) + 372
12 swift                    0x0000000101314a45 llvm::Expected<swift::PropertyWrapperBackingPropertyInfoRequest::OutputType> swift::Evaluator::getResultCached<swift::PropertyWrapperBackingPropertyInfoRequest, (void*)0>(swift::PropertyWrapperBackingPropertyInfoRequest const&) + 277
13 swift                    0x0000000101314007 llvm::Expected<swift::PropertyWrapperBackingPropertyInfoRequest::OutputType> swift::Evaluator::operator()<swift::PropertyWrapperBackingPropertyInfoRequest>(swift::PropertyWrapperBackingPropertyInfoRequest const&) + 119
14 swift                    0x00000001012fc3ed swift::PropertyWrapperBackingPropertyInfoRequest::OutputType swift::evaluateOrDefault<swift::PropertyWrapperBackingPropertyInfoRequest>(swift::Evaluator&, swift::PropertyWrapperBackingPropertyInfoRequest, swift::PropertyWrapperBackingPropertyInfoRequest::OutputType) + 29
15 swift                    0x00000001012fc5d8 swift::VarDecl::getPropertyWrapperBackingProperty() const + 120
16 swift                    0x0000000100f4bd2b swift::maybeAddAccessorsToStorage(swift::AbstractStorageDecl*) + 155
17 swift                    0x0000000100ffcd58 void llvm::function_ref<void (swift::VarDecl*)>::callback_fn<(anonymous namespace)::DeclChecker::visitBoundVars(swift::Pattern*)::'lambda'(swift::VarDecl*)>(long, swift::VarDecl*) + 40
18 swift                    0x0000000100feb50f (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 1871
19 swift                    0x0000000100ff759b (anonymous namespace)::DeclChecker::visitClassDecl(swift::ClassDecl*) + 267
20 swift                    0x0000000100feb0d7 (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 791
21 swift                    0x0000000100feadb6 swift::TypeChecker::typeCheckDecl(swift::Decl*) + 38
22 swift                    0x0000000101087149 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) + 953
23 swift                    0x0000000100847ed2 swift::CompilerInstance::parseAndCheckTypesUpTo(swift::CompilerInstance::ImplicitImports const&, swift::SourceFile::ASTStage_t) + 530
24 swift                    0x00000001008477ba swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 618
25 swift                    0x0000000100635f4e performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 1678
26 swift                    0x00000001006348f2 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2978
27 swift                    0x00000001005de628 main + 696
28 libdyld.dylib            0x00007fff5e8003d5 start + 1
29 libdyld.dylib            0x000000000000008f start + 2709519547
error: Abort trap: 6
@swift-ci
Copy link
Collaborator Author

Comment by tanner0101 (JIRA)

cc @DougGregor

@DougGregor
Copy link
Member

FYI, I suspect this will be fixed by #25626 once it makes it into a build

@DougGregor
Copy link
Member

Nope, needed one more thing: #25743

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software property wrappers Feature: property wrappers
Projects
None yet
Development

No branches or pull requests

3 participants