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

Issue 2226973005: Basic linking in PubSummaryManager. (Closed)

Created:
4 years, 4 months ago by scheglov
Modified:
4 years, 4 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Basic linking in PubSummaryManager. Many features are not implemented yet, but I'd like to show to you and if it a step in the correct directlion, land it. R=paulberry@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/de837749a2b437bc720844c01424fe3adcf8f102

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+295 lines, -23 lines) Patch
M pkg/analysis_server/lib/src/analysis_server.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/lib/src/summary/pub_summary.dart View 5 chunks +152 lines, -11 lines 6 comments Download
M pkg/analyzer/test/src/summary/pub_summary_test.dart View 7 chunks +142 lines, -11 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
scheglov
4 years, 4 months ago (2016-08-09 21:32:06 UTC) #1
Paul Berry
lgtm as a starting point. I have some concerns below but feel free to land ...
4 years, 4 months ago (2016-08-09 22:24:11 UTC) #2
scheglov
Committed patchset #1 (id:1) manually as de837749a2b437bc720844c01424fe3adcf8f102 (presubmit successful).
4 years, 4 months ago (2016-08-10 01:03:21 UTC) #4
scheglov
4 years, 4 months ago (2016-08-10 01:12:49 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/2226973005/diff/1/pkg/analyzer/lib/src/summar...
File pkg/analyzer/lib/src/summary/pub_summary.dart (right):

https://codereview.chromium.org/2226973005/diff/1/pkg/analyzer/lib/src/summar...
pkg/analyzer/lib/src/summary/pub_summary.dart:398: // Ignore SDK imports.
On 2016/08/09 22:24:10, Paul Berry wrote:
> I'm concerned that treating the SDK specially may be a mistake.  If the user
> downloads a new release of the SDK, then assuming that SDK exposes a different
> API signature than the previous version, everything will need to be re-linked.

> I think the easiest way to make sure this happens correctly is to treat the
SDK
> as a separate build unit, and don't try to do any special casing of the
> dependency computation algorithm.  That way all the packages will
automatically
> depend on the SDK, so the SDK's API signature will automatically get included
in
> the dependency hash for those packages, and things will get re-linked as
> appropiate.

  Yes, at the point when we will store linked summaries into file system, we
need to use SDK and referenced packages API signatures.

> 
> A similar situations exists for Flutter, but it's more complicated, for two
> reasons: 1. Flutter modifies the SDK using _embedder.yaml, so the summary
we'll
> need to use for the SDK is different from the standard SDK summary.  2.
Flutter
> extends the SDK using _sdkext, and that extension in effect constitutes a
> separate build unit.  I'm not sure how to handle #1 yet, but I think the way
to
> handle #2 is just to let it be in its own summary, and let the
> computeDependencies() algorithm treat it normally.

https://codereview.chromium.org/2226973005/diff/1/pkg/analyzer/lib/src/summar...
pkg/analyzer/lib/src/summary/pub_summary.dart:400: referencedUris.add(uri);
On 2016/08/09 22:24:10, Paul Berry wrote:
> This seems unnecessarily complex.  Since there's always exactly one node per
> package, can't we just extract the package name at this point and then map it
to
> a node?
> 
> (Or maybe you are hoping some of this code can be re-used in use cases where
> there are multiple summaries per package)

True, this can be simplified.
No, I don't plan to split packages into multiple linked bundles.

https://codereview.chromium.org/2226973005/diff/1/pkg/analyzer/lib/src/summar...
pkg/analyzer/lib/src/summary/pub_summary.dart:425: print('evaluate: $v');
On 2016/08/09 22:24:10, Paul Berry wrote:
> Delete

Done.

Powered by Google App Engine
This is Rietveld 408576698