Skip to content

Conversation

domenkozar
Copy link
Member

@domenkozar domenkozar commented Apr 29, 2025

Fixes #1682
Fixes #1616

For example:

  tasks = {
    "devenv:compile-requirements" = {
      before = [ "devenv:python:virtualenv" ];
      exec = "uv pip compile requirements.in -o requirements.txt";
      execIfModified = [
        "requirements.in"
        "requirements.txt"
      ];
    };
  };

cc @rawkode

@domenkozar domenkozar requested a review from sandydoo April 29, 2025 09:42
Copy link

cloudflare-workers-and-pages bot commented Apr 29, 2025

Deploying devenv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 21f7860
Status: ✅  Deploy successful!
Preview URL: https://a8e0789d.devenv.pages.dev
Branch Preview URL: https://tasks-exec-if-modified.devenv.pages.dev

View logs

@domenkozar domenkozar force-pushed the tasks-exec-if-modified branch 3 times, most recently from a23af62 to 4106410 Compare April 29, 2025 16:18
Copy link
Member

@sandydoo sandydoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a subset of the eval cache implementation with a few task-specific naming differences. I'm wondering whether it would make sense to extract the database and file checking parts of eval-cache and build both eval-cache and task-cache on top of a shared base.

@domenkozar
Copy link
Member Author

This is a subset of the eval cache implementation with a few task-specific naming differences. I'm wondering whether it would make sense to extract the database and file checking parts of eval-cache and build both eval-cache and task-cache on top of a shared base.

I was thinking the same, ideally we'd be using the same database for all the caching.

@domenkozar domenkozar force-pushed the tasks-exec-if-modified branch 4 times, most recently from a9d7793 to 9db3f0d Compare May 2, 2025 13:07
@domenkozar
Copy link
Member Author

@sandydoo I've created devenv-cache-core that shared the sqlite logic and file operations and reused it in both crates :)

@domenkozar domenkozar force-pushed the tasks-exec-if-modified branch 3 times, most recently from 3fbf49f to 159ca3c Compare May 4, 2025 16:05
@domenkozar domenkozar requested a review from sandydoo May 5, 2025 10:50
@domenkozar domenkozar force-pushed the tasks-exec-if-modified branch from 74ebf8f to 8f1018d Compare May 7, 2025 09:42
@domenkozar domenkozar force-pushed the tasks-exec-if-modified branch from da14e67 to b90fb09 Compare May 7, 2025 13:12
@domenkozar domenkozar merged commit a7f2ea2 into main May 8, 2025
1 check passed
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 this pull request may close these issues.

Tasks should accept rerunIfModified only run if a file was modified since task execution tasks: status_if_modified
2 participants