You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> dir /x
2023/05/26 15:32 <DIR>.
2023/05/09 08:52 <DIR> ..
2023/05/26 15:35 <DIR> TESTDI~1 test dir # This means that the short filename alias for `test dir` is `TESTDI~1`.>cd ../TESTDI~1
Create a file like this:
// deno.json{"importMap": "./import-map.json"}// import-map.json{"imports": {"@/": "./"}}// parent.tsimport"@/child.ts";import"./child.ts";// child.tsconsole.log("hello from child.ts!");
Run deno info. Here the dependencies include two child.ts. I believe this is a bug.
Also, console.log is done twice when I run deno run.
> deno info parent.ts
local: C:\Users\ayame\work\TESTDI~1\parent.ts
emit: C:\Users\ayame\AppData\Local\deno\gen\file\C\Users\ayame\work\TESTDI~1\parent.ts.js
type: TypeScript
dependencies: 2 unique
size: 120B
file:///C:/Users/ayame/work/TESTDI~1/parent.ts (44B)
├── file:///C:/Users/ayame/work/test%20dir/child.ts (38B)
└── file:///C:/Users/ayame/work/TESTDI~1/child.ts (38B)
> deno run ./parent.ts
hello from child.ts!
hello from child.ts!
Please refer to denoland/fresh#471 (comment).
This bug is caused by a combination of the following three conditions.
cwd
option ofDeno.Command
)How to reproduce the bug
Move to the Windows short file name (= 8.3 format) directory. (I had to use cmd instead of powershell for this.)
Create a file like this:
Run
deno info
. Here the dependencies include two child.ts. I believe this is a bug.Also,
console.log
is done twice when I rundeno run
.This is causing strange errors like the one described by denoland/fresh#471 (comment).
Another oddity about this bug is that if I remove the deno.json it works fine.
The result of deleting deno.json and running is below.
I don't know how many people use Windows's short pathnames, but it's strange that the behavior changes depending on whether deno.json exists or not.
The text was updated successfully, but these errors were encountered: