-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: use oxc-resolver hot fix for symlinks #9302
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bf14221
Using a diff dependency
NicholasLYang 5695cdc
Switched to a git dependency of my fork. Also added a fallback tsconf…
NicholasLYang 07777f1
Added test
NicholasLYang 0f263a6
Remove unnecessary file
NicholasLYang 180aff6
Fix test
NicholasLYang 92d18d7
Ugh windows
NicholasLYang adf8fad
Switch to oxc 2.0
NicholasLYang 7694661
Setting up turborepo-lib tests
NicholasLYang ea3300b
Fixing up tests
NicholasLYang 7341ae0
Remove double symlink integration test
NicholasLYang 1dab4e8
move tests to turborepo crate
NicholasLYang 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,60 @@ | ||
use std::{path::Path, process::Command}; | ||
|
||
use camino::Utf8Path; | ||
|
||
fn setup_fixture( | ||
fixture: &str, | ||
package_manager: Option<&str>, | ||
test_dir: &Path, | ||
) -> Result<(), anyhow::Error> { | ||
let script_path = Utf8Path::new(env!("CARGO_MANIFEST_DIR")) | ||
.join("../../turborepo-tests/helpers/setup_integration_test.sh"); | ||
|
||
Command::new("bash") | ||
.arg("-c") | ||
.arg(format!( | ||
"{} {} {}", | ||
script_path, | ||
fixture, | ||
package_manager.unwrap_or("npm@10.5.0") | ||
)) | ||
.current_dir(test_dir) | ||
.spawn()? | ||
.wait()?; | ||
|
||
Ok(()) | ||
} | ||
|
||
fn check_query(fixture: &str, query: &str) -> Result<(), anyhow::Error> { | ||
let tempdir = tempfile::tempdir()?; | ||
setup_fixture(fixture, None, tempdir.path())?; | ||
let output = assert_cmd::Command::cargo_bin("turbo")? | ||
.arg("query") | ||
.arg(query) | ||
.current_dir(tempdir.path()) | ||
.output()?; | ||
|
||
let stdout = String::from_utf8(output.stdout)?; | ||
let query_output: serde_json::Value = serde_json::from_str(&stdout)?; | ||
insta::assert_json_snapshot!(query_output); | ||
|
||
Ok(()) | ||
} | ||
|
||
#[cfg(not(windows))] | ||
#[test] | ||
fn test_double_symlink() -> Result<(), anyhow::Error> { | ||
check_query( | ||
"oxc_repro", | ||
"query { | ||
file(path: \"./index.js\") { | ||
path | ||
dependencies { | ||
files { items { path } } | ||
errors { items { message import } } | ||
} | ||
} | ||
}", | ||
)?; | ||
Ok(()) | ||
} |
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,23 @@ | ||
--- | ||
source: crates/turborepo-lib/tests/query.rs | ||
expression: query_output | ||
--- | ||
{ | ||
"data": { | ||
"file": { | ||
"path": "index.js", | ||
"dependencies": { | ||
"files": { | ||
"items": [ | ||
{ | ||
"path": "nm/index.js" | ||
} | ||
] | ||
}, | ||
"errors": { | ||
"items": [] | ||
} | ||
} | ||
} | ||
} | ||
} |
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,3 @@ | ||
.idea | ||
/node_modules | ||
.turbo |
Oops, something went wrong.
Oops, something went wrong.
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.
I think this is a behavior change where we now respect
tsconfig
? Maybe update PR description to include functionality this gains us? (I'm curious and want to know, but can't grok it from this PR)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.
yeah tsconfig is necessary for doing prefix resolution, i.e.
@/components/ui
. tsconfig loading is what's broken in oxc-resolver