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

FileSystemException while building project #36615

Open
pinnisi opened this Issue Apr 13, 2019 · 6 comments

Comments

Projects
None yet
5 participants
@pinnisi
Copy link

pinnisi commented Apr 13, 2019

  • Dart SDK Version 2.2.0
  • Windows 10

run "webdev serve" on my project (that worked well in dart 1.x) give me lots of errors like this:

`webdev serve
Creating build script, took 13070ms
[INFO] Setting up file watchers completed, took 19ms
[INFO] Waiting for all file watchers to be ready completed, took 458ms
[INFO] Building new asset graph completed, took 7.1s
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms
[SEVERE] build_modules:module_library on "my-long-path".dart:

FileSystemException: Cannot create file, path = '"my-long-path".dart_tool/build/generated/
"my-long-path".module.library' (OS Error: Impossibile trovare il percorso specificato.
, errno = 3)
[SEVERE] build_modules:module_library on "my-long-path".dart`

already tried the workaround of registry settings as issue #27825 but with no luck.

of course I can shorten path names, but it's a really huge project with many branches, will be a big problem that can delay dart2 migration

@a-siva a-siva added the needs-info label Apr 15, 2019

@a-siva

This comment has been minimized.

Copy link
Contributor

a-siva commented Apr 15, 2019

Can you elaborate a bit more on which part of the Dart SDK you are using, dart2js or the dart VM, also were you using the IDE or was this done on the command line. It would be great if you could detail the steps you took after installing the Dart SDK to get to this error.

@sigmundch

This comment has been minimized.

Copy link
Member

sigmundch commented Apr 15, 2019

I believe this relates to webdev and build_runner

@jakemac53 @natebosch - what would be the correct repo to move this bug to? https://github.com/dart-lang/webdev/?

@natebosch

This comment has been minimized.

Copy link
Member

natebosch commented Apr 15, 2019

@sigmundch - no, this is an SDK issue. If the VM cannot handle long file names there isn't a whole lot we can do about it on the build system side. Switching to relative paths could be risky for us and it's not clear to me it would be possible in all cases.

@pinnisi

This comment has been minimized.

Copy link
Author

pinnisi commented Apr 15, 2019

Can you elaborate a bit more on which part of the Dart SDK you are using, dart2js or the dart VM, also were you using the IDE or was this done on the command line. It would be great if you could detail the steps you took after installing the Dart SDK to get to this error.

I'm using IntelliJ, but I run "webdev serve" from command line. To reproduce, just create a path longer than 260 chars (including .dart_tool/build/generated/ ...)

@no-response no-response bot removed the needs-info label Apr 15, 2019

@sigmundch sigmundch added the area-vm label Apr 15, 2019

@a-siva

This comment has been minimized.

Copy link
Contributor

a-siva commented Apr 15, 2019

/cc @bkonyi

@bkonyi

This comment has been minimized.

Copy link
Contributor

bkonyi commented Apr 15, 2019

MAX_PATH is defined as 260 characters on Windows. If you're using a path longer than that, you need to prefix it with \\?\ as stated here. We'll have to investigate whether or not this prefix is something we can automatically do on Windows without any unintended side effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.