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

Fix fold literal encoding with trailing line break #91

Conversation

kekavc24
Copy link
Contributor

@kekavc24 kekavc24 commented Jul 1, 2024

This PR:

  • Makes _tryYamlEncodeFolded and _tryYamlEncodeLiteral return null for strings with trailing line-breaks
  • Add test cases mistakenly removed in Fix line folding #87

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Copy link
Member

@jonasfj jonasfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes things better, no doubt!

Let's land it.

I suppose it's not unthinkable that we can do better than this, but if we want to pursue that we definitely have to consider what the cost will be in terms of complexity vs value.

The fix in this PR is certainly not complex :)

@jonasfj jonasfj merged commit d605cce into dart-lang:main Jul 4, 2024
18 checks passed
@kekavc24 kekavc24 deleted the fix-fold-literal-encoding-with-trailing-line-break branch July 5, 2024 09:13
@kekavc24 kekavc24 mentioned this pull request Jul 5, 2024
1 task
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jul 8, 2024
…em, file, glob, http, http_multi_server, http_parser, json_rpc_2, logging, mockito, package_config, source_maps, source_span, sync_http, test, yaml_edit

Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (https://github.com/dart-lang/args/compare/6a5a2e6..1a24d61):
  1a24d61  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-archive/args#278)

bazel_worker (https://github.com/dart-lang/bazel_worker/compare/c76d7c8..02f190b):
  02f190b  2024-07-01  Kevin Moore  blast_repo fixes (dart-archive/bazel_worker#94)

benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/f6ef33d..a06785c):
  a06785c  2024-07-01  Kevin Moore  blast_repo fixes (dart-archive/benchmark_harness#108)

collection (https://github.com/dart-lang/collection/compare/9354f38..0c1f829):
  0c1f829  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-archive/collection#354)

ecosystem (https://github.com/dart-lang/ecosystem/compare/54ca01a..4171189):
  4171189  2024-07-02  Jacob MacDonald  support nested packages in firehose (dart-lang/ecosystem#277)
  459041b  2024-07-01  dependabot[bot]  Bump the github-actions group with 4 updates (dart-lang/ecosystem#275)

file (https://github.com/google/file.dart/compare/07cacae..855831c):
  855831c  2024-07-01  dependabot[bot]  Bump actions/checkout from 4.1.6 to 4.1.7 (dart-archive/file.dart#242)
  da79121  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.4 to 1.6.5 (dart-archive/file.dart#241)

glob (https://github.com/dart-lang/glob/compare/6d3ba5e..8b05be8):
  8b05be8  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/glob#96)

http (https://github.com/dart-lang/http/compare/8d89385..4178b67):
  4178b67  2024-07-03  Brian Quinlan  Clarify when Client.close must be called (dart-lang/http#1255)
  719dc5f  2024-07-02  Brian Quinlan  Upgrade to http_image_provider: 0.0.3 (dart-lang/http#1253)
  75b1efb  2024-07-02  dependabot[bot]  Bump the github-actions group across 1 directory with 4 updates (dart-lang/http#1251)
  cdfb94c  2024-07-01  Brian Quinlan  Add an section explaining the benefits of using `package:ok_http`. (dart-lang/http#1252)

http_multi_server (https://github.com/dart-lang/http_multi_server/compare/25941e2..8348be1):
  8348be1  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/http_multi_server#71)

http_parser (https://github.com/dart-lang/http_parser/compare/9bf7bd9..ce528cf):
  ce528cf  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-archive/http_parser#101)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/616937f..b4810dc):
  b4810dc  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-archive/json_rpc_2#117)

logging (https://github.com/dart-lang/logging/compare/6c3fb37..8752902):
  8752902  2024-07-01  Kevin Moore  blast_repo fixes (dart-archive/logging#170)

mockito (https://github.com/dart-lang/mockito/compare/a7fdf71..eb4d1da):
  eb4d1da  2024-07-03  James Lin  Update with review feedback from srawlins
  db19e8c  2024-06-05  James Lin  Provide better documentation for `provideDummy`/`provideDummyBuilder`
  330976e  2024-07-01  dependabot[bot]  Bump the github-actions group across 1 directory with 2 updates (dart-lang/mockito#761)

package_config (https://github.com/dart-lang/package_config/compare/903a0e5..f0b7256):
  f0b7256  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/package_config#156)

source_maps (https://github.com/dart-lang/source_maps/compare/caa79c2..5f82c61):
  5f82c61  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/source_maps#95)

source_span (https://github.com/dart-lang/source_span/compare/89520f3..f81cd4a):
  f81cd4a  2024-07-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/source_span#115)

sync_http (https://github.com/dart-lang/sync_http/compare/7622bdd..ab8377e):
  ab8377e  2024-07-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.6.2 to 1.6.5 (google/sync_http.dart#48)

test (https://github.com/dart-lang/test/compare/3256c23..14f9b3e):
  14f9b3ec  2024-07-08  Jacob MacDonald  use pub workspaces (dart-lang/test#2249)
  c14ce93a  2024-07-03  Nate Bosch  Prepare to publish (dart-lang/test#2250)

yaml_edit (https://github.com/dart-lang/yaml_edit/compare/57a28da..d605cce):
  d605cce  2024-07-04  Kavisi  Fix fold literal encoding with trailing line break (dart-lang/yaml_edit#91)

Change-Id: I70ee32b3fa1912457b7b08affb3446523ef3b0d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374860
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
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.

2 participants