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

Allowing "tasks" instead of only allowing "pipeline" in turbo.json #1272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlfreddGco
Copy link

@AlfreddGco AlfreddGco commented Jan 24, 2025

Issue Description

Nixpacks does not support turbo versions >= 1.7. Specifically, turborepo.rs attempts to read turbo.json and looks for the "pipeline" key, but turbo versions 1.7 and above use the "tasks" key instead. This mismatch results in Nixpacks failing silently and throwing an error like "start command not found," without clearly indicating the underlying issue.

Additionally, the documentation does not explicitly state that only turbo versions < 1.7 are supported.


Possible Solutions

  1. Downgrade turbo to v1.6: This is a temporary workaround, but it’s not ideal for users who rely on newer turbo features.
  2. Add support for the "tasks" key in this repository: This would involve updating the code to handle turbo versions >= 1.7. However, it’s unclear whether this change only requires supporting the new JSON key or if additional implementation is needed to fully support newer turbo versions.

Proposed Fix

This PR implements Solution 2 by adding support for the "tasks" key in turborepo.rs. This ensures compatibility with turbo versions >= 1.7 while maintaining backward compatibility with older versions. The changes include:

  • Updating the JSON parsing logic to check for both "pipeline" and "tasks" keys.
  • Ensuring the build process correctly identifies and uses the appropriate commands from turbo.json.

@AlfreddGco AlfreddGco mentioned this pull request Jan 24, 2025
2 tasks
@coffee-cup coffee-cup added the release/patch Author patch release label Jan 24, 2025
Copy link
Contributor

@coffee-cup coffee-cup left a comment

Choose a reason for hiding this comment

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

Great fix! Supporting both makes sense

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

Successfully merging this pull request may close these issues.

2 participants