这是indexloc提供的服务,不要输入任何密码
Skip to content

fix(turborepo): Passing a relative path to --cwd when using --skip-infer. #3348

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

Merged

Conversation

NicholasLYang
Copy link
Contributor

Ran into this while testing changes. In general we should figure out better abstractions for relative and absolute paths in Rust.

@NicholasLYang NicholasLYang requested a review from a team as a code owner January 17, 2023 20:40
@vercel
Copy link

vercel bot commented Jan 17, 2023

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

Name Status Preview Comments Updated
examples-nonmonorepo 🔄 Building (Inspect) Jan 17, 2023 at 8:41PM (UTC)
8 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 8:41PM (UTC)
examples-cra-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 8:41PM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Jan 17, 2023 at 8:41PM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Jan 17, 2023 at 8:41PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 8:41PM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 8:41PM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 8:41PM (UTC)
turbo-vite-web ⬜️ Ignored (Inspect) Jan 17, 2023 at 8:41PM (UTC)

@vercel
Copy link

vercel bot commented Jan 17, 2023

@NicholasLYang is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@NicholasLYang NicholasLYang changed the title Fixes passing a relative path to --cwd when using --skip-infer. fix(turborepo): Passing a relative path to --cwd when using --skip-infer. Jan 17, 2023
Copy link
Contributor

@mehulkar mehulkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What problem does this solve? I read through what this library does here: https://docs.rs/dunce/latest/dunce/#functions, but I'm not sure (based on PR title and diff) what --cwd input this addresses.

Are we trying to pass relative path? Or does this handle when a relative path is passed? In the case of the latter, does this deserve a dedicated prysk integration test?

@tknickman
Copy link
Member

@mehulkar more details here, we overlooked this one from this original fix: https://github.com/vercel/turbo/pull/3079/files

@NicholasLYang
Copy link
Contributor Author

@mehulkar yeah basically we need to pass absolute paths to Go and we're not currently doing that when we have the --skip-infer flag

@mehulkar
Copy link
Contributor

mehulkar commented Jan 17, 2023

Curious, why this additional normalization isn't also in the shim.rs, and only in cli/run handling?

@NicholasLYang
Copy link
Contributor Author

It is, but in this case with --skip-infer we bypass the shim entirely. In the future I would prefer a better abstraction where we have a type called say, AbsolutePath that when constructed canonicalizes the path automatically, but that is a larger task (maybe a good first Rust issue if anybody's interested!)

@NicholasLYang NicholasLYang enabled auto-merge (squash) January 17, 2023 22:06
@NicholasLYang NicholasLYang merged commit 015b787 into vercel:main Jan 17, 2023
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