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

turbo-ignore do not work on a single repo #8172

Closed
1 task done
devjiwonchoi opened this issue May 17, 2024 · 5 comments · Fixed by #8177
Closed
1 task done

turbo-ignore do not work on a single repo #8172

devjiwonchoi opened this issue May 17, 2024 · 5 comments · Fixed by #8177
Assignees
Labels
kind: bug Something isn't working owned-by: turborepo

Comments

@devjiwonchoi
Copy link
Contributor

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/devjiwonchoi/repro-turbo-ignore-single-app

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

turbo 1.13.4-canary.4

Describe the Bug

Context: Using turbo on a single Next.js app (non-monorepo)

turbo build --dry json returns the packages as undefined, so it throws an error as below:

Screenshot 2024-05-18 at 1 42 38 AM

Expected Behavior

In tuborepo, we need to add logic to include a single repo to packages value as well.

To Reproduce

Run the following commands:

pnpm i
pnpm turbo build
npx turbo-ignore

Confirm that the packages value is missing

pnpm turbo build --dry=json

Additional context

x-ref: #8171

@devjiwonchoi devjiwonchoi added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels May 17, 2024
@devjiwonchoi devjiwonchoi changed the title turbo-ignore do not work on a single Next.js app turbo-ignore do not work on a single repo May 17, 2024
@tknickman tknickman self-assigned this May 20, 2024
@tknickman tknickman removed the needs: triage New issues get this label. Remove it after triage label May 20, 2024
@tknickman
Copy link
Member

Hey @devjiwonchoi thanks for the report. This shouldn't straight up fail, so we can fix that. However using turbo-ignore with a single package repo is not necessary, since turbo only has package level granularity it will never ignore.

@devjiwonchoi
Copy link
Contributor Author

@tknickman Thank you for the fix!

I came across from this video by Anthony where it introduces to use turbo-ignore to possibly skip everything on CI before even installing deps, as well as from the docs.

As I'm benefitting so much from turbo build and the remote cache on my Next.js app, I'd love to benefit even more with turbo-ignore where I can turbo build locally, remote cached, and not even installing deps on Vercel and save money for Vercel and time for myself.

I think it's feasible.. or maybe I misunderstood the feature?

@tknickman
Copy link
Member

That's awesome you're benefiting from turbo build!

turbo-ignore helps when deploying in CI (it works best on Vercel!) to determine if your changes are relevant to the app you're deploying. It does this by determining if your package, or any of your packages dependencies have changed. When you're working with a single package application - a deployment will only be queued when it has changes, thus running turbo-ignore won't matter as it will always determine that the project should build.

tknickman added a commit that referenced this issue May 20, 2024
### Description

Single package repo dry runs can not include a packages key at all.

Fixes #8172

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->
@devjiwonchoi
Copy link
Contributor Author

Ah, understood. Thank you for your kind explanation!!

@tknickman
Copy link
Member

No problem - thanks again for the report of the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working owned-by: turborepo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants