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

Support running without a packages/ directory #327

Closed
zoechi opened this issue Aug 23, 2015 · 14 comments
Closed

Support running without a packages/ directory #327

zoechi opened this issue Aug 23, 2015 · 14 comments
Labels
status-blocked Blocked from making progress by another (referenced) issue type-enhancement A request for a change that isn't a bug

Comments

@zoechi
Copy link

zoechi commented Aug 23, 2015

pub run test

 (master) $ pub run test
00:00 +0 -1: loading test/server_build/find_dependencies_test.dart                                 
  Failed to load "test/server_build/find_dependencies_test.dart":
  "package:test/src/backend/metadata.dart": Error loading file:///home/myuser/dart/pubs/packages/test/src/backend/metadata.dart:
    Cannot open file, path = '/home/myuser/dart/pubs/packages/test/src/backend/metadata.dart' (OS Error: No such file or directory, errno = 2)
  #0      _asyncLoadErrorCallback (dart:_builtin:149)
  #1      _asyncLoadError (dart:_builtin:541)
  #2      _handleLoaderReply (dart:_builtin:364)
  #3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

Dart VM version: 1.13.0-edge.41840f374008c8430c1bf034f65af1c2c39e19f5 (Fri Aug 21 16:18:10 2015) on "linux_x64"
test 0.12.4+6

@rayk
Copy link

rayk commented Aug 24, 2015

Same Problem - Earlier Version of dart

Dart VM version: 1.12.0-dev.5.8 (Thu Aug 20 07:16:22 2015) on "macos_x64"
test version: "0.12.4+6"


pub run test

00:00 +0 -1: loading test/comXsGraph_test.dart                                                     
  Failed to load "test/comXsGraph_test.dart":
  "package:test/src/backend/metadata.dart": Error loading file:///Users/rayk/Projects/comXsGraph/packages/test/src/backend/metadata.dart:
    Cannot open file, path = '/Users/rayk/Projects/comXsGraph/packages/test/src/backend/metadata.dart' (OS Error: No such file or directory, errno = 2)
  #0      _asyncLoadErrorCallback (dart:_builtin:149)
  #1      _asyncLoadError (dart:_builtin:541)
  #2      _handleLoaderReply (dart:_builtin:364)
  #3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)
00:00 +0 -1: Some tests failed.       

pub run test -p content-shell test/comXsStore_test.dart

00:00 +0 -1: loading test/comXsStore_test.dart                                                     
  Invalid argument(s): A directory corresponding to fileSystemPath "/Users/rayk/Projects/comXsGraph/packages" could not be found
  package:shelf_static/src/static_handler.dart 37  createStaticHandler
  ===== asynchronous gap ===========================
  dart:async                                       Future.Future.sync
  package:async/src/async_memoizer.dart 44         AsyncMemoizer.runOnce

00:00 +0 -1: Some tests failed.        

Where I am not using a .packages file, it appears to run.

Thanks in advance.
R.

@nex3
Copy link
Member

nex3 commented Aug 24, 2015

The test runner doesn't yet support running without a packages directory. Doing so is blocked on dart-lang/sdk#23990.

Note that the --no-package-symlinks option to pub get is hidden on bleeding edge and 1.12-dev, which is an indication that it's not expected to work everywhere yet.

@nex3 nex3 changed the title pub run test fails with .packages file instead of packages directory Support running without a packages/ directory Aug 24, 2015
@nex3 nex3 added type-enhancement A request for a change that isn't a bug status-blocked Blocked from making progress by another (referenced) issue labels Aug 24, 2015
@sethladd
Copy link
Contributor

sethladd commented Sep 3, 2015

For those following along: all the (known) blockers for this are captured in dart-lang/sdk#24112

@mit-mit
Copy link
Member

mit-mit commented Oct 7, 2015

@nex3, do you have an update on when a fix to this might land?

@pulyaevskiy
Copy link

Looks like dart-lang/sdk#23990 has been resolved a while ago, so "blocked" tag can be removed from this issue?

@nex3
Copy link
Member

nex3 commented Jan 25, 2016

There's still ongoing work to land and verify stable package-introspection APIs. Many of them are in place but the verification work is still ongoing.

@kevmoo kevmoo removed the status-blocked Blocked from making progress by another (referenced) issue label Feb 1, 2016
@abarth
Copy link
Contributor

abarth commented Mar 30, 2016

For what it's worth, Flutter is switching over to using --no-package-symlinks. We've worked around this issue, but ideally we'd like to go back to using pub run test for our tests that run in the standalone DartVM.

@nex3
Copy link
Member

nex3 commented Mar 30, 2016

You're of course welcome to do whatever you need to get your code working, but please keep in mind that --no-package-symlinks is still considered experimental and any package may break under it at any time.

@abarth
Copy link
Contributor

abarth commented Mar 30, 2016

Yeah, we wanted to try it out. If too much stuff is broken, we can go back to having the symlinks around.

@nex3 nex3 added the status-blocked Blocked from making progress by another (referenced) issue label Apr 5, 2016
@eseidelGoogle
Copy link

We ran into this again, but have worked around it for now by adding a pub get call to flutter drive in flutter/flutter#4259.

@kevmoo
Copy link
Member

kevmoo commented Jun 1, 2016

@lrhn is working hard on testing here. That should unblock work for this.

@eseidelGoogle
Copy link

Just checking in on this. No huge rush (I know @nex3 is hard at work on other things). This I believe is the last remaining issue Flutter is running into with our use of .packages files. :)

@eseidelGoogle
Copy link

My bad. I just checked Natalie's things-to-do-soon list and this is on the top of it. Apologies for the noise.

nex3 added a commit to dart-archive/package_resolver that referenced this issue Jul 21, 2016
nex3 added a commit to dart-archive/source_map_stack_trace that referenced this issue Jul 26, 2016
This allows this to be compatible with package specs as well as package
directories.

See dart-lang/test#327

[email protected]

Review URL: https://codereview.chromium.org//2168203002 .
@kevmoo
Copy link
Member

kevmoo commented Jul 26, 2016

https://codereview.chromium.org/2184543002/

mosuem pushed a commit to dart-lang/tools that referenced this issue Aug 13, 2024
This allows this to be compatible with package specs as well as package
directories.

See dart-lang/test#327

[email protected]

Review URL: https://codereview.chromium.org//2168203002 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status-blocked Blocked from making progress by another (referenced) issue type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

9 participants