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

fix: use oxc-resolver hot fix for symlinks #9302

Merged
merged 11 commits into from
Oct 22, 2024

Conversation

NicholasLYang
Copy link
Contributor

@NicholasLYang NicholasLYang commented Oct 21, 2024

Description

There's a bug in oxc-resolver for symlinks that basically breaks tsconfig resolution with pnpm (in a specific scenario for extending a tsconfig that's a workspace dependency). Until that's fixed, this PR switches us to a fork that has a very dumb hot fix

We also add tsconfig loading, either via a parameter or via walking up the path hierarchy for the closest tsconfig

Testing Instructions

Added a test based off of my repro. Validated that doesn't work with main branch of oxc-resolver, but does work on my fork

Copy link

vercel bot commented Oct 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 6:29pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Oct 22, 2024 6:29pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Oct 22, 2024 6:29pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Oct 22, 2024 6:29pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Oct 22, 2024 6:29pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Oct 22, 2024 6:29pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Oct 22, 2024 6:29pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Oct 22, 2024 6:29pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Oct 22, 2024 6:29pm

@@ -147,11 +154,21 @@ impl File {
Ok(self.path.to_string())
}

async fn dependencies(&self, depth: Option<usize>) -> TraceResult {
async fn dependencies(&self, depth: Option<usize>, ts_config: Option<String>) -> TraceResult {
Copy link
Member

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)

Copy link
Contributor Author

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

@NicholasLYang NicholasLYang enabled auto-merge (squash) October 21, 2024 19:39
@Boshen
Copy link

Boshen commented Oct 22, 2024

I'll make a release today.

- Renamed test -> test-data
- Added query test
- Fixed up setup_package_manager.sh to work with non-prysk tests
@NicholasLYang NicholasLYang merged commit 6b9be42 into main Oct 22, 2024
39 checks passed
@NicholasLYang NicholasLYang deleted the nicholasyang/oxc-resolver-fix branch October 22, 2024 19:03
NicholasLYang added a commit that referenced this pull request Oct 22, 2024
### Description

#9302 merged a little too early, so reverting some of the changes.
Namely, we don't need the `test` -> `test-data` renaming anymore

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->
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 this pull request may close these issues.

3 participants