这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: respect output mode 'none' even when caching is disabled #7900

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

Closed
wants to merge 0 commits into 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)
                    ),
                );

@aholland aholland requested a review from a team as a code owner April 3, 2024 23:23
@aholland aholland requested review from gsoltis and arlyon April 3, 2024 23:23
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 Jan 3, 2025 3:14pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:14pm

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?

@anthonyshew
Copy link
Contributor

I messed up and closed this PR with a force push. I've opened #9670 as a replacement.

anthonyshew added a commit that referenced this pull request Jan 10, 2025
### Description

This is a fresh PR for #7900, which sat too long and got stale. I
accidentally closed the PR with no commits after force-pushing so I'm
opening this for simplicity's sake.

@aholland deserves all credit here for finding this issue and proposing
a fix.

### Testing Instructions

- Existing CI should catch me on regressions 🙏
- Added a test
- Did some manual testing. Things look to be doing what we want.

---------

Co-authored-by: Chris Olszewski <chris.olszewski@vercel.com>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants