Skip to content

Suggestion: migrate to monorepo tooling #547

@moreal

Description

@moreal

Summary

While working on CI-related tasks recently, I realized that we need to better understand the dependency relationships between tasks across each project and organize them to execute tasks more intelligently. By "intelligently," I mean ensuring that duplicate tasks are executed only once.

Currently, pnpm does not support attributes like depends, making it structurally impossible to determine which tasks depend on others or identify overlapping tasks.

On the other hand, mise does support this feature. However, since most tasks simply call scripts specified in the scripts field of package.json, more granular optimization remains difficult from mise's perspective as well.

Additionally, while mise run install in setup-mise runs the build as a prerequisite, the issue of re-running the build in subsequent executions remains challenging due to the lack of build caching functionality that monorepo tools typically provide.

I have submitted several PRs to address these issues, but they were resolved awkwardly by adding various flags, which I consider to be a temporary workaround. Therefore, I would like to propose two approaches to fundamentally solve this problem.


1. Migrate scripts to mise tasks and use pnpm solely as a package manager

Migrate all pnpm scripts to mise tasks and express the dependencies between them. This would resolve the issue where pnpm could not properly express dependencies between scripts.

2. Introduce a monorepo tool (e.g., Turborepo)

Further investigation into monorepo tools is needed, but if the repository will continue to operate exclusively within the JavaScript ecosystem as it does now, tools like Turborepo or Nx appear to be viable options. These tools not only resolve dependency issues between tasks but also provide build caching. This would prevent the issue where builds are repeated even though they were already executed in setup-mise. Furthermore, this is expected to help reduce build times by ensuring that only the necessary builds are re-executed.

Affected Area

CI/CD pipeline and task orchestration - specifically pnpm scripts, mise task configuration, and build process optimization

Reason / Context

I already mentioned it in the Summary section.

Checklist

  1. Make a decision whether to migrate or not.
  2. Research which monorepo tool is best for this repository if we decided to monorepo tool.
  3. Make a PR.

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/buildBuild system and packagingcomponent/ciCI/CD workflows and GitHub Actionscomponent/cliCLI tools relateddiscussionNeeds discussiontype/choreBuild, configuration, and maintenance tasks

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions