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 1 commit 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-kitchensink-blog 🔄 Building (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 11:23pm
examples-svelte-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Apr 3, 2024 11:23pm
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2024 11:23pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2024 11:23pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2024 11:23pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2024 11:23pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Apr 3, 2024 11:23pm

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant