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

Issue 1198423002: gracefully degrade if package map input file cannot be watched (Closed)

Created:
5 years, 6 months ago by danrubel
Modified:
5 years, 6 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

gracefully degrade if package map input file cannot be watched BUG= Committed: https://github.com/dart-lang/sdk/commit/679de372f43b7afd7ca7a25169b1c53842581596

Patch Set 1 #

Patch Set 2 : rework patch #

Patch Set 3 : rework patch #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M pkg/analysis_server/lib/src/context_manager.dart View 1 2 1 chunk +1 line, -1 line 2 comments Download

Messages

Total messages: 5 (1 generated)
danrubel
Committed patchset #3 (id:40001) manually as 679de372f43b7afd7ca7a25169b1c53842581596 (presubmit successful).
5 years, 6 months ago (2015-06-22 21:07:17 UTC) #1
danrubel
5 years, 6 months ago (2015-06-22 21:08:05 UTC) #3
Paul Berry
https://codereview.chromium.org/1198423002/diff/40001/pkg/analysis_server/lib/src/context_manager.dart File pkg/analysis_server/lib/src/context_manager.dart (right): https://codereview.chromium.org/1198423002/diff/40001/pkg/analysis_server/lib/src/context_manager.dart#newcode441 pkg/analysis_server/lib/src/context_manager.dart:441: if (resource is File && resource.exists) { This introduces ...
5 years, 6 months ago (2015-06-22 21:19:31 UTC) #4
danrubel
5 years, 6 months ago (2015-06-22 21:54:46 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/1198423002/diff/40001/pkg/analysis_server/lib...
File pkg/analysis_server/lib/src/context_manager.dart (right):

https://codereview.chromium.org/1198423002/diff/40001/pkg/analysis_server/lib...
pkg/analysis_server/lib/src/context_manager.dart:441: if (resource is File &&
resource.exists) {
On 2015/06/22 21:19:31, Paul Berry wrote:
> This introduces a race condition, because it's possible that the file will be
> deleted between the call to .exists here and the existence check that
presumably
> happens inside the watcher.
> 
> It would be better to simply handle the error condition from the file watcher.

> Not only would that eliminate the race condition, it would avoid performing a
> redundant existence check in the common scenario where we *aren't* racing with
> some other process.

I tried doing that in an earlier iteration of this CL, but could not convince
myself that it would properly handle file system errors without masking problems
in _recomputePackageUriResolver. Based on our conversation I reworked this in
another CL : https://codereview.chromium.org/1199083002

Powered by Google App Engine
This is Rietveld 408576698