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

VM should interpret path arguments in the console like any other unix command #2930

Closed
sethladd opened this issue May 7, 2012 · 12 comments
Closed
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. P3 A lower priority bug or feature request

Comments

@sethladd
Copy link
Contributor

sethladd commented May 7, 2012

I'm trying to use the fancy new package root stuff:

/tmp/dart-sha > dart --package-root=/Code/Dart-git/dart/lib/ crypto.dart
Unable to open file: ~/Code/Dart-git/dart/lib/crypto/crypto.dart'file:///Users/sethladd/tmp/dart-sha/crypto.dart': Error: line 3 pos 1: library handler failed

import('package:crypto/crypto.dart');

^

The file ~/Code/Dart-git/dart/lib/crypto/crypto.dart certainly exists.

The contents of crypto.dart in my work dir is:

import('package:crypto/crypto.dart');

main() {
    var sha = new SHA256();
}

The solution was the fully qualify my path for the package-root command line arg. The ~ did not work.

@iposva-google
Copy link
Contributor

Set owner to mattsh@google.com.
Added Accepted label.

@iposva-google
Copy link
Contributor

This is really in the area of package handling.


Removed the owner.
Removed Area-VM label.
Added Area-Pub, Triaged labels.

@munificent
Copy link
Member

I don't believe this is a pub issue. This is just related to the --package-root argument that the standalone VM supports directly. Is pub involved here somehow?


Removed Area-Pub label.
Added Area-VM label.

@iposva-google
Copy link
Contributor

Set owner to @dgrove.

@dgrove
Copy link
Contributor

dgrove commented Feb 14, 2013

Issue #8535 has been merged into this issue.

@iposva-google
Copy link
Contributor

Added this to the Later milestone.
Removed Priority-Medium label.
Added Priority-Low label.

@kevmoo
Copy link
Member

kevmoo commented Apr 27, 2014

Bumping a couple of labels and changing the title.

This is an issue for
--package-root
--snapshot
--coverage_dir

(Didn't try profile_dir, but I'm guessing it's the same)

Using --coverage_dir=/Users/Kevin/tmp works fine
Using --coverage_dir=~/tmp ends up with
Failed to write coverage file: ~/tmp/dart-cov-22180-188642295.json

We have the same problem in commands written in Dart, too (docgen, etc).

But these have to be fixed in the VM, I'm guessing


Set owner to @iposva-google.
Removed this from the Later milestone.
Removed Priority-Low label.
Added Priority-Medium label.
Changed the title to: "VM should interpret path arguments in the console like any other unix command".

@kevmoo
Copy link
Member

kevmoo commented Apr 27, 2014

FYI: related feature request to make this easy in Dart apps - https://code.google.com/p/dart/issues/detail?id=18466

@iposva-google
Copy link
Contributor

Removed the owner.
Removed Priority-Medium label.
Added Priority-Low label.

@andersjohnsen
Copy link

Is this something we want in the VM?

The reason I ask, is that if we do, we should make it available through dart:io as well.

If not, I'll close https://code.google.com/p/dart/issues/detail?id=18466 with a suggestion to do this in a pkg.

Basically, I don't want it in dart:io, unless there is a really good reason (such as a VM use case).

@kevmoo
Copy link
Member

kevmoo commented May 1, 2014

I think the case for #­18466 is that there are likely platform-specific methods for resolving these paths that will be tough to reproduce accurately in a package.

The case for this bug -- #­2930 -- is for the dart command line to act like other command line apps

@sethladd sethladd added Type-Defect P3 A lower priority bug or feature request area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels May 1, 2014
@iposva-google
Copy link
Contributor

muenster[sdk] java -classpath /tmp:~/tmp/java Bug2930
Error: Could not find or load main class Bug2930
muenster[sdk] echo $HOME
/usr/local/google/home/iposva
muenster[sdk] java -classpath /tmp:$HOME/tmp/java Bug2930
Hello!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. P3 A lower priority bug or feature request
Projects
None yet
Development

No branches or pull requests

6 participants