Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Issue 1492683002: Change the way hard splits are handled. (Closed)

Created:
5 years ago by Bob Nystrom
Modified:
5 years ago
Reviewers:
kevmoo
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/dart_style.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Change the way hard splits are handled. By having a separate rule for hard splits, we lose any constraints the original soft rule may have had or -- more importantly -- other rules may have had on it. For constraints where hardening the rule forces other rules to fully harden, it's fine because we propagate those constraints when the rule is hardened. The problem comes with "cannot split" constraints. If rule A has a "cannot split" constraint on rule B when rule A has some value, we need to remember that even if B is hardened so that we prevent A from taking that value. Instead of swapping out the rule with a separate hard split rule, the idea is to keep the rule (and thus preserve references to it) but change it to a "hardened" state. R=kevmoo@google.com Committed: https://github.com/dart-lang/dart_style/commit/d960898412cccb989c0f1fab416357994a22e15a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -130 lines) Patch
M lib/src/argument_list_visitor.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/src/chunk.dart View 4 chunks +2 lines, -16 lines 0 comments Download
M lib/src/chunk_builder.dart View 9 chunks +24 lines, -20 lines 0 comments Download
M lib/src/debug.dart View 3 chunks +34 lines, -10 lines 0 comments Download
M lib/src/line_splitting/line_splitter.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M lib/src/line_splitting/rule_set.dart View 2 chunks +19 lines, -2 lines 0 comments Download
M lib/src/line_splitting/solve_state.dart View 3 chunks +2 lines, -7 lines 0 comments Download
M lib/src/line_writer.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/src/rule/argument.dart View 3 chunks +6 lines, -16 lines 0 comments Download
M lib/src/rule/combinator.dart View 2 chunks +2 lines, -8 lines 0 comments Download
M lib/src/rule/metadata.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/src/rule/rule.dart View 4 chunks +42 lines, -37 lines 0 comments Download
M lib/src/source_visitor.dart View 4 chunks +4 lines, -4 lines 0 comments Download
M test/regression/0200/0221.unit View 1 chunk +7 lines, -5 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Bob Nystrom
This was intended to just be a refactoring to get some stuff in place for ...
5 years ago (2015-12-01 23:59:15 UTC) #2
kevmoo
LGTM but i noticed tests fail on 1.14-dev.1 unless I upgrade dependencies Might be good ...
5 years ago (2015-12-02 00:26:27 UTC) #3
Bob Nystrom
On 2015/12/02 00:26:27, kevmoo wrote: > LGTM > > but i noticed tests fail on ...
5 years ago (2015-12-02 00:47:02 UTC) #4
Bob Nystrom
5 years ago (2015-12-02 00:47:22 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
d960898412cccb989c0f1fab416357994a22e15a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698