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

Issue 450103002: Support for pubspec based contexts in subfolders. (Closed)

Created:
6 years, 4 months ago by scheglov
Modified:
6 years, 4 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support for pubspec based contexts in subfolders. R=brianwilkerson@google.com, paulberry@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=39036

Patch Set 1 #

Patch Set 2 : tweak for tests #

Total comments: 16
Unified diffs Side-by-side diffs Delta from patch set Stats (+368 lines, -30 lines) Patch
M pkg/analysis_server/lib/src/context_manager.dart View 11 chunks +227 lines, -30 lines 16 comments Download
M pkg/analysis_server/test/context_manager_test.dart View 1 5 chunks +133 lines, -0 lines 0 comments Download
M pkg/analysis_server/test/mocks.dart View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
scheglov
6 years, 4 months ago (2014-08-08 02:43:51 UTC) #1
Brian Wilkerson
LGTM https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/src/context_manager.dart File pkg/analysis_server/lib/src/context_manager.dart (right): https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/src/context_manager.dart#newcode41 pkg/analysis_server/lib/src/context_manager.dart:41: * The [path.Context] for this manager. I assume ...
6 years, 4 months ago (2014-08-08 14:00:03 UTC) #2
scheglov
https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/src/context_manager.dart File pkg/analysis_server/lib/src/context_manager.dart (right): https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/src/context_manager.dart#newcode41 pkg/analysis_server/lib/src/context_manager.dart:41: * The [path.Context] for this manager. On 2014/08/08 14:00:02, ...
6 years, 4 months ago (2014-08-08 15:54:33 UTC) #3
scheglov
Committed patchset #2 manually as 39036 (presubmit successful).
6 years, 4 months ago (2014-08-08 15:55:12 UTC) #4
Paul Berry
lgtm https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/src/context_manager.dart File pkg/analysis_server/lib/src/context_manager.dart (right): https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/src/context_manager.dart#newcode113 pkg/analysis_server/lib/src/context_manager.dart:113: Set<Folder> currentFolders = _contexts.keys.toSet(); On 2014/08/08 14:00:02, Brian ...
6 years, 4 months ago (2014-08-08 16:07:10 UTC) #5
scheglov
6 years, 4 months ago (2014-08-08 16:34:23 UTC) #6
Message was sent while issue was closed.
Comments addressed in https://codereview.chromium.org/454063002

https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/...
File pkg/analysis_server/lib/src/context_manager.dart (right):

https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/...
pkg/analysis_server/lib/src/context_manager.dart:113: Set<Folder> currentFolders
= _contexts.keys.toSet();
On 2014/08/08 16:07:10, Paul Berry wrote:
> On 2014/08/08 14:00:02, Brian Wilkerson wrote:
> > Are we making a copy to avoid modifying the keys while we're iterating over
> > them? I can't see where that would happen, but I might be missing something.
> 
> Agreed, but if we go with my suggestions below, then the keys will be modified
> while we're iterating over them, so I'd say let's keep this line as is.
> 
> One nit, though: the name "currentFolders" isn't very meaningful to me--I keep
> forgetting that it is the set of folders associated with current *contexts*. 
> How about if we call it "contextFolders"?

Done.

https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/...
pkg/analysis_server/lib/src/context_manager.dart:121:
oldFolders.add(currentFolder);
On 2014/08/08 16:07:10, Paul Berry wrote:
> I think it would be clearer to just do:
> 
>   _destroyContext(currentFolder);
> 
> immediately, and drop the "oldFolders" set.

Done.

https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/...
pkg/analysis_server/lib/src/context_manager.dart:129:
newFolders.add(includedFolder);
On 2014/08/08 16:07:10, Paul Berry wrote:
> Similarly, I think it would be clearer to just to:
> 
>   _createContexts(includedFolder, false);
> 
> immediately, and drop the "newFolders" set.

Done.

https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/...
pkg/analysis_server/lib/src/context_manager.dart:188: */
On 2014/08/08 16:07:10, Paul Berry wrote:
> Can you document the meaning of "withPubspecOnly" here?

Done.

https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/...
pkg/analysis_server/lib/src/context_manager.dart:232: Map<String, Source>
extractSources = new HashMap<String, Source>();
On 2014/08/08 16:07:10, Paul Berry wrote:
> Rename to "extractedSources"

Done.

https://codereview.chromium.org/450103002/diff/20001/pkg/analysis_server/lib/...
pkg/analysis_server/lib/src/context_manager.dart:361: _addSourceFiles(changeSet,
info.folder, parentInfo);
On 2014/08/08 16:07:10, Paul Berry wrote:
> It looks like this will re-read the directory contents.  Would it be better to
> just extract the sources from the old context and merge them into the parent,
as
> we do in _extractContext?

Done.

Powered by Google App Engine
This is Rietveld 408576698