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

Issue 247893004: Serialize AnalysisErrors to JSON in the analysis server. (Closed)

Created:
6 years, 8 months ago by Paul Berry
Modified:
6 years, 8 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Serialize AnalysisErrors to JSON in the analysis server. R=scheglov@google.com Committed: https://code.google.com/p/dart/source/detail?r=35329

Patch Set 1 #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -2 lines) Patch
M pkg/analysis_server/lib/src/analysis_server.dart View 2 chunks +22 lines, -1 line 7 comments Download
M pkg/analysis_server/test/analysis_server_test.dart View 3 chunks +50 lines, -1 line 7 comments Download

Messages

Total messages: 7 (0 generated)
Paul Berry
Note: all but one of the TODO's in this CL are things that I can't ...
6 years, 8 months ago (2014-04-23 19:05:01 UTC) #1
scheglov
lgtm https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/lib/src/analysis_server.dart File pkg/analysis_server/lib/src/analysis_server.dart (right): https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/lib/src/analysis_server.dart#newcode192 pkg/analysis_server/lib/src/analysis_server.dart:192: notification.setParameter(ERRORS_PARAM, new List.from(notice.errors.map( You could use .map(f).toList(). https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/lib/src/analysis_server.dart#newcode202 ...
6 years, 8 months ago (2014-04-23 19:20:55 UTC) #2
Paul Berry
Committed patchset #1 manually as r35329 (presubmit successful).
6 years, 8 months ago (2014-04-23 20:35:47 UTC) #3
Paul Berry
https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/lib/src/analysis_server.dart File pkg/analysis_server/lib/src/analysis_server.dart (right): https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/lib/src/analysis_server.dart#newcode192 pkg/analysis_server/lib/src/analysis_server.dart:192: notification.setParameter(ERRORS_PARAM, new List.from(notice.errors.map( On 2014/04/23 19:20:56, scheglov wrote: > ...
6 years, 8 months ago (2014-04-23 20:36:25 UTC) #4
Brian Wilkerson
LGTM https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/lib/src/analysis_server.dart File pkg/analysis_server/lib/src/analysis_server.dart (right): https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/lib/src/analysis_server.dart#newcode206 pkg/analysis_server/lib/src/analysis_server.dart:206: 'errorCode': errorCode.ordinal, > We need some stable presentation ...
6 years, 8 months ago (2014-04-24 15:44:04 UTC) #5
Paul Berry
https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/test/analysis_server_test.dart File pkg/analysis_server/test/analysis_server_test.dart (right): https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/test/analysis_server_test.dart#newcode168 pkg/analysis_server/test/analysis_server_test.dart:168: // currently exist! On 2014/04/24 15:44:05, Brian Wilkerson wrote: ...
6 years, 8 months ago (2014-04-24 16:19:26 UTC) #6
Brian Wilkerson
6 years, 8 months ago (2014-04-24 16:47:45 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/test/ana...
File pkg/analysis_server/test/analysis_server_test.dart (right):

https://codereview.chromium.org/247893004/diff/1/pkg/analysis_server/test/ana...
pkg/analysis_server/test/analysis_server_test.dart:168: // currently exist!
> ... do we anticipate ever adding any errors or hints
> that use %s in their correction template in the future?

Yes, I expect that we will want to use %s in corrections.

> Unfortunately, I can't test that right now because there are no
> errors or hints that use %s in their correction template.
> ...
> I suppose an alternative approach would be to rewrite this test
> using a mock AnalysisError object.

There are no corrections that use it, at least in part, because there aren't
many corrections. Which, in turn, is because we didn't add corrections until
after most of the errors were already implemented and we didn't go back and add
the text.

So a third alternative would be to find an error that has no correction but for
which it would make sense to have a %s in the message, and add the correction
text to it.

Powered by Google App Engine
This is Rietveld 408576698