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

dev script infinititely recompiles #1074

Closed
juliusmarminge opened this issue Mar 3, 2024 · 3 comments · Fixed by #1484
Closed

dev script infinititely recompiles #1074

juliusmarminge opened this issue Mar 3, 2024 · 3 comments · Fixed by #1484

Comments

@juliusmarminge
Copy link
Contributor

juliusmarminge commented Mar 3, 2024

Description

In root of this monorepo, I tried running dev on the package using:

pnpm turbo dev --filter ai

However that causes tsup to just infinitely recompile itself:
https://github.com/vercel/ai/assets/51714798/0d70d9e7-6c16-41e6-bf53-ce25a81b3f39

What's the recommended way to develop in this monorepo? There's no contributing guide?

Code example

No response

Additional context

No response

@vercel vercel deleted a comment Mar 4, 2024
@MaxLeiter
Copy link
Member

We need to write a contributing guide, but I run pnpm build in packages/core, then modify the package.json of an example to "ai": "workspace:*" to have it use the local version.

@alonzuman
Copy link
Contributor

@juliusmarminge Personally I tried downgrading/upgrading tsup locally, as it seems to be an open issue with tsup but it didn't help. What I did end up doing is running pnpm clean inside of packages/core and only then running pnpm dev, not ideal but it is working.

@juliusmarminge
Copy link
Contributor Author

i think it's to do with the watch patterns since this repo doesn't use a src/ directory and dist/ to separate out the source from the compiled one. maybe if you're diligent about it and tell tsup exactly what to watch and not it'll fix it

unstubbable added a commit to unstubbable/ai that referenced this issue May 2, 2024
fixes vercel#1074

The files in `packages/core/*/dist` must be excluded from the TS program
so that `rollup-plugin-dts` (used by `tsup`) does not include them in
the list of watched files.
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 a pull request may close this issue.

3 participants