Commit Graph

936 Commits

Author SHA1 Message Date
Sam Rawlins 8fcb9e4b0e Migrator: draw a hard edge when marking an AsExpression non-nullable
Fixes https://github.com/dart-lang/sdk/issues/41397

Change-Id: I03307f297954f97911ed501240df17e48ef2dfc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151480
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-17 14:38:24 +00:00
Paul Berry 0b12c1d775 Migration: fix crash when there is an extension in code not being migrated
Change-Id: Ie7d4daf827f7803ea4001a26e06aa58577b9d49a
Bug: https://buganizer.corp.google.com/issues/158730342
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151443
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-17 14:03:44 +00:00
Paul Berry a9bb706ce2 Migration: allow the client to specify which files to analyze/migrate.
Change-Id: Ie49f003640342a8c0d26b4f509a9268200955dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151302
Reviewed-by: Janice Collins <jcollins@google.com>
2020-06-16 21:10:11 +00:00
Mike Fairhurst e11eb2cd08 [nnbd_migration] Fix #42263, tool inserting ! on toString/hashCode
Fixed: 42263
Change-Id: Ia4c6d3543bc7628c76b85d986b9709de58925884
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151441
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-16 20:21:31 +00:00
Sam Rawlins efcb8f9213 Migrator: Do not connect return values to return types on generators
Fixes https://github.com/dart-lang/sdk/issues/42299

Change-Id: I07b3955907efa3007ec146f4cb4170b117b58dcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151328
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-16 14:08:54 +00:00
Sam Rawlins 61184814e2 Migrator: use dart pub to check outdated
Fixes #42343

This also prevents a crash if the binary-to-execute could not be found.

Change-Id: I19dd9f6dcbb41a5c8b4ef2a04a87c1fc83429120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151327
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-16 14:08:04 +00:00
Sam Rawlins 459255ab09 Migrator: Fix navigating to top-of-file
There is logic to navigate to the top of a newly-loaded page. It
broke with a visual redesign, in which the title of a page is always
sitting at the top of the screen. The new logic will scroll the page
to the first line of source text.

Change-Id: I685d1fb96c6ca1789f114871acd2bb8148e6ae7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151032
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-15 18:15:12 +00:00
Paul Berry 2fbe5c1f54 Migration: Make the three migration phases explicit in NonNullableFix API.
Previously the API was general, exposing a `numPhases` integer, and
providing a generic processing function with a `phase` argument.  This
was necessary back when migration was built into DartFix (because
different kinds of fixes had different numbers of phases), but now
that migration is a separate tool, it gets in the way because it makes
it difficult for the caller to have different behaviors in different
phases.

This is a prerequisite for making it possible to have some files
analyzed but not finalized (which is in turn necessary for handling
generated files).

Change-Id: I5993808eb3dace21d8b6cb9c5308f94a3b1f898e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151081
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-15 15:26:48 +00:00
Paul Berry 9f8776f4a9 Migration: split out a MigrationCliRunner API from MigrationCli.
This API can be used by tools that wish to perform migration but want
to provide their own command-line argument parsing.

Change-Id: Ic54e993139c803ded5ac39229ae84980db12184e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151080
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-06-15 15:26:48 +00:00
Paul Berry a7c93201e4 Migration: rework how MigrationCli.run() reports an exit code.
Previously, MigrationCli.run() would always return, but it would set
MigrationCli.exitCode to indicate whether an error occurred.  This
made it necessary to thread a lot of tricky logic around to ensure
that we would exit quickly if an error occurred.  This CL switches to
using an exception, so we get the same effect automatically.

Change-Id: I2b885092dec551700900b118ec3d9acd2f3649d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150760
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-06-15 15:26:48 +00:00
Sam Rawlins 3dc27a55fa Migrator: Add a failing test for #42327
Bug: https://github.com/dart-lang/sdk/issues/42327
Change-Id: I5ac4dbaf95efdc7b54ea4009b78187e519cac92d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151094
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-13 14:31:15 +00:00
Sam Rawlins 213f805294 Migrator: Bump highlight.js to 10.1.0
Fixes https://github.com/dart-lang/sdk/issues/41885

Change-Id: I2c19a36f0eb46e2941ca143c23e2b0be938b7d96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151089
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-12 22:17:12 +00:00
Sam Rawlins b907f9928f Migrator: Begin flow analysis on top-level annotations
Fixes https://github.com/dart-lang/sdk/issues/42295

Change-Id: I9d224b5c8a3fa5d57f17e434a9e6dfbcebc14781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151026
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-12 22:01:32 +00:00
Paul Berry b1442a1f9a Remove unused import
Change-Id: I6d25e5ea3f1fdf320ec85d5f405789e6e8c2ddf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151084
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-12 20:25:39 +00:00
Paul Berry 43131b575e Migration: fix crashes with extension Foo<T extends ...> on T
Change-Id: I3a8f1be4f52a6a49bb57ab032fef668482f5acf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151002
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-12 18:21:15 +00:00
Devon Carew c607eb9637 [nnbd_migration] address an issue with the progress text written to stdout
Change-Id: I8bd4b4a291d1d64b48752c06f2ec7784e5bac819
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151040
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-12 00:18:46 +00:00
Mike Fairhurst 6b40b26044 [nnbd_migration] Print warning when SDK_PATH is set and things go wrong.
Also clean up sanity checking code a little bit.

Change-Id: I4274dad42687a4dc419090d656ec56168c982c29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150661
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-11 17:19:51 +00:00
Paul Berry 2a5c122d4a Migration: Fix EdgeBuilder._unimplemented if node==null
Change-Id: Id1a297f1ee5eaf4d7111ad081a0a8c49cb334303
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150801
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-11 16:14:42 +00:00
Samuel Rawlins 5a32ff0d7f Revert "Bump cli_util to 0.2.0; implement new methods"
This reverts commit ebcc6dc2a2.

Reason for revert: Broke golem. I think there are more implementations of Logger than I realized.

Original change's description:
> Bump cli_util to 0.2.0; implement new methods
> 
> This fixes the issue of progress indicators being shown during tests.
> 
> Change-Id: I39fd68cfeca70a63d088aceb4325b42c53766afd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150669
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>

TBR=paulberry@google.com,jcollins@google.com,mfairhurst@google.com,srawlins@google.com

Change-Id: I52ac0f5d96a161534c28cc160c2a2b3b364ad511
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150693
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-10 23:59:05 +00:00
Sam Rawlins ebcc6dc2a2 Bump cli_util to 0.2.0; implement new methods
This fixes the issue of progress indicators being shown during tests.

Change-Id: I39fd68cfeca70a63d088aceb4325b42c53766afd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150669
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-10 22:10:06 +00:00
Paul Berry ae3b975373 Migration: exit early if an exception occurs
Change-Id: I108b64d75f9eb4ab376dfacaaeafcac1ef333755
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150580
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-06-10 13:50:27 +00:00
Paul Berry aa2566410f Migration: Add a flag to allow the user to ignore exceptions.
This should allow users to work around bugs while waiting for fixes
from the migration team.

Change-Id: I04fe08b4753ee1377a60ec60728a16560847536f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150542
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-10 13:50:27 +00:00
Mike Fairhurst 2a3d15e16f [nnbd_migration] Decorate Never type.
Both John and I have hit this in our own projects, seemed worth fixing.

Change-Id: Ic053287d365b92cbfd72448fe401ca627891f802
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150663
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-06-10 04:24:17 +00:00
Paul Berry e4aaa1146b Sort declarations in migration_cli.dart
Change-Id: I05025f629080725f39a762c1d9f54d3aac7bf950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150463
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-08 23:44:50 +00:00
Paul Berry 96c2cc2589 Migration: fix class hierarchy handling in FixBuilder.
When running the FixBuilder we need to override the behavior of
ClassElement.interfaces so that it returns the post-migration
interface types.  We also need to override the behavior of
LibraryElement.isNonNullableByDefault so that the library being
migrated is considered opted in during FixBuilder analysis.  This
required adding hooks to the analyzer to allow those overrides.

Additionally, since the analyzer caches the InheritanceManager, we
need to clear that cache out just prior to running the FixBuilder, so
that no pre-migration interface types leak into the FixBuilder.

Fixes #40475.
Fixes #42139.

Change-Id: I45e2c30ebe8c12e4a599e2458d77a3731bad0f98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150260
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-08 17:26:41 +00:00
Devon Carew 88f20ece1e [nnbd_migration] re-land a fix for migrating packages with multiple contexts
Change-Id: I60365e4a159f8696b17a8dd7f6d3fa0641a5afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149889
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-06-04 17:05:57 +00:00
Paul Berry ac45f23134 Migration: Fix reporting of exceptions.
Permissive mode in the analyzer currently is broken, leading to a
useless stacktrace if an exception occurs.  As a quick fix, turn
permissive mode off, so the exception just bubbles up normally and
shows on the console.  In follow-up CLs I'll actually fix permissive
mode and add a user option to enable it.

Fixes #42138.

Change-Id: I59322ca9dd90b856c56a6ec335762b94ec6935b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149863
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-04 13:01:51 +00:00
Devon Carew ceb08283df Revert "[nnbd_migration] handle multiple contexts"
This reverts commit 54adfeb93f.

Reason for revert: this breaks the windows bot

Original change's description:
> [nnbd_migration] handle multiple contexts
> 
> Bug: https://github.com/dart-lang/sdk/issues/42141
> Change-Id: I64179cd3fa0389397a8a9b3a763fbb1a3719294e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149664
> Commit-Queue: Devon Carew <devoncarew@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>

TBR=paulberry@google.com,devoncarew@google.com

Change-Id: I793d8f4a2832e7da0cb30565aee4a4806c0b0e02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/42141
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149803
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-06-03 16:04:53 +00:00
Mike Fairhurst e39568516b [nnbd_migration] Fix #42117, cannot load edit details on windows.
Change-Id: I5b10861b870d0d3d37a9abfacbc18152844e4ec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149760
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-03 12:20:19 +00:00
Devon Carew 54adfeb93f [nnbd_migration] handle multiple contexts
Bug: https://github.com/dart-lang/sdk/issues/42141
Change-Id: I64179cd3fa0389397a8a9b3a763fbb1a3719294e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149664
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-02 18:40:43 +00:00
Sam Rawlins 93d39a5ef5 Migrator: Edit the package_config.json file
Bug: https://github.com/dart-lang/sdk/issues/41765
Change-Id: I019a97427b6faa4d4f5335b64424fab4bc3c5cde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149611
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-06-02 15:51:11 +00:00
Sam Rawlins b9a89b223f Migrator: improve pubspec parsing
* Prevent cast exception crash when pubspec.yaml is not a map
* Prevent cast exception crash when pubspec sdk is not a string
* Test error cases for parsing pubspec.

Change-Id: Id392815207dc52719cfec5038d6fa2d09f952f08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149602
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-01 17:57:07 +00:00
Devon Carew 2c5739bd2b [nnbd_migration] update the CLI instructions of the migration tool
Change-Id: If42abe73b9a6640e3e1a7d2ecc23bd604c57238e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149603
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-06-01 16:25:04 +00:00
Mike Fairhurst 42b71b8f9e [nnbd_migration] Fix #41795, delete/change hint causes rerun.
This is only an issue for the old style (not in stacktrace) buttons.

I did not add a test for this; there are many tests for this code in the
new workflow, inside UnitInfo.handleSourceEdit, etc, and this code path
will be removed soon hopefully.

I *did* test manually and saw that it works.

Change-Id: Iac8ba4cb775b9b15c8db1c1cadd4701da81452be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149382
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-29 14:33:15 +00:00
Sam Rawlins d79c5b5d31 Migrator: run pub outdated from the correct directory
Fixes https://github.com/dart-lang/sdk/issues/42084

Change-Id: I74eb3cbf61f4346b82f81f77977989fbbd7f8274
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149366
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-29 00:23:09 +00:00
Sam Rawlins 2dea325d87 Migrator: use pub.bat on Windows
Fixes https://github.com/dart-lang/sdk/issues/42102

Change-Id: Ic2dd785a84835402c7af3ef7b8d15285585a0afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149386
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-28 23:17:12 +00:00
Paul Berry bf30eb53e2 Migration: Remove "fantasy land" functionality
We're not currently working on this, and it has some dependencies that
interfere with publishing the migration tool.  If we wind up needing
it again, we can always revert.

Change-Id: Ia6219ac376cef77bda7470777eaf2bebf38769b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149343
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2020-05-28 22:05:05 +00:00
Paul Berry 2e261f9386 Migration: add locations to trace entries that refer to elements.
Bug: https://github.com/dart-lang/sdk/issues/41402
Change-Id: I0dc59ae9d64c6e8ab470b2ddcb5fd42557ba5704
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148742
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-27 21:52:14 +00:00
Mike Fairhurst 76839d5e4d [nnbd_migration] Fix navigation urls on windows.
Change-Id: I226b36039c781e3f12b76e8ee3a5ae5e8eefcbed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149055
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-05-27 19:56:14 +00:00
Konstantin Shcheglov 279024d823 Deprecate InstanceCreationExpression.staticElement
Change-Id: I3c2de8ce22944963418d543b887720db15badd0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148981
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-26 22:56:42 +00:00
Sam Rawlins 0f7653bb66 Migrator: Fix crash when target of extension method invocation has type names
Fixes https://github.com/dart-lang/sdk/issues/41958

Change-Id: Ib6e3b9d8fbb9d0083c007118a346150d57969461
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148884
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-26 17:54:13 +00:00
Konstantin Shcheglov 80e9667f2c Fix unused imports.
R=brianwilkerson@google.com

Change-Id: I02f47632bef3a2e601f7f471c7149829e06844f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-25 16:58:38 +00:00
Sam Rawlins 16b90d2085 Migrator: Check dependencies with pub outdated
Fixes https://github.com/dart-lang/sdk/issues/41769

Change-Id: I892322076c1d03026c42c13b98bb1dcb466e9263
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148789
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-05-21 22:06:53 +00:00
Sam Rawlins 07dd27673a Migrator: Fix crash when casting to generic type
Fixes https://github.com/dart-lang/sdk/issues/41955

Change-Id: I6ca9f1ceae7992f4085f96c927ec989dbb6e2568
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148741
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-21 17:09:43 +00:00
Sam Rawlins 562b11a4d8 Migrator: Add types to implicitly-typed field formal parameters
Fixes https://github.com/dart-lang/sdk/issues/38453

Change-Id: I56474071fcc7d408487fc74bd76d7520022f0259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148643
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-20 22:29:14 +00:00
Mike Fairhurst 361070ba3f Reland [nnbd_migration] Fix two popup style bugs
Relands https://dart-review.googlesource.com/c/sdk/+/148642

Due to a z-index bug, regions are showing up on top of the popup. Fixed.

A regression during a previous a.button/.button change that meant that
the close button wasn't rendered as a button.

Previous change from `a.button/.button` reduced the specificity which
caused incorrect font color in edit link buttons. This has been fixed by
using `.button, a.button` so that we keep the desired specificity but
also keep applying the style to all elements with the `button` class.

Change-Id: Idb5eb154904430d946a80b7574537564b7c71bd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148646
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-05-20 18:04:02 +00:00
Mike Fairhurst 5910a61a7b [nnbd_migration] Show error popup on GET requests, refused connections.
I noticed that failed GET requests did not show the error popup. At the
time it seemed like uncommon enough to not be a priority, but this is
occurring frequently for windows users, so it's not reasonable to rule
this out and should be handled.

I also have seen that if the preview server is killed, we get an
unhandled `ProgressEvent` error which is just "instance of minified:ew",
handle that case more gracefully as well.

Change-Id: I4f1f307dc33cd7bf0d76a9702df6728dda09926e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148601
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-05-20 18:01:51 +00:00
Paul Berry 15df850fd3 Migration: fix trace display for variable and field types.
Change-Id: Ib601fea6b6edd50a047471fe4eacf56339e4a4a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147345
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-20 15:09:10 +00:00
Mike Fairhurst 4e2f7ac9a2 [nnbd_migration] Fix navigation tree on windows.
Ensure that the preview server responds with full paths so that the
front end does not need to do path magic on relative links, and test
that those full paths are correct on both windows and linux.

Remove [UnitLink.uri], as it is no longer correct, and it does not have
access to a [PathMapper] which is necessary to build a correct URI.

Change-Id: I7ef764d84c0859d72a21134dc042f837767e91b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148565
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 21:08:51 +00:00
Mike Fairhurst a2a98e2362 [nnbd_migration] Fix stack trace links on windows.
Previously, the backend was returning a relative URI, but that doesn't
work when you have stack traces across root directories. So the front
end used path logic to turn the relative path into an absolute one, but
it didn't do this correctly on windows.

Instead just send an absolute path (still a relative URI, though) from
the backend.

Change-Id: Ied06a9d948851fcf6dc1d4aa007961d3d2a000fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148564
Reviewed-by: Paul Berry <paulberry@google.com>
2020-05-19 21:08:51 +00:00