Skip to content

fix(task): load toml tasks in task_config.includes in system/global config and monorepo subdirs#6545

Merged
jdx merged 7 commits intojdx:mainfrom
risu729:task-monorepo-includes
Oct 6, 2025
Merged

fix(task): load toml tasks in task_config.includes in system/global config and monorepo subdirs#6545
jdx merged 7 commits intojdx:mainfrom
risu729:task-monorepo-includes

Conversation

@risu729
Copy link
Copy Markdown
Contributor

@risu729 risu729 commented Oct 5, 2025

It works fine for directories, but not for TOML files.

This PR treats tasks in tasks.toml as "file tasks", but I think it won't cause any issues.
I'll refactor the code around includes later, as currently it seems some parts are duplicated.
Also, I noticed task_includes in mise.local.toml was not honoured if mise.toml had it.


Note

Enable loading tasks from TOML files in task_config.includes and unify include processing for files/dirs, with new e2e tests for monorepo task discovery/execution.

  • Backend:
    • load_tasks_includes now supports .toml files via load_task_file; keeps dir scan for executable scripts.
    • load_tasks_in_dir/load_file_tasks simplified to use task_includes_for_dir and the unified loader; removed duplicate TOML-only path handling.
  • Tests:
    • Add e2e/tasks/test_task_monorepo_includes to validate monorepo task discovery and execution (root, subdir, wildcard), including TOML-defined tasks and script tasks with multiple-dot names.

Written by Cursor Bugbot for commit afedda9. This will update automatically on new commits. Configure here.

@risu729 risu729 changed the title test(task): add test for monorepo with task_config.includes fix(task): load toml tasks in task_config.include in system/global config and monorepo subdirs Oct 6, 2025
@risu729 risu729 changed the title fix(task): load toml tasks in task_config.include in system/global config and monorepo subdirs fix(task): load toml tasks in task_config.includes in system/global config and monorepo subdirs Oct 6, 2025
@risu729 risu729 force-pushed the task-monorepo-includes branch from 76b0db5 to 9bea95a Compare October 6, 2025 01:33
@risu729 risu729 marked this pull request as ready for review October 6, 2025 16:04
@risu729 risu729 requested review from Copilot October 6, 2025 16:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes task loading from TOML files specified in task_config.includes configuration in system/global config and monorepo subdirectories. Previously, the code only worked for directories but failed to load tasks from individual TOML files.

  • Refactored load_tasks_includes to handle both files and directories properly
  • Simplified load_tasks_in_dir by removing duplicate TOML file handling logic
  • Added comprehensive end-to-end test for monorepo task includes functionality

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/config/mod.rs Fixed task loading logic to support TOML files in includes and simplified duplicate code
e2e/tasks/test_task_monorepo_includes Added comprehensive test coverage for monorepo task includes with both TOML and script files

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/config/mod.rs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jdx
Copy link
Copy Markdown
Owner

jdx commented Oct 6, 2025

bugbot run

cursor[bot]

This comment was marked as outdated.

@jdx
Copy link
Copy Markdown
Owner

jdx commented Oct 6, 2025

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!


@jdx jdx merged commit 76b264e into jdx:main Oct 6, 2025
26 checks passed
@risu729 risu729 deleted the task-monorepo-includes branch October 6, 2025 16:53
jdx pushed a commit that referenced this pull request Oct 7, 2025
### 📦 Registry

- add jules by @alefteris in
[#6568](#6568)

### 🐛 Bug Fixes

- **(docs)** improve favicon support for Safari by @jdx in
[#6567](#6567)
- **(github)** download assets via API to respect GITHUB_TOKEN by @roele
in [#6496](#6496)
- **(task)** load toml tasks in `task_config.includes` in system/global
config and monorepo subdirs by @risu729 in
[#6545](#6545)
- **(task)** handle dots in monorepo directory names correctly by @jdx
in [#6571](#6571)

### 📚 Documentation

- **(readme)** add GitHub Issues & Discussions section by @rsyring in
[#6573](#6573)
- **(tasks)** create dedicated monorepo tasks documentation by @jdx in
[#6561](#6561)
- **(tasks)** enhance monorepo documentation with tool comparisons by
@jdx in [#6563](#6563)
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.

3 participants