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-14368] Cannot find type '$__lldb_context' in scope #4316

Closed
swift-ci opened this issue Mar 17, 2021 · 5 comments
Closed

[SR-14368] Cannot find type '$__lldb_context' in scope #4316

swift-ci opened this issue Mar 17, 2021 · 5 comments
Labels
bug Something isn't working LLDB for Swift

Comments

@swift-ci
Copy link

Previous ID SR-14368
Radar rdar://problem/75536973
Original Reporter huyenvd (JIRA User)
Type Bug
Status Closed
Resolution Cannot Reproduce
Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee None
Priority Medium

md5: cc6f5e68dab79d7a67732931f86ed252

Issue Description:

I can not debug in Xcode. Infromation

warning

: Swift error in scratch context: error: /Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h:8:9: error: 'LFPhotoEditingController.h' file not found

#import "LFPhotoEditingController.h"

    ^

error: failed to import bridging header '/Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h'

.

Shared Swift state for Noah Dev.app has developed fatal errors and is being discarded.

REPL definitions and persistent names/types will be lost.

warning: Swift error in scratch context: error: /Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h:8:9: error: 'LFPhotoEditingController.h' file not found

#import "LFPhotoEditingController.h"

    ^

error: failed to import bridging header '/Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h'

.

Shared Swift state for Noah Dev.app has developed fatal errors and is being discarded.

REPL definitions and persistent names/types will be lost.

warning: Swift error in scratch context: error: /Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h:8:9: error: 'LFPhotoEditingController.h' file not found

#import "LFPhotoEditingController.h"

    ^

error: failed to import bridging header '/Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h'

.

Shared Swift state for Noah Dev.app has developed fatal errors and is being discarded.

REPL definitions and persistent names/types will be lost.

warning: Swift error in fallback scratch context: error: /Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h:8:9: error: 'LFPhotoEditingController.h' file not found

#import "LFPhotoEditingController.h"

    ^

error: failed to import bridging header '/Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h'

note: This error message is displayed only once. If the error displayed above is due to conflicting search paths to Clang modules in different images of the debugged executable, this can slow down debugging of Swift code significantly, since a fresh Swift context has to be created every time a conflict is encountered.

error: warning: failed to get module "Noah_Dev" from AST context:

error: /Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h:8:9: error: 'LFPhotoEditingController.h' file not found

#import "LFPhotoEditingController.h"

    ^

error: failed to import bridging header '/Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h'

error: error: /Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h:8:9: error: 'LFPhotoEditingController.h' file not found

#import "LFPhotoEditingController.h"

    ^

error: failed to import bridging header '/Users/imac/benekitten-ios/BeneKitten/Classes/Library/Image Processing/BeneKitten Dev-Bridging-Header.h'

Couldn't initialize Swift expression evaluator due to previous errors.

@swift-ci
Copy link
Author

Comment by Vu Dang Huyen (JIRA)

expression produced error: error: /var/folders/tf/xhfwlzf90fzfmxbnn5pyzm540000gn/T/expr16-c3b384..swift:1:11: error: cannot find type '$__lldb_context' in scope

extension $__lldb_context {

      ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~

error: /var/folders/tf/xhfwlzf90fzfmxbnn5pyzm540000gn/T/expr15-3b6d40..swift:14:5: error: cannot find '$__lldb_injected_self' in scope

$\_*lldb_injected_self.$*\_lldb_wrapped_expr_17(

^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~

@typesanitizer
Copy link

Are you able to share the source code with reproduction instructions? (You can also do so privately through feedbackassistant.apple.com if you can't share the source code publicly.)

@swift-ci create

@swift-ci
Copy link
Author

Comment by Vu Dang Huyen (JIRA)

Because the privacy of our company, I can not share this source. I have restarted xcode and clean build, then this issuse have fixed

@adrian-prantl
Copy link
Member

If I understand you correctly, you can't reproduce this issue any more?

Generally, if you get any compiler errors in the expression evaluator (like the header import failure shown above) the expression evaluator most likely will not work, because it failed to import modules from your project.

@adrian-prantl
Copy link
Member

If you want us to investigate the issue, we need some way of reproducing the problem.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 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 Something isn't working LLDB for Swift
Projects
None yet
Development

No branches or pull requests

3 participants