Commit Graph

47 Commits

Author SHA1 Message Date
Konstantin Shcheglov 0c4fdb9ca4 Fix two Windows bot failures.
TBR

Change-Id: I3cda819e1deb953e0d899430f4e363541c4fef15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-23 04:24:55 +00:00
Michal Terepeta 9933192f36 Move watching generated Bazel files to an isolate
This does a few optimizations to improve the performance of the analyzer
when watching for generated files:

- We do all the polling in a separate isolate.

- We detect when Bazel finished running and only poll afterwards.

- We use a batch interface and deliver all changes at once (instead of
  one by one). This allows us to avoid resetting caches more often than
  necessary.

I had to remove one of the larger tests and created an integration test
instead, since the code for detecting the Bazel builds relies on
`dart:io` directly (`ResourceProvider` does not expose a way to
check for symlink targets).

Since this required a bit more code, I've decided to create a separate
file for it (`bazel_watcher.dart`).

Change-Id: I6c2383e7fd4348ab8af1af639b10db519c7a2f33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183010
Commit-Queue: Michal Terepeta <michalt@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-18 17:50:58 +00:00
Konstantin Shcheglov f1094d5c3a Use newPubspecYamlFile() to create pubspec.yaml files
Change-Id: I181a3f3f14810019731201bf43e27befa7bc5481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-22 21:32:00 +00:00
Konstantin Shcheglov bcbebc8fd5 Fix for resolving package: URIs with space in BazelPackageUriResolver.
Change-Id: I0de91dcb2438205b476dea99fa2231dd189ef094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184042
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-09 22:26:59 +00:00
Konstantin Shcheglov 4765ef5037 Remove 'actualUri' from UriResolver.resolveAbsolute()
Change-Id: I87edfa780e891a5e1ecdd1a9a548509e4cfa641a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-09 22:17:08 +00:00
Konstantin Shcheglov 74583b31ed Make looking for BUILD file substitutes in BazelWorkspace optional.
Disable it for DAS, we always have BUILD files when interactive analysis.

Change-Id: I095f74ad25698e7ec07ea94252ee287d29e6a52f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182122
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-02 17:03:14 +00:00
Paul Berry a42244f73b Flow analysis: begin tracking non-promotion reasons.
This CL implements the core flow analysis infrastructure for tracking
reasons why an expression was not promoted.  It supports the following
reasons:

- Expression was a property access
- Expression has been written to since it was promoted

I expect to add support for other non-promotion reasons in the future,
for example:

- `this` cannot be promoted
- Expression has been write captured
- Expression was a reference to a static field or top level variable

These non-promotion reasons are plumbed through to the CFE and
analyzer for the purpose of making errors easier for the user to
understand.  For example, given the following code:

  class C {
    int? i;
    f() {
      if (i == null) return;
      print(i.isEven);
    }
  }

The front end now prints:

  ../../tmp/test.dart:5:13: Error: Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
  Try accessing using ?. instead.
      print(i.isEven);
              ^^^^^^
  Context: 'i' refers to a property so it could not be promoted.

Much work still needs to be done to round out this feature, for example:

- Currently the analyzer only shows the new "why not promoted"
  messages when the "--verbose" flag is specified; this means the
  feature is unlikely to be noticed by users.

- Currently the analyzer doesn't show a "why not promoted" message
  when the non-promotion reason is that the expression is a property
  access.

- We need one or more web pages explaining non-promotion reasons in
  more detail so that the error messages can contain pointers to them.

- The analyzer and front end currently only show non-promotion reasons
  for expressions of the form `x.y` where `x` fails to be promoted to
  non-nullable.  There are many other scenarios that should be
  handled.

Change-Id: I0a12df74d0fc6274dfb3cb555abea81a75884231
Bug: https://github.com/dart-lang/sdk/issues/38773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181741
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-02-02 16:15:34 +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 693b9f730d Fix for resolving file URIs with special characters in BazelPackageUriResolver.
Change-Id: I2e9bb40aa3460b3b60e2354bff1b456851815ce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-18 03:41:19 +00:00
Darren Chan 1dc9c56f34 [analyzer] Fix GnWorkspaceTest for Windows.
Use convertPath to account for Windows vs non-Windows path seperators.

Change-Id: I9115c04acc986161d120fb363627fe2e302831f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Darren Chan <chandarren@google.com>
2021-01-05 17:42:09 +00:00
Darren Chan bb19112f22 [analyzer] Use package_config in GN workspaces.
Per http://fxr/445334, .packages files are no longer used within the
fuchsia tree. This inadvertently caused http://fxb/65752, where vscode
integration is broken.

This cl fixes this by updating _findPackagesFile to look for
`*package_config.json` files instead of `.packages` files.

Fixed: http://fxb/65752
Change-Id: I676fcecff49fd980255391555daca3ce5d5d9de9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Darren Chan <chandarren@google.com>
2021-01-05 14:43:38 +00:00
Michal Terepeta 97093b2594 Watch Bazel generated files for changes
This introduces a way to see what paths have been searched for by
the `BazelWorkspace` and adds a polling-based watcher to detect
when files generated by Bazel appear (or have changed). This allows
us to re-analyze things automatically instead of, e.g., restarting
the server.

Change-Id: I60eae29b0e4fcc3a91d8d2275c6898e45548ea03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168649
Commit-Queue: Michal Terepeta <michalt@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-12-09 09:39:19 +00:00
Konstantin Shcheglov 590c4c4b30 PackageBuildWorkspace should stop at the first pubspec.yaml found, don't go up.
Change-Id: I1b996b34055d6887816313d333175869f570ada1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-19 08:08:15 +00:00
Paul Berry 0ad6807c62 Fix BazelWorkspace.findPackageFor's handling of binPaths.
Previously, we were assuming that each path in `binPaths` was just one
level deeper than the corresponding source code path, and therefore we
could map a path in `binPaths` to the corresponding source code path
by just removing the first directory (e.g. map `bazel-out/foo/bar` to
`foo/bar`).  But this isn't correct: the paths in `binPaths` are more
deeply nested, e.g. `bazel-out/k8-fastbuild/bin`.  This CL changes the
algorithm to use `context.relative`, so that we get the correct path
mapping regardless of the nesting depth.

Change-Id: I870a7fca18e689691efcc32da527135643255eca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168127
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-18 23:35:16 +00:00
Konstantin Shcheglov b820083ed9 Issue 43439. Identify invalid URIs with double '/' or '.' in BazelPackageUriResolver.
Bug: https://github.com/dart-lang/sdk/issues/43439
Change-Id: Ifc7f24ff0e4938d85ddd225fbf576d3a60cc608c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163134
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-09-17 21:09:43 +00:00
Brian Wilkerson 1bbc412460 Add a method to WorkspacePackage to access the packages available to the receiver
Change-Id: Ib96e8bc05e848acda6b4c66f7080d106966e580e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160181
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-27 21:47:07 +00:00
Konstantin Shcheglov 0aa5b0f019 Files generated for other packages in PackageBuildWorkspace do not belong to the package.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I1608caf8fb54187f8154dd1510841f46a247383f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 01:26:57 +00:00
Konstantin Shcheglov a08a357bdb Remove unused code from PackageBuildWorkspacePackageTest.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I3e6fc8c87671b60c5152f273b3ff6da96c71b103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 18:57:51 +00:00
Konstantin Shcheglov 6a5030981c Remove ResourceProviderMixin.newFileWithBytes().
R=brianwilkerson@google.com

Change-Id: I741d75149c1ff7108a458f661eb583b3fd711ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:14:41 +00:00
Paul Berry 464641f51a Extend BaselPackageUriResolver to handle files outside of lib.
Generated files can exist outside of `lib`.  In a Bazel workspace
these are referred to using `file:` URIs that point to the generated
code directory.  We need to be able to resolve references both from
the generated code to non-generated code and vice versa.

This is blocking the use of the migration tool in Bazel workspaces,
since the migration tool doesn't have the same level of error recovery
as the rest of the analyzer, so it needs to be able to resolve all
files including generated ones.  But it should also improve the user
experience for using the analysis server in general in Bazel
workspaces, by reducing the number of nuisance "URI not resolved"
errors.

Change-Id: I38dababd29f4490746cc6e1eeede9f438526a815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-07-08 01:49:40 +00:00
Konstantin Shcheglov 92546833e6 Remove packageMap and hasFlutterDependency from Workspace interface.
Change-Id: I8b5c09a0331f038d32a634ee3d1b40dc695b5351
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-12 18:01:28 +00:00
Konstantin Shcheglov 92f14eee94 Stop passing ContextBuilder to Workspace(s).
R=brianwilkerson@google.com

Change-Id: I101a6c4cd91dcdffb9c76c88e7d6b3995f6109b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-11 19:45:12 +00:00
Konstantin Shcheglov 763b682963 Provide packages map to PackageBuildWorkspace.
Change-Id: Ibca7748c5c1260f392e931063cd1990eb26f8117
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130934
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-10 21:51:22 +00:00
Konstantin Shcheglov 8a0d30d4e2 Fix annotate-overrides in analyzer.
R=brianwilkerson@google.com

Change-Id: I7a587daf9715ded6450b28ecf3892ce4181aeb37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-23 00:02:37 +00:00
Konstantin Shcheglov 8299e0693f Fix PackageBuildPackageUriResolver.restoreAbsolute()
Bug: https://github.com/dart-lang/sdk/issues/39848
Change-Id: I0a8ee0e96e0035e33370dc6c5d65e499f639d8d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129305
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-20 19:07:44 +00:00
Konstantin Shcheglov d32e56f51c Fix BazelWorkspacePackageTest on Windows.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ie0be91f58bf6f3e0fed1410b6761d16ff07cb327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-16 18:40:38 +00:00
Konstantin Shcheglov 364dd8936b Fix unnecessary_new in analyzer.
R=brianwilkerson@google.com

Change-Id: I70f80baa3da4b14c0a52c1f28da16a9ad26d7dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-06 01:11:30 +00:00
Konstantin Shcheglov eee20b4e60 Fix prefer_equal_for_default_values in analyzer.
Change-Id: Ia72a2ac31d6cf6329c78baad6954ac9595a6c45a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127448
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-06 00:00:30 +00:00
Sam Rawlins aff0915ead Fix BazelWorkspaces in which multiple 'bin' directories exist, e.g. on distributed build systems
Change-Id: If619bdd64b1a00be41026643d7c84b8bd9d9dcc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125723
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-21 22:43:18 +00:00
Jaime Wren f414465c45 Analyzer refactoring Workspace.isBazelWorkspace() to a getter: get isBazel, this is follow up on https://dart-review.googlesource.com/c/sdk/+/125564
Change-Id: I7e1dbc6b695b04a65bbb17761162daece797f238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125470
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-19 19:05:59 +00:00
Jaime Wren 8dd2e8e693 Modify DeclarationsContext.getLibraries to consider the entire context if it is a BazelWorkspace
Change-Id: I3d06e46505741f9166acf66f68a9ee1654ac37d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125564
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2019-11-18 20:57:35 +00:00
Sam Rawlins 361af0d69a Fix BazelWorkspace.find and .findPackage for distributed environment.
Bug: b/127705208
Change-Id: I82d2a9986163ea8ca6ae24f82af2d138cf3bdd25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122590
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-23 21:17:57 +00:00
Sam Rawlins ba4f7f18cf Sort members in workspace tests
Change-Id: Ic9b6eb55d071c25b08e835b2768b41e7d57f101c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122491
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-23 04:32:47 +00:00
Paul Berry 27df933bd1 Fix some hints in the analyzer package.
Change-Id: I46dd91ef2a78dffc08f2fdb45d9646a966a3315d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102380
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-13 12:51:30 +00:00
Sam Rawlins dac5a56422 Fix workspace/package identification for package:build packages
Fixes https://github.com/dart-lang/linter/issues/1393

Change-Id: I064faad8da50bc1a6c8a80a0412f792914915f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102200
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-10 21:31:18 +00:00
Brian Wilkerson 481d6b9f30 Fix the windows bots
Change-Id: Ia3f796a174c03912975b37fb9904eea0a05f04c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100926
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-30 22:53:22 +00:00
Dan Rubel 49573f59d3 cleanup analyzer warnings
Change-Id: Ieb2fd5e64efe7dbd7da70b4ee2f723d0fd5243ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-29 17:50:26 +00:00
Sam Rawlins 05d33b1240 Add WorkspacePackage support for InSummarySource sources
An alternative fix to https://dart-review.googlesource.com/c/sdk/+/94356

