Skip to content

OBSOLETE - REPLACED - Correct newline-style in json emitter#5417

Closed
davidBar-On wants to merge 1 commit into
rust-lang:masterfrom
davidBar-On:TBD__issue-4273-incorrect-newline-style-in-json-emitter
Closed

OBSOLETE - REPLACED - Correct newline-style in json emitter#5417
davidBar-On wants to merge 1 commit into
rust-lang:masterfrom
davidBar-On:TBD__issue-4273-incorrect-newline-style-in-json-emitter

Conversation

@davidBar-On
Copy link
Copy Markdown
Contributor

@davidBar-On davidBar-On commented Jun 29, 2022

REPLACED by #5418.

==============================

Suggested fix for issue #4273 - using the configured newline_style for the emitted JSON expected parts. The PR is based on back-porting PR #4743 (that was not merged into R2).

The approach taken is to propagate the newline-style setting by adding emit_formatted_file_with_line_style() function to the Emitter trait, and changing the default emit_formatted_file() to call it. All emit_formatted_file implementation were changed to emit_formatted_file_with_line_style, but the relevant code still calls emit_formatted_file. This is except for the JsonEmitter that calls emit_formatted_file_with_line_style directly with the newline-style setting, and the function is using it for the emitted expected parts.

Based on a comment to PR #4743, testings were added to writemode, to allow using test files.

@davidBar-On davidBar-On deleted the TBD__issue-4273-incorrect-newline-style-in-json-emitter branch June 29, 2022 09:05
@davidBar-On davidBar-On restored the TBD__issue-4273-incorrect-newline-style-in-json-emitter branch June 29, 2022 09:07
@davidBar-On davidBar-On deleted the TBD__issue-4273-incorrect-newline-style-in-json-emitter branch June 29, 2022 09:08
@davidBar-On davidBar-On changed the title Correct newline-style in json emitter OBSOLETE - REPLACED - Correct newline-style in json emitter Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant