Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dartanalyzer fails when user's home directory does not exist. #37308

Closed
zeroomega opened this issue Jun 19, 2019 · 2 comments
Closed

dartanalyzer fails when user's home directory does not exist. #37308

zeroomega opened this issue Jun 19, 2019 · 2 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. customer-fuchsia type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@zeroomega
Copy link

zeroomega commented Jun 19, 2019

This tracker is for issues related to:

  • Analyzer

  • Dart SDK Version (dart --version)
    version 2.3.2-edge.b37aa3b03650c60ab47b78b2163382d889ecb5df

  • Whether you are using Windows, MacOSX, or Linux (if applicable)
    Linux

  • Whether you are using Chrome, Safari, Firefox, Edge (if applicable)
    N/A

I am working on adding dartanalyzer support in goma (remote build system) so our team can speed up the build. But when I tried my dartanalyzer support prototype, it always fails with following messages:

Unhandled exception:
FileSystemException: Creation failed, path = '/nonexistent/.dart' (OS Error: No such file or directory, errno = 2)
#0      _Directory.createSync (dart:io/directory_impl.dart:138:7)
#1      createAnalyticsInstance (package:telemetry/telemetry.dart:62:9)
#2      analytics (package:analyzer_cli/src/driver.dart:74:5)
#3      Driver.start (package:analyzer_cli/src/driver.dart:177:5)
<asynchronous suspension>
#4      main (file:///b/s/w/ir/k/dart/sdk/pkg/analyzer_cli/bin/analyzer.dart:18:17)
<asynchronous suspension>
#5      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:32)
#6      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

After digging into the source code of dartanalyzer, I figure out dartanalyzer will try to write its analytics data into user's home directory, which is fine. But it shouldn't fail if the home directory is not writable or not exist. Some build bots may not have a home directory or may not have a writable file-system.

I also tried '--use-analysis-driver-memory-byte-store' flag but the exception persists.

c.c. @petrhosek

@mit-mit mit-mit added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Jun 19, 2019
@zanderso zanderso added customer-fuchsia type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jun 24, 2019
@zanderso
Copy link
Member

/cc @bwilkerson @devoncarew

@devoncarew devoncarew self-assigned this Jun 27, 2019
dart-bot pushed a commit that referenced this issue Jun 28, 2019
Bug: #37308
Change-Id: I2e117a678bfc99dcc3f48d4a58ea5895d0079261
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107580
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
@devoncarew
Copy link
Member

fixed in 983447f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. customer-fuchsia type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants