-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(compile): Enable multiple roots for a standalone module graph #17663
Merged
bartlomieju
merged 9 commits into
denoland:main
from
andreubotella:standalone-side-modules
Mar 18, 2023
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1a4d647
feat(compile): Enable multiple roots for a standalone module graph
andreubotella 29b957d
Add help text for the --side-module argument
andreubotella 78bc259
Merge branch 'main' into standalone-side-modules
bartlomieju bb2d7b9
Update cli/args/flags.rs
bartlomieju cdce5b2
Merge branch 'main' into standalone-side-modules
andreubotella 7744e26
Change timeout in dynamic import tests to 0
andreubotella 52bde28
Merge branch 'main' into standalone-side-modules
andreubotella 79d17a0
Rename flag to `--include`
andreubotella 8ac9c11
Merge branch 'main' into standalone-side-modules
bartlomieju 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./import1.ts |
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
18 changes: 18 additions & 0 deletions
18
cli/tests/testdata/compile/dynamic_imports/main_unanalyzable.ts
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,18 @@ | ||
import { join } from "https://deno.land/[email protected]/path/mod.ts"; | ||
|
||
console.log("Starting the main module"); | ||
|
||
// We load the dynamic import path from the file system, to make sure any | ||
// improvements in static analysis can't defeat the purpose of this test, which | ||
// is to make sure the `--include` flag works to add non-analyzed imports to the | ||
// module graph. | ||
const IMPORT_PATH_FILE_PATH = join( | ||
Deno.cwd(), | ||
"tests/testdata/compile/dynamic_imports/import_path", | ||
); | ||
|
||
setTimeout(async () => { | ||
console.log("Dynamic importing"); | ||
const importPath = (await Deno.readTextFile(IMPORT_PATH_FILE_PATH)).trim(); | ||
import(importPath).then(() => console.log("Dynamic import done.")); | ||
}, 0); |
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.
Can I do comma separated list of urls like:
--side-module=https://deno.land/std/flags/mod.ts,https://deno.land/std/version.ts
?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.
Commas are valid in URLs and filenames.
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.
Hm, I thought we already supported comma separated lists in other flags, but maybe I'm wrong here