Commit Graph

53 Commits

Author SHA1 Message Date
Johnni Winther 4177d28464 [_fe_analyzer_shared] Support deferencing of StaticGet
This adds support for replacement a [StaticGet] with the constant
initializer of the referenced constant during evaluation of macro
metadata. Currently constants defined in the same library or
compilation is supported. For full support the constant initializers
need to be included in the outlines/summaries.

Change-Id: I219f85dded63342d4e3f957f0b7321badbe376a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392907
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-11-11 07:04:20 +00:00
Johnni Winther bdacb7d034 [_fe_analyzer_shared] Add evaluateExpression
This adds a helper method that evaluates an [Expression] based on
the semantics that can be deduced from the syntax.

Change-Id: I1b54ee03c1380d337969671133179aa557702a9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392440
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-11-01 09:26:44 +00:00
Johnni Winther 01dddf659e [_fe_analyzer_shared] Shared literal parsing
This adds shared helpers for parsing bool, int, and double literals to
their corresponding values.

The macro metadata literals are updated support digit separators and
to hold the literal value.

Change-Id: I709018b6c3a3b8ab09188d36c28f3c09636e0ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391964
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-10-28 09:03:45 +00:00
Johnni Winther d96cecb4ff [_fe_analyzer_shared] Support mixins in macro metadata
Change-Id: I1eec1feb0230fa938b727c8eff88a048a53794be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-10-25 08:31:35 +00:00
Johnni Winther 4d552d19eb [_fe_analyzer_shared] Rename StringJuxtaposition to AdjacentStringLiterals
Change-Id: I2ed9172f51f9a9011ca9dff59c62c42ffb56f05e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391605
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-10-24 09:40:25 +00:00
Johnni Winther 4b2b07bf20 [_fe_analyzer_shared] Test late resolution of macro metadata
This delays the resolution of the identifier in metadata, such the
parsed annotation expression is initially unresolved and
`Expression.resolve` must be called in order to resolve it.

This execises the support for references to identifiers declare via
macros, which will initially occur as unresolved identifiers.

Change-Id: I4863ce950ded0b9d2c1744421d9751cddea6e80c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-10-24 09:40:25 +00:00
Johnni Winther c0381d06b9 [_fe_analyzer_shared] Support enums in macro metadata
Change-Id: Ic6534fcbd48881184d6cb64c556d638f3e1d97b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391601
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-10-24 08:13:21 +00:00
Johnni Winther 875a130a42 [_fe_analyzer_shared] Support extension types in macro metadata
Change-Id: I91d4a2837285583ec8c05f0f8f3c4c906f861411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391402
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-10-24 08:13:21 +00:00
Johnni Winther bf16a40a97 [_fe_analyzer_shared] Support extensions in macro metadata
Change-Id: I06d3eeab53d8f739ec75dc5795ce46b57ef6f05b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391400
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-10-23 07:48:23 +00:00
Johnni Winther 35db90aef6 [cfe][analyzer] Add metadata parser
This adds a shared metadata parser to be used for macros. The parser
create a new AST which supports unresolved ASTs and delayed AST resolution.
An id-test is added for the generated AST from both CFE and analyzer.

Change-Id: Ie51817493fa6e668727a7af3a55cd22e2be722b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-10-23 07:48:15 +00:00
Paul Berry cee1a76146 Fix comment references in miscellaneous _fe_analyzer_shared code.
Fix bracketed references in doc comments that previously pointed to
nowhere, in the following source files:
- pkg/_fe_analyzer_shared/lib/src/testing/id_testing.dart
- pkg/_fe_analyzer_shared/lib/src/util/colors.dart
- pkg/_fe_analyzer_shared/lib/src/util/options.dart
- pkg/_fe_analyzer_shared/lib/src/util/value_kind.dart

This is part of a larger effort to clean up _fe_analyzer_shared to the
point where the `comment_references` lint can be enabled.

Change-Id: I3008246560e551819f836a02d8881eb1389077f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375202
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-07-16 17:51:17 +00:00
Johnni Winther a59faa2636 [cfe] Remove nnbd annotation from id-tests
Change-Id: Ib63b80e19027389cec41adf705829b5d4201c0d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366669
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2024-05-24 10:44:54 +00:00
Johnni Winther 2388c383ea [cfe] Handle symbolic language markers in code
The implementation for generating symbolic language markers only
handled language versions in the data but not in the code itself.
This fixes this by doing post processing on the whole file instead
of the individual annotations.

Change-Id: I451e39a40a6f1616cbd2ae70550091c19c85fa10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365220
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-05-02 10:49:48 +00:00
Johnni Winther 3c9d05f255 [cfe] Add symbolic language versions for testing
Change-Id: I0f8bb91d30fac442d781710b24908cd933d86388
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365142
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-05-01 13:11:10 +00:00
Johnni Winther a765ffc540 [cfe] Generate merged augmentation library for macros
This adds support for generating the merged augmentation library in the
CFE. In order to get the right file offsets in the generated AST the
MacroExecutor.buildArgumentationLibrary function is extended to compute
a list of spans the describe what each segment of the generated source
code contains. These spans are used to compute the offset relation
between the intermediate augmentation libraries and the merged
augmentation libraries.

Change-Id: Ie5b9c23130da67ac874fb824b82827bfd6b88880
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349864
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2024-02-19 12:35:22 +00:00
Johnni Winther 3adcec9e0a [fe_analyzer_shared] Add clarification to reproduction command
This adds a clarifying note the reproduction command emitted
when id-tests fail, that the used dart executable must be from
the out/ReleaseX64/dart-sdk/bin folder.

Change-Id: Iabbe68063f097544bb1ad1ca43d73ca27ccaa183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335462
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2023-11-13 09:02:24 +00:00
Johnni Winther 1f86f34c5c [dartdevc] Add id-testing support in ddc
This adds id-testing support to dartdevc and uses it to add a
scope_test for the DartScope created for expression compilation.

Change-Id: I861092e17807190880bd20e4e39e012fbf0cbe53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334220
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-11-10 10:49:56 +00:00
Johnni Winther 82e3a751a9 [cfe] Remove unnecessary_null_comparison code
The frontend is now run with sound null safety so these are no longer needed.

TEST=existing

Change-Id: I6c1776845854695ff34e310a3bb5bc9d86715f06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307901
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-06-08 08:46:47 +00:00
Johnni Winther 70056ed8c7 [_fe_analyzer_shared] Fix getField for WrappedStaticType
WrappedStaticType didn't forward 'getField' to its 'wrappedType',
thereby missing support for Object members on type variables.

Change-Id: I9b81d7e1f7c4fcc1620fd7d151af53b9046beda2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292362
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-04-01 21:16:19 +00:00
Ahmed Ashour e663ff334d [cfe] better console messages
Bug #50938

Change-Id: If7ea9478f0b0fc24d45e453a82231bae1ebd50e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280098
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-02-01 08:57:47 +00:00
Konstantin Shcheglov d4c443cfb7 Enable annotate_overrides lint in _fe_analyzer_shared/
Change-Id: Ic8e34af296368e8159fa75887ed54cbb4b550648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270226
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2022-11-17 15:13:39 +00:00
Lasse R.H. Nielsen 8a883fa54d Change : to = for default values in pkg.
Leaves some in parser test:
 pkg/front_end/parser_testcases/error_recovery/keyword_named_formal_parameter_prime.dart

TEST=Refactoring, covered by existing tests.

Change-Id: I7a83ef95df3cbd283878b3685b5c747bd89a1b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256125
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-08-24 15:57:16 +00:00
Johnni Winther fed3bc0125 [_fe_analyzer_shared] Updated id testing to provide regeneration command
In most case, id testing annotations can be regenerated automatical.
This updates the error reporting to include the regeneration commands.

The test system now also runs all tests in case of failures instead of
stopping after the first found failure.

Change-Id: Ice865bddccd8d1da416a1072b3927ed6adfa48fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240048
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-04-05 20:34:53 +00:00
Johnni Winther e9ba1d0481 [cfe] Apply phase 3 macro results.
This add supports for applying the result of phase 3 macros, so that
function bodies generated by macros are now included in the generated
AST.

Change-Id: I2ae5d00846dbffdfcb06086d1d1741703fae9fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234047
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-24 09:18:22 +00:00
Johnni Winther f24c4fa919 [cfe] Add initial support for applying the phase 1 macro results
This adds support for the generating a synthesized augmentation
library for each library in which phase 1 macros were applied.
Current implementation piggybacks on the patch library support. The
intension is that both patches and augmentations are handled through
the same general mechanism. For now, the wording refers to augmentation
libraries as patch libraries where the implementation is shared.

Testing is extended to verify that the generated classes are
included in the resulting AST.

Change-Id: Ie0d4cfdc84b55ca87e0014794f14b38e442f08eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233101
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-16 09:19:49 +00:00
Johnni Winther 9b7be8d117 [cfe] Call MacroExecutor for phase 3 macros
This CL adds capability for calling MacroExecutor to apply phase 3
macros to function declarations.

Change-Id: I1ab5bf33c8d9c6ce0c6706fe2bcafe2298ff292b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227720
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-01-17 16:24:55 +00:00
Johnni Winther 093bfcd883 [cfe] Migrate remaining front_end/lib/ libraries
Change-Id: Ia6efe9046b80709605aef1e7f38fce523baafa91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206081
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-07-07 19:11:04 +00:00
Mayank Patke 679e214f51 Fix nullability issue in id_testing.
Change-Id: Id1703aabbe6f6e425f3965770292e32ad664664b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191861
Auto-Submit: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-03-18 11:00:58 +00:00
Konstantin Shcheglov 9f986d2501 Migrate package:analyzer to null safety.
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-02-01 18:56:04 +00:00
Konstantin Shcheglov 3d67e6f998 Migrate _fe_analyzer_shared to null safety.
Some notes.

1. `Token.next` is `Token?` because there are null(s) for comment tokens.
  But I think that it is never `null` in code, because there is at
  least EOF token. So, lots of `!` null checks.

2. `Link.tail` is never null when `isNotEmpty`, but the type system
  cannot express it. So, some number of `!` null checks.

3. I keep assert(s) for now, and use comment
  `// ignore: unnecessary_null_comparison`.

4. I disabled `can_get_rid_of_nnbd_issue_error`, I think it fails
  because of changes in `_fe_analyzer_shared` language version.

Smoke test in google3 looks green.
https://test.corp.google.com/ui#id=OCL:346825148:BASE:346841611:1607632317129:6e87bf7

I have not tried yet full TAP, will do in the evening.

I have not tried yet Golem, or looked at benchmarks.

Change-Id: I651301e5d3a851dd77d73af960dac779cb0fc991
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-12-12 03:22:29 +00:00
Joshua Litt cbbd76ef2c [dart2js] Port deferred_loading_test to features.
Change-Id: I683f82fe1096963392f78f9dd3b640b66765b8b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166604
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-10-09 21:10:17 +00:00
Jens Johansen 4c0cab024e [parser] No longer support ?.[ syntax
Update CFE tests (and a few analyzer tests) to match the new world
of the syntax being unsupported.

Fixes https://github.com/dart-lang/sdk/issues/42681

Change-Id: I71bc973f36dfb978ddb825edb68530d8e260a58a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-11 08:09:59 +00:00
Johnni Winther 135c44afd9 [analyzer,cfe,dart2js] Ensure id-testing shards are deterministic
Sharding was based on the directory listing. Now we sort the entities
by test name before sharding to avoid dependency on the file system.

Change-Id: I5e6ecc191d84eb1820c05bcef0a27d8b03d89286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156025
Reviewed-by: Jens Johansen <jensj@google.com>
2020-07-29 09:45:59 +00:00
Paul Berry 4a4bb55150 Make "ID" tests insensitive to what directory they're run from.
Previously, they needed to be run from the root of the SDK repo, which
made testing under IntelliJ a pain, since by default IntelliJ runs
executables from the root of the local package.

Change-Id: I89d9bbbca38307016fcea4717010c19b9720b463
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154285
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-07-14 15:33:59 +00:00
Mayank Patke 3b67681bcc [dart2js] Clean up (pre-)NNBD unit test configurations.
Change-Id: Ife85aafa90b1b0347fabb6e95f3d6c00c5307cd2
Bug: https://github.com/dart-lang/sdk/issues/42063
Fixes: https://github.com/dart-lang/sdk/issues/42063
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152440
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-06-25 18:44:32 +00:00
Johnni Winther 7fce125300 [cfe,kernel] Add AstPrinter
This CL adds a Node.toText method together with an AstPrinter. These
facility and better toString implementation on AST nodes while allowing
for toString independent printing of AST to use in testing. This also
add support for an integrated toString of custom/internal nodes.

Some work is still needed in bringing the toString implementation on
all nodes to the old quality, and not all internal nodes have
customized textual representations yet. This work is left for future
CLs.

Change-Id: Ib0bf8a0bc02f489dfacdc8aa5f96da9c52f26058
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150923
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-06-16 17:15:10 +00:00
Johnni Winther e7bebea059 [analyzer,cfe,dart2js] Make id-testing wildcard customizable and unsupported by default
Change-Id: Id11dc3c04d1d42853566e492b7d5aead4a35a724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145781
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-05-04 12:58:24 +00:00
Joshua Litt 32c3a2cde7 [dart2js] Rebase nnbd expectations for 3 tests.
cfe_constant_test
inlining_test
jfield_analysis

Change-Id: Ib2833507f4e19f3d6a1e5055977bccc962b2d791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144494
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-24 18:30:03 +00:00
Joshua Litt 6f5f7ad05c [dart2js] rebase deferred_loading_test for nnbd.
Change-Id: Ia8cd18e19554afec57675bab64797984445556c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143820
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-23 01:17:58 +00:00
Johnni Winther dc97454b63 [analyzer,cfe,dart2js] Add pretty printing to id testing
Adds support for pretty printing verbose annotations.
Adds support for force updating annotation texts useful for applying
the pretty printing to valid annotations.

Change-Id: I8fe9b6d2f8198bd5e160854053c8d964ef832a8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129710
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-14 13:24:09 +00:00
Johnni Winther 25060e63c6 [cfe] Add tool for updating all id-tests and expectation tests
Change-Id: I191ebe0d59d44055a6818505db0112d3a452bdbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141242
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-03-27 14:52:20 +00:00
Johnni Winther a9162bd599 [analyzer,cfe] Implement mixed inheritance id test for analyzer
Change-Id: Ie4ce09b83c2a96a5ad16c60d2924f18cd90a4089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136633
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-24 13:28:26 +00:00
Johnni Winther 5829fc7829 [analyzer,cfe,dart2js] Add marker.options files to automate running id tests on all configurations
Change-Id: Ib5eb7f3967634721047f8dcc57b9e6c350b91a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136226
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-21 08:34:26 +00:00
Jens Johansen 81d4ac07d4 [CFE] Use package config v2
Change-Id: I32da9e8b2c1040db1521af4345f8e952c22bd30d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130864
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-12 10:07:25 +00:00
Johnni Winther 862d5012ae [cfe] Handle explicit opt-out in nnbd-not-enabled message
Closes #39835

Change-Id: I4ffa3377289f45b7ea909b5477ba53508040b9d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131076
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-01-15 10:30:43 +00:00
Johnni Winther 84c2a50aa0 [analyzer,cfe,dart2js] An indices to annotations preserve original order in id_generation
Change-Id: I0894baa6771b1c5a11a33007feebd1886aea032d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130704
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-10 11:51:17 +00:00
Johnni Winther c1dc711ee7 [analyzer,cfe,dart2js] Use id_generation to show annotation diff
Change-Id: I1f1d96b3be023e9e9cfa25425f57a540edad6f6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130703
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-10 11:51:17 +00:00
Johnni Winther 008e6ae60b [analyzer,cfe,dart2js] Add skipMap to id-testing
This supports skipping tests per configuration, for instance to add
nnbd-only tests and skip these in non-nnbd configurations.

Change-Id: I7eaebaa16d67129ce60cffa3594c766ff5e5bc66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130376
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-08 14:47:28 +00:00
Johnni Winther d2fcd678fd [analyzer,cfe,dart2js] Improve offset of generated library/class/member annotations
Change-Id: I76fea5f3479b5185433ec56efefb89071676e1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130375
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-01-08 14:47:28 +00:00
Johnni Winther 969fa962da [analyzer,cfe,dart2js] Do not generate annotations for empty values.
Change-Id: I0efa6287a44e340f9dc242b4ffc84fc8723e1049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129718
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-01-03 20:12:39 +00:00