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

Issue 2982093003: Unifying compiler context (Closed)

Created:
3 years, 5 months ago by Siggi Cherem (dart-lang)
Modified:
3 years, 4 months ago
Reviewers:
Paul Berry, ahe
CC:
reviews_dartlang.org, dart-uxr+reviews_google.com, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Unifying compiler context Changes in this CL: - Updated CompilerContext: - it now contains a ProcessedOptions object - it no longer depends on CompilerCommandLine/CommandLine - it delegates to ProcessedOptions.report so all error reporting goes to one single place. - use "withContext" term instead of "withGlobalOptions" to be more clear about the intent - Changes in public API - added more options that correspond to flags in command-line fasta tools - default onError is different: we now use the command_line_reporting report, which prints and throws on fatal messages, but doesn't throw eagerly on all messages as before. - introduced "printMessages" option: make it easy to have both onError + command_line_reporting (kernel-service.dart is the main use case at this time, other ideas welcome!) - renamed CompilationError to CompilationMessage - Other changes - set exit code is done on report, not on format - fixed corner cases not covered in previous CL - error reporting with missing-main needs to happen with a context - missing error cases when inferring .packages and input URIs are not file:* URIs Ideas for follow up after this CL: - combine ProcessedOptions and CompilerContext into a single class (or extend one from the other) - switch onError to a stream R=ahe@google.com Committed: https://github.com/dart-lang/sdk/commit/1aa139bc9407735b772b27949a5308931a521104

Patch Set 1 #

Total comments: 60

Patch Set 2 : cl comments #

Patch Set 3 : revert change to kernel-service.dart #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -353 lines) Patch
M pkg/analyzer/test/src/task/strong/front_end_inference_test.dart View 1 2 2 chunks +1 line, -2 lines 0 comments Download
M pkg/compiler/tool/generate_kernel.dart View 2 chunks +2 lines, -7 lines 0 comments Download
D pkg/front_end/lib/compilation_error.dart View 1 chunk +0 lines, -28 lines 0 comments Download
A pkg/front_end/lib/compilation_message.dart View 1 1 chunk +38 lines, -0 lines 0 comments Download
M pkg/front_end/lib/compiler_options.dart View 1 3 chunks +43 lines, -8 lines 0 comments Download
M pkg/front_end/lib/front_end.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/kernel_generator.dart View 2 chunks +12 lines, -8 lines 0 comments Download
M pkg/front_end/lib/src/base/processed_options.dart View 1 11 chunks +144 lines, -42 lines 0 comments Download
M pkg/front_end/lib/src/fasta/command_line.dart View 1 chunk +1 line, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/command_line_reporting.dart View 1 3 chunks +17 lines, -10 lines 0 comments Download
M pkg/front_end/lib/src/fasta/compile_platform.dart View 3 chunks +26 lines, -42 lines 0 comments Download
M pkg/front_end/lib/src/fasta/compiler_command_line.dart View 1 6 chunks +52 lines, -53 lines 1 comment Download
M pkg/front_end/lib/src/fasta/compiler_context.dart View 1 4 chunks +39 lines, -14 lines 0 comments Download
M pkg/front_end/lib/src/fasta/fasta.dart View 10 chunks +30 lines, -57 lines 0 comments Download
M pkg/front_end/lib/src/fasta/fasta_codes_generated.dart View 1 2 2 chunks +12 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/run.dart View 2 chunks +7 lines, -5 lines 0 comments Download
M pkg/front_end/lib/src/fasta/source/source_loader.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/testing/kernel_chain.dart View 1 4 chunks +8 lines, -3 lines 0 comments Download
M pkg/front_end/lib/src/incremental/kernel_driver.dart View 1 2 chunks +11 lines, -8 lines 0 comments Download
M pkg/front_end/lib/src/kernel_generator_impl.dart View 5 chunks +12 lines, -24 lines 0 comments Download
M pkg/front_end/messages.yaml View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M pkg/front_end/test/fasta/shaker_test.dart View 6 chunks +15 lines, -19 lines 0 comments Download
M pkg/front_end/test/fasta/testing/suite.dart View 1 3 chunks +8 lines, -3 lines 0 comments Download
M pkg/front_end/test/kernel_generator_test.dart View 1 2 chunks +7 lines, -4 lines 0 comments Download
M pkg/front_end/tool/perf.dart View 2 chunks +5 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/dill_loader_test.dart View 2 chunks +2 lines, -7 lines 0 comments Download
M utils/kernel-service/kernel-service.dart View 1 2 1 chunk +11 lines, -1 line 0 comments Download

Messages

Total messages: 23 (13 generated)
Siggi Cherem (dart-lang)
https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compiler_options.dart File pkg/front_end/lib/compiler_options.dart (right): https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compiler_options.dart#newcode54 pkg/front_end/lib/compiler_options.dart:54: bool reportMessages; Paul & Peter - there are many ...
3 years, 5 months ago (2017-07-18 00:11:08 UTC) #13
ahe
I haven't found any really blocking issues, but I think it would make sense to ...
3 years, 5 months ago (2017-07-18 10:40:51 UTC) #14
ahe
On 2017/07/18 10:40:51, ahe wrote: > I haven't found any really blocking issues, but I ...
3 years, 5 months ago (2017-07-18 10:42:26 UTC) #15
ahe
lgtm https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compilation_message.dart File pkg/front_end/lib/compilation_message.dart (right): https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compilation_message.dart#newcode19 pkg/front_end/lib/compilation_message.dart:19: /// A text description of the compile error. ...
3 years, 5 months ago (2017-07-18 16:54:37 UTC) #16
Paul Berry
https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compiler_options.dart File pkg/front_end/lib/compiler_options.dart (right): https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compiler_options.dart#newcode54 pkg/front_end/lib/compiler_options.dart:54: bool reportMessages; On 2017/07/18 16:54:36, ahe wrote: > On ...
3 years, 5 months ago (2017-07-18 18:36:21 UTC) #17
ahe
https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compiler_options.dart File pkg/front_end/lib/compiler_options.dart (right): https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compiler_options.dart#newcode54 pkg/front_end/lib/compiler_options.dart:54: bool reportMessages; On 2017/07/18 18:36:21, Paul Berry wrote: > ...
3 years, 5 months ago (2017-07-18 21:07:26 UTC) #18
Siggi Cherem (dart-lang)
Thank Peter and Paul for all the comments! https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compilation_message.dart File pkg/front_end/lib/compilation_message.dart (right): https://codereview.chromium.org/2982093003/diff/60001/pkg/front_end/lib/compilation_message.dart#newcode19 pkg/front_end/lib/compilation_message.dart:19: /// ...
3 years, 5 months ago (2017-07-18 22:50:44 UTC) #19
Siggi Cherem (dart-lang)
FYI - I undid a change in kernel-service because some dartk/vm tests expected the old ...
3 years, 5 months ago (2017-07-19 00:01:01 UTC) #20
Siggi Cherem (dart-lang)
Committed patchset #3 (id:100001) manually as 1aa139bc9407735b772b27949a5308931a521104 (presubmit successful).
3 years, 5 months ago (2017-07-19 00:03:07 UTC) #22
ahe
3 years, 4 months ago (2017-08-17 13:18:21 UTC) #23
Message was sent while issue was closed.
https://codereview.chromium.org/2982093003/diff/100001/pkg/front_end/lib/src/...
File pkg/front_end/lib/src/fasta/compiler_command_line.dart (right):

https://codereview.chromium.org/2982093003/diff/100001/pkg/front_end/lib/src/...
pkg/front_end/lib/src/fasta/compiler_command_line.dart:163:
..setExitCodeOnProblem = true
Why is this set to true?

Powered by Google App Engine
This is Rietveld 408576698