In this case, `library.source.fullName` results in a String representation
of a library's package: URI. :(

To accomplish this, each *Workspace's contains() method is refactored from
taking a `String path` to taking a `Source source`, so as to use package: URIs
as much as possible, avoiding looking at the filesystem and poking around for
Workspace markers (BUILD, BUILD.gn, WORKSPACE, .jiri-root, etc). This avoids
the issue with InSummarySource sources, which have a non-path `.fullName`, but
have a valid `.uri`.

These issues were found when trying to enforce @sealed internally.

Change-Id: Ia46f28aa7aad0fc4483a180fa47f1e509402da6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94985
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-25 16:08:43 +00:00
Devon Carew 389ccc9000 when analyzing fuchsia workspaces, expect to find .fx-build-dir files
Change-Id: I7ac5dac157d86d1d98db476734d8f51cd8364851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-04-06 00:48:04 +00:00
Brian Wilkerson d7ad6b8c67 Ensure that all tests are run via test_all and add a test to ensure that it stays that way
Change-Id: I4a531179823a985f14307cbd444b31605d453d23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-03-17 19:21:12 +00:00
Brian Wilkerson 5787f08619 Clean up some hints in server and analyzer
Change-Id: Ia6bb5e4e4e398dbed29fe6649c490a88d4e0a406
Reviewed-on: https://dart-review.googlesource.com/c/92523
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-09 17:58:44 +00:00
Sam Rawlins c5a954794b Fix PackageBuildWorkspacePackage's contains
This implementation did not check whether the path was actually contained
in the package:build workspace. It also made an assumption about how a
resource which is a directory would be treated, which was masked by an
unconditional-and-silenced catch.

The existing test which should have caught this had a hidden exception,
caught by the same unconditional-and-silenced catch. :(

Bug: https://github.com/dart-lang/linter/issues/1393
Change-Id: I0a6ecb584e06877463a47681830eed8f6f914030
Reviewed-on: https://dart-review.googlesource.com/c/91441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-01-29 02:01:51 +00:00
Sam Rawlins b58aa3bcb2 Add PubWorkspace, integrate it into ContextBuilder, and therefore fix sealed test
Also add a superclass to BasicWorkspace and PubWorkspace, since the bulk of their
implementation is shared; Only find() and findPackageFor() need to be separate;
the package mapping and resolving can be shared.

Change-Id: I13932d6947d6dc28fc7223594e5bd2526f12f573
Reviewed-on: https://dart-review.googlesource.com/c/89167
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-14 21:36:49 +00:00
Sam Rawlins 16e98d012d Update BasicWorkspace's docs and tests
Change-Id: I7c2977ae63ec983ba71e31a75b2c3a13d89991c6
Reviewed-on: https://dart-review.googlesource.com/c/89083
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-01-11 01:11:18 +00:00
Sam Rawlins 0028491fdd Make package_build tests work on Windows
Make package_build tests work on Windows

Change-Id: I136aa4120aea5c55b125f4866b4c5f24e8d15812
Reviewed-on: https://dart-review.googlesource.com/c/87243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2018-12-13 19:02:57 +00:00
Sam Rawlins b7fc0208b0 Add WorkspacePackage and various implementations, for determining whether two files are in the "same package."
This includes _BasicWorkspacePackage for _BasicWorkspace, BazelWorkspacePackage
for BazelWOrkspace, GnWorkspacePackage for GnWorkspace, and
PackageBuildWorkspacePackage for PackageBuildWorkspace.

Bug: https://github.com/dart-lang/sdk/issues/34232
Change-Id: I686b529f460a108b8477d109d07fb29563dd7314
Reviewed-on: https://dart-review.googlesource.com/c/81523
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-12-13 16:44:31 +00:00
Konstantin Shcheglov 2beed40848 Move Workspace and its implementations into src/workspace.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I172d95e55ced9925e8f428b9b07f432251ef5248
Reviewed-on: https://dart-review.googlesource.com/c/85462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-11-27 21:50:00 +00:00