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

Respect output mode 'none' even when caching is disabled #7900

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aholland
Copy link

@aholland aholland commented Apr 3, 2024

Description

Suppose I have some pipline like this:

//turbo.json
{
  "$schema": "https://turbo.build/schema.json",
  "pipeline": {
    "clean": {
      "outputMode": "none",
      "cache": false
    },
    "build": {
      "dependsOn": ["clean","^build"],

The outputMode is ignored because of cache being false. That's annoying. I don't want to see my rm -rf running every time I do I build, including builds where all the rest of the tasks are cached (I tend to use new-only for most other tasks).

Testing Instructions

I am not a Rust programmer but I think I have found the place that would need to be changed. To test the change, just create any simple package.son task that generates output ( "echo": "echo \"hello world\"",) and run it from a TurboRepo task with caching false and outMode none, as above.

PS errors-only

PS having absolutely no output would be okay. Even better would be an implementation of errors-only, outputting one line saying that the task has been executed because it is set not to cache, and that it executed successfully. I think that would involve something like the below code (copied from about line 195 of the same file I've modified in this PR), but again, I don't know Rust or your codebase:

                fallible_write(
                    &mut terminal_output,
                    &format!(
                        "cache bypass, force executing {}\n",
                        color!(self.ui, GREY, "{}", self.hash)
                    ),
                );

Copy link

vercel bot commented Apr 3, 2024

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

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm
examples-svelte-web ❌ Failed (Inspect) Jun 15, 2024 10:32pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 10:32pm

Copy link

vercel bot commented Apr 3, 2024

@aholland is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@arlyon arlyon removed the request for review from gsoltis May 21, 2024 13:14
@arlyon
Copy link
Contributor

arlyon commented May 21, 2024

Please open an issue with the errors-only suggestion and we will consider it for turbo-2. Thanks!

@arlyon arlyon requested review from tknickman and Zertsov May 21, 2024 13:17
@anthonyshew
Copy link
Contributor

Hey, sorry, for not getting this in before! CI hung on some stale check so the auto-merge didn't go through.

Now with the 2.0 release, this changed names. @aholland, would you be able to update it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage New issues get this label. Remove it after triage owned-by: turborepo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants