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

deno run --reload infinite loop #2442

Closed
kitsonk opened this issue Jun 1, 2019 · 2 comments · Fixed by #2477
Closed

deno run --reload infinite loop #2442

kitsonk opened this issue Jun 1, 2019 · 2 comments · Fixed by #2477

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Jun 1, 2019

I haven't been able to pin it down specifically yet, but I think there is a logic error somewhere in the caching logic with the new compiler. I seem to be getting into an infinite loop when trying deno run --reload.

For example with oak, if you clone https://github.com/oakserver/oak/ and run:

$ deno run --allow-read test.ts

Everything should work fine and the tests pass. Then if you run:

$ deno run --reload --allow-read test.ts

I have noticed that it seems to be an ever increasing amount of files being downloaded, and you will start to see several of the modules repeating themselves.

@bartlomieju
Copy link
Member

@kitsonk I just tried replicating this issue on latest master branch, and it works fine for me:

localhost:~/dev/oak$  [master|✔]
16:09 $ deno_dev run --reload --allow-read test.ts
[192/192] Compiling https://raw.githubusercontent.com/denoland/deno_std/v0.7.0/http/server.ts

As for duplicated downloads I believe this is the same issue as described in #2356. It was partially solved with State.compiled map but I believe the same hack has to be done for file downloads in "current run" because get_source_code_async will issue another download if file requesting downloading doesn't go through TS compiler.

CC @ry

@kitsonk
Copy link
Contributor Author

kitsonk commented Jun 3, 2019

Ok that isn't infinite, but it is 27 remote modules in actual fact, but 192 get downloaded. So that isn't very good. I assumed it was infinite and killed it before waiting for the 192.

@ry ry mentioned this issue Jun 7, 2019
43 tasks
@ry ry closed this as completed in #2477 Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants