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-10459] AST Verifier should gracefully exit #52859

Open
compnerd opened this issue Apr 12, 2019 · 5 comments
Open

[SR-10459] AST Verifier should gracefully exit #52859

compnerd opened this issue Apr 12, 2019 · 5 comments
Labels
compiler The Swift compiler in itself improvement

Comments

@compnerd
Copy link
Collaborator

Previous ID SR-10459
Radar None
Original Reporter @compnerd
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement
Assignee None
Priority Medium

md5: 1ad1c9cb080cd84077fa76c61700a6f5

Issue Description:

The AST verifier calls abort rather than exiting with errors. This should be improved.

@compnerd
Copy link
Collaborator Author

CC: @akyrtzi @gottesmm @belkadan

@belkadan
Copy link
Contributor

Why? What benefit does that give us? abort makes it easier to debug.

@compnerd
Copy link
Collaborator Author

The compiler really shouldn't abort on invalid input. It should diagnose it properly. LLVM has something similar - it doesn't abort on failure, but does provide a nice list of problems with the IR and then exits nicely.

@belkadan
Copy link
Contributor

"exits nicely with output on stderr" isn't any better (or worse) than "abort" for a frontend job, and "abort" gives us a backtrace that gets collected on Apple platforms.

@belkadan
Copy link
Contributor

(Note that I'm distinguishing "output on stderr" from "diagnostics". I don't think we want to go through the effort of making diagnostics for these either, though.)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself improvement
Projects
None yet
Development

No branches or pull requests

2 participants