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

Hub DB; turbo generator #3686

Merged
merged 6 commits into from
Mar 5, 2025
Merged

Hub DB; turbo generator #3686

merged 6 commits into from
Mar 5, 2025

Conversation

berekuk
Copy link
Collaborator

@berekuk berekuk commented Mar 3, 2025

This PR extracts the DB layer from apps/hub in the same fashion as I did recently for metaforecast.

This will allow us to write internal packages that use hub's db without keeping all code in apps/hub under next.js control (which creates problems, e.g. for squiggle build script).

I'm not 100% sure this will be necessary for evals or not, but using the same pattern for both apps will reduce the burden of maintenance, and I remember having some trouble with esbuild setup in apps/hub previously, so this seems safer.

One minor downside of this approach is that you'll need to keep DATABASE_URL=... in .env both for apps/hub and for internal-packages/hub-db. But I think it's not that big of a deal.


This PR also introduces a top-level turbo/generators package, which allows you to do turbo gen internal-package -a NAME (see https://turbo.build/repo/docs/guides/generating-code#custom-generators).

I expect that we'll make significantly more internal packages in the future, so it's good to encode our current practices and patterns for new packages in code.

@berekuk berekuk requested a review from OAGr as a code owner March 3, 2025 01:21
Copy link

changeset-bot bot commented Mar 3, 2025

⚠️ No Changeset found

Latest commit: 94ae703

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Mar 3, 2025

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

Name Status Preview Updated (UTC)
metaforecast ✅ Ready (Inspect) Visit Preview Mar 4, 2025 6:24pm
quri-hub ✅ Ready (Inspect) Visit Preview Mar 4, 2025 6:24pm
4 Skipped Deployments
Name Status Preview Updated (UTC)
fermi-contest-2025-02 ⬜️ Ignored (Inspect) Visit Preview Mar 4, 2025 6:24pm
quri-ui ⬜️ Ignored (Inspect) Visit Preview Mar 4, 2025 6:24pm
squiggle-components ⬜️ Ignored (Inspect) Visit Preview Mar 4, 2025 6:24pm
squiggle-website ⬜️ Ignored (Inspect) Visit Preview Mar 4, 2025 6:24pm

@berekuk berekuk merged commit cd55b26 into main Mar 5, 2025
9 checks passed
@berekuk berekuk deleted the hub-db branch March 5, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants