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: resolve an issue where Bun would get into an infinite loop (#72) #75

Closed
wants to merge 3 commits into from

Conversation

Dobefu
Copy link
Contributor

@Dobefu Dobefu commented Dec 30, 2024

This PR will fix the issue where Bun would get into an infinite loop on startup.

As an additional bonus, this will ever so slightly improve the startup time of Nuxt dev.

Copy link

vercel bot commented Dec 30, 2024

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

Name Status Preview Comments Updated (UTC)
nuxt-prisma ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2024 4:13pm

@Kuuzoo
Copy link
Contributor

Kuuzoo commented Dec 30, 2024

This PR will fix the issue where Bun would get into an infinite loop on startup.

As an additional bonus, this will ever so slightly improve the startup time of Nuxt dev.

Hi @Dobefu,
is the finally statement what has resolved the infinite loop with bun?

Since I've already opened PR #73 3 days ago, which is replacing all the addDependency & addDevDependency calls with ensureDependencyInstalled but didn't fix the loop. Maybe we can put our 2 PRs into one, and hopefully @ankur-arch can merge it as soon as possible 😄

@ankur-arch
Copy link
Contributor

@Dobefu , I think @Kuuzoo 's suggestion is nice.

I'll get some time to test it later today and am aiming to merge the PRs at latest tomorrow.

@Dobefu
Copy link
Contributor Author

Dobefu commented Dec 30, 2024

Hi @Kuuzoo!

I've noticed after opening this PR that you've been working on that. Nice work by the way 🙂.
The fix is the ensureDependencyInstalled line. You've replaced it in the main module file in you PR, but it has not yet been added to the setup-helpers.ts file as far as I can tell.

As for the finally statement, that's... a little embarassing. I may or may not have put that there during my investigation and forgot to remove it 😅. I also may or may not fix this ASAP.

As for putting the 2 PRs into one: I'm down with that, but it might be a bit clearer in the Git history if the commits are at least separated. Otherwise, it will be unclear later which commit fixed what. To that end, it might be good if my PR got merged into your branch. With your permission, of course

@Kuuzoo
Copy link
Contributor

Kuuzoo commented Dec 30, 2024

Hi @Kuuzoo!

I've noticed after opening this PR that you've been working on that. Nice work by the way 🙂. The fix is the ensureDependencyInstalled line. You've replaced it in the main module file in you PR, but it has not yet been added to the setup-helpers.ts file as far as I can tell.

As for the finally statement, that's... a little embarassing. I may or may not have put that there during my investigation and forgot to remove it 😅. I also may or may not fix this ASAP.

As for putting the 2 PRs into one: I'm down with that, but it might be a bit clearer in the Git history if the commits are at least separated. Otherwise, it will be unclear later which commit fixed what. To that end, it might be good if my PR got merged into your branch. With your permission, of course

@Dobefu thank you 😄
Maybe I'm a bit lost, but still with the usage of ensureDependencyInstalled I was stuck in an infinite loop... Maybe I did something wrong when testing? 🤔

About the setup-helpers.ts file, I did remove the functions inside of that file, and moved them into the module.ts.
After checking those commits again, I saw that I removed the log that came with the installPrismaClient function.
So it will probably make sense, if I add both functions back into setup-helpers.ts and call ensureDependencyInstalled and the logs from the functions there.

Are you using discord by any chance? Then we could quickly communicate how we continue with the branches. If you are, please send me friend request at kuuzoo

@Dobefu
Copy link
Contributor Author

Dobefu commented Dec 30, 2024

Wow... I appear to have completely overlooked that you did also do that file. My apologies.

I also see that our PRs are incompatible with one another. I don't have a ton of time at the moment, but I will in a couple of hours.

I do not currently have Discord, but I can create an account!

@Kuuzoo
Copy link
Contributor

Kuuzoo commented Dec 30, 2024

Wow... I appear to have completely overlooked that you did also do that file. My apologies.

I also see that our PRs are incompatible with one another. I don't have a ton of time at the moment, but I will in a couple of hours.

I do not currently have Discord, but I can create an account!

No problem at all.
I will also have more time going into the night.

I think also having the incompatibility it would probably best if we discuss this together directly and then comment back here once we are finished.

For me it would be great to keep in touch via discord, but only if it's not too much of a hassle for you 😅

@Dobefu
Copy link
Contributor Author

Dobefu commented Dec 30, 2024

Closing this one in favour of #73

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