-
Notifications
You must be signed in to change notification settings - Fork 136
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
Add option to write diagnostics to a file to provide more information to tools #494
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f24a83b
Deprecate using diagnostics as errors.
d-ronnqvist 00dc703
Update calls to deprecated diagnostic-as-error properties
d-ronnqvist 9e021f5
Add "features.json" to indicate feature availability to other tools
d-ronnqvist 4b3f5b8
Add diagnostic consumer that writes to a file
d-ronnqvist b3f1cf5
Update calls to deprecated diagnostic properties
d-ronnqvist 7c81333
Fix bug in preview test where some diagnostics were written twice
d-ronnqvist 05b6fb8
Fix issue where preview tests would assert if one encountered an error
d-ronnqvist 8c199f6
Separate formatting of diagnostics for tools and for people
d-ronnqvist 1ffd90b
Rename 'formattedDescriptionFor(...)' to 'formattedDescription(...)'
d-ronnqvist 2978be8
Add tests for DiagnosticFileWriter
d-ronnqvist bcf2152
Merge branch 'main' into diagnostics-file
d-ronnqvist 2fd49c6
Use SemanticVersion type for DiagnosticFile version
d-ronnqvist 8258eff
Use dedicated diagnostic file severity type
d-ronnqvist 326a931
Rename 'formattedDescription(_:)' to 'formattedDescription(for:)'
d-ronnqvist 0d08bf6
Document DiagnosticFileWriter API
d-ronnqvist 83151b1
Correct install location of features.json file
d-ronnqvist 9b00e9d
Merge branch 'main' into diagnostics-file
d-ronnqvist 74ae8f9
Correct install location of features.json file
d-ronnqvist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Are we expecting diagnostics in this format to only be used by IDEs, or are there broader applications? If so, maybe there is a term that describes what the format provides rather than what we expect to use it for. For example "
RichDiagnosticConsoleFormater
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's intended to be parsed by IDEs and other tools or scripts who are interacting with the
docc
executable. The format (which is the same as today) contains some general information about the diagnostics in an easily parseable format but doesn't provide the full diagnostic information.I think once we improve the default diagnostic format (#496) there shouldn't be many use cases for this format other than tools/scripts who don't need the full details of the diagnostic file.