-
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
Add --prefetch flag for deps prefetch without running #1475
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
56b6657
Add --prefetch flag for deps prefetch without running
kevinkassimo c5996ef
Add libdeno test and param names
kevinkassimo b617d1c
Add tools/prefetch_test.py
ry 95ecf9b
nit and integration test
kevinkassimo 89a8a03
remove second prefetch test
ry 1febd93
adjust test
ry 319e82d
adjust test
ry 2849c1e
use merge_env
ry 49c4759
Fix windows
piscisaureus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2018 the Deno authors. All rights reserved. MIT license. | ||
import os | ||
import sys | ||
from util import tests_path, run_output, build_path, executable_suffix, green_ok | ||
import tempfile | ||
import shutil | ||
|
||
|
||
def prefetch_test(deno_exe): | ||
sys.stdout.write("prefetch_test...") | ||
sys.stdout.flush() | ||
|
||
# On Windows, set the base directory that mkdtemp() uses explicitly. If not, | ||
# it'll use the short (8.3) path to the temp dir, which triggers the error | ||
# 'TS5009: Cannot find the common subdirectory path for the input files.' | ||
temp_dir = os.environ["TEMP"] if os.name == 'nt' else None | ||
deno_dir = tempfile.mkdtemp(dir=temp_dir) | ||
try: | ||
t = os.path.join(tests_path, "006_url_imports.ts") | ||
output = run_output([deno_exe, "--prefetch", t], | ||
merge_env={"DENO_DIR": deno_dir}) | ||
assert output == "" | ||
# Check that we actually did the prefetch. | ||
os.path.exists( | ||
os.path.join(deno_dir, | ||
"deps/http/localhost_PORT4545/tests/subdir/mod2.ts")) | ||
finally: | ||
shutil.rmtree(deno_dir) | ||
|
||
print green_ok() | ||
|
||
|
||
if __name__ == "__main__": | ||
prefetch_test(sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only modified part of this PR:
module->Evaluate
is not run and short circuited byis_prefetch