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

Inconsistent UX between deno run and deno test #4102

Closed
kitsonk opened this issue Feb 24, 2020 · 3 comments
Closed

Inconsistent UX between deno run and deno test #4102

kitsonk opened this issue Feb 24, 2020 · 3 comments
Labels
bug Something isn't working correctly

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Feb 24, 2020

On a mac:

> deno test bad_module.ts
No such file or directory (os error 2)

Versus:

> deno run bad_module.ts
Cannot resolve module "file:///Users/kkelly/github/deno/bad_module.ts"

The deno run is far more informative and consistent across OSes.

@ry ry added the bug Something isn't working correctly label Feb 24, 2020
@ry
Copy link
Member

ry commented Feb 24, 2020

I think No such file or directory (os error 2) is actually the better error message here. The deno run error message suggests we're doing unnecessary processing. The process should try to open the file, and simply error out if it's not there. Certainly it shouldn't be booting up V8.

@kitsonk
Copy link
Contributor Author

kitsonk commented Feb 24, 2020

My only argument is that it should be normalized across OSes and should include the full path that was attempted to be resolved. Sometimes with complex relative URLs, it might hard to determine what is what.

@bartlomieju
Copy link
Member

Tested on 1.4.0

▶ deno test bad_module.ts
error: Cannot resolve module "file:///Users/biwanczuk/dev/deno/bad_module.ts" from "file:///Users/biwanczuk/dev/deno/.deno.test.ts"
Imported from "file:///Users/biwanczuk/dev/deno/.deno.test.ts:1"

~/dev/deno  run_watch_unload ✔                                                                                                                                                                              19m  ⍉
▶ deno run bad_module.ts
error: Cannot resolve module "file:///Users/biwanczuk/dev/deno/bad_module.ts"

Seems this issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants