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

Issue 2980033004: Throw if there is no compiler context available (Closed)

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

Description

Throw if there is no compiler context available BUG= R=ahe@google.com Committed: https://github.com/dart-lang/sdk/commit/8ecb50d0de5c1906469c920c69be75b794030a74

Patch Set 1 #

Total comments: 4

Patch Set 2 : cl comments, handle validate and deprecated_InputError #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -93 lines) Patch
M pkg/front_end/lib/src/fasta/compile_platform.dart View 1 1 chunk +3 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/compiler_command_line.dart View 1 2 chunks +18 lines, -5 lines 0 comments Download
M pkg/front_end/lib/src/fasta/compiler_context.dart View 1 3 chunks +10 lines, -4 lines 0 comments Download
M pkg/front_end/lib/src/fasta/fasta.dart View 1 2 chunks +6 lines, -4 lines 0 comments Download
M pkg/front_end/lib/src/fasta/fasta_codes_generated.dart View 1 1 chunk +11 lines, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/testing/kernel_chain.dart View 2 chunks +11 lines, -7 lines 0 comments Download
M pkg/front_end/messages.yaml View 1 1 chunk +4 lines, -0 lines 0 comments Download
M pkg/front_end/test/fasta/shaker_test.dart View 1 2 chunks +30 lines, -26 lines 0 comments Download
M pkg/front_end/test/fasta/testing/suite.dart View 1 2 chunks +49 lines, -45 lines 0 comments Download

Messages

Total messages: 9 (5 generated)
Siggi Cherem (dart-lang)
3 years, 5 months ago (2017-07-14 22:56:29 UTC) #4
ahe
lgtm https://codereview.chromium.org/2980033004/diff/40001/pkg/front_end/lib/src/fasta/compiler_context.dart File pkg/front_end/lib/src/fasta/compiler_context.dart (right): https://codereview.chromium.org/2980033004/diff/40001/pkg/front_end/lib/src/fasta/compiler_context.dart#newcode66 pkg/front_end/lib/src/fasta/compiler_context.dart:66: throw "$message\nTip: $tip"; Add prefix: Internal problem: https://codereview.chromium.org/2980033004/diff/40001/pkg/front_end/messages.yaml ...
3 years, 5 months ago (2017-07-17 08:42:07 UTC) #5
Siggi Cherem (dart-lang)
Committed patchset #3 (id:80001) manually as 8ecb50d0de5c1906469c920c69be75b794030a74 (presubmit successful).
3 years, 5 months ago (2017-07-17 20:16:26 UTC) #8
Siggi Cherem (dart-lang)
3 years, 5 months ago (2017-07-17 20:18:38 UTC) #9
Message was sent while issue was closed.
Thanks Peter!

PTAL after. I had to make a minor additional change: we were expecting a context
in two other situations I didn't include initially:
 - when constructing CommandLineOptions (we call `validate`)
 - when catching deprecated_InputError and reporting it back to the user

My change was to wrap these in a default context for now, but we will be able to
remove them soon (details in the TODO in command_line_options.dart)

https://codereview.chromium.org/2980033004/diff/40001/pkg/front_end/lib/src/f...
File pkg/front_end/lib/src/fasta/compiler_context.dart (right):

https://codereview.chromium.org/2980033004/diff/40001/pkg/front_end/lib/src/f...
pkg/front_end/lib/src/fasta/compiler_context.dart:66: throw "$message\nTip:
$tip";
On 2017/07/17 08:42:07, ahe wrote:
> Add prefix:
> 
> Internal problem: 

Done.

https://codereview.chromium.org/2980033004/diff/40001/pkg/front_end/messages....
File pkg/front_end/messages.yaml (right):

https://codereview.chromium.org/2980033004/diff/40001/pkg/front_end/messages....
pkg/front_end/messages.yaml:633: tip: "Wrap calls to the compiler in a zone with
a compiler context."
On 2017/07/17 08:42:07, ahe wrote:
> This sounds like an order (which is impolite). Also, it isn't obvious how to
> create that zone. How about:
> 
> Are all calls to the compiler are wrapped in
> 'CompilerCommandLine.withGlobalOptions'?
> 
> This is the non-commanding version of "Make sure all calls...".

Done.

Powered by Google App Engine
This is Rietveld 408576698