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(expo): pnpm+workspace build #28209

Merged
merged 1 commit into from
Oct 17, 2024
Merged

fix(expo): pnpm+workspace build #28209

merged 1 commit into from
Oct 17, 2024

Conversation

dearlordylord
Copy link
Contributor

@dearlordylord dearlordylord commented Oct 1, 2024

Current Behavior

build executors for expo crash when package manager pnpm and workspaces are used

Expected Behavior

no crashies

Related Issue(s)

#28208

Fixes #28208

FAQ

  • why not handle the undefined by the calling code instead

The less the calling code knows about inner workings, the better: in this case, doing this would add the implicit dependency on "pnpm and workspaces" to the calling code

  • but it's an empty function, my performance

We call it once per user interaction.

  • but still, it's an empty function

We return an empty array when there are no elements; we don't return undefined when the array is empty and array when array is non-empty. Hopefully so.

  • but,

The doc also says that this function returns a function.

@dearlordylord dearlordylord requested a review from a team as a code owner October 1, 2024 00:09
@dearlordylord dearlordylord requested a review from Coly010 October 1, 2024 00:09
Copy link

vercel bot commented Oct 1, 2024

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Oct 1, 2024 0:12am

@@ -114,7 +114,7 @@ function copyPackageJsonAndLock(
packageManager: PackageManager,
workspaceRoot: string,
projectRoot: string
) {
): () => void {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to make not possible to forget again

@xiongemi xiongemi merged commit 42da542 into nrwl:master Oct 17, 2024
6 checks passed
jaysoo pushed a commit that referenced this pull request Oct 17, 2024
## Current Behavior

build executors for expo crash when package manager pnpm and workspaces
are used

## Expected Behavior

no crashies

## Related Issue(s)

#28208

Fixes #28208

## FAQ

- why not handle the `undefined` by the calling code instead

The less the calling code knows about inner workings, the better: in
this case, doing this would add the implicit dependency on "pnpm and
workspaces" to the calling code

- but it's an empty function, my performance

We call it once per user interaction.

- but still, it's an empty function

We return an `empty array` when there are no elements; we don't return
`undefined` when the array is empty and `array` when array is non-empty.
Hopefully so.

- but,

The doc also says that this function returns a function.
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expo: copyPackageJsonAndLock returns undefined instead of cleanup function in corner cases
3 participants