-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
deno_dir reorg #1587
Comments
@ry this is potentially problematic if a user happens to have two files with the same name of different extensions. Adopting this design seems to go against the original argument of requiring extensions. On the other hand, under our current design, if we are dropping hash from the filenames, are we adopting alternative approaches tell the versioning of source TypeScript code (i.e. some changes take place)? |
Out of this talk, do we have promise in Deno |
@zzz6519003 Deno is built on top of V8 which includes support to native Promises years ago. Deno async API depends on Promises. |
@kevinkassimo People should not be using the same name with different extensions. I think it's fine to just exit and print a helpful warning.
I don't think so. The imports are still explicit. The benefit of this design is so humans can inspect the DENO_DIR without the aid of software... |
@ry I'm slightly worried that this basically poses extra restrictions on filenames from Deno that goes beyond the requirement of JavaScript itself. Personally I feel this counts as a prohibiting "magic" that is opposite of As to inspections of the compiled code, we can probably instead add a flag on Deno that given a TypeScript file, (optionally compiles and) emits filenames that point to the code in |
@kevinkassimo Yeah... good point... I will think on it more. |
@ry Random thoughts, I think another way we could redesign the layout of |
@kevinkassimo I think your idea of some tooling could work too... Something like this?
|
@ry This design looks okay to me -- except that |
Sorry, I wasn't paying attention to this. While we don't have it enabled again, if we do ever run JavaScript through the compiler to type check it, we would want to use what is emitted. For example you can put CommonJS or AMD modules in and get ESM out via the compiler. One additional other thought, just so that we don't have to remap anything and could keep the output fine is:
Then we wouldn't need to worry about any conflicts and it is still quite clear how the source and output files are related. |
Can we close this issue in favor of #2057? |
Yes - thanks |
Currently my DENO_DIR looks like this
Remote code is cached in
~/.deno/deps/https
or~/.deno/deps/http
and generated javascript is stored under its content hash in~/.deno/gen
.I think we should combine the generated and remote-cached directories so that the generated content lives belong the remote-cached typescript:
This coincides better with how typescript normally operates
The text was updated successfully, but these errors were encountered: