Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

feat: generic workspace support #124

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

Conversation

mistydemeo
Copy link
Contributor

@mistydemeo mistydemeo commented May 7, 2024

This adds workspace support to generic builds. Prior to this, we only considered the root dist.toml and had no support for multi-project workspaces.

This doesn't yet have support for mixed workspaces where packages of different languages are part of the same workspace, but it is possible for repos of different languages to be contained within the same repo so long as there's both a dist.toml with a workspace for generic projects and a Cargo.toml with a workspace for Cargo projects. For example:

searching for generic project...
manifest: /private/tmp/axolotlsay-hybrid/dist.toml
target: /private/tmp/axolotlsay-hybrid/target
  axolotlsay-bun@0.3.0
    manifest: /private/tmp/axolotlsay-hybrid/axolotlsay-bun/dist.toml
    [bin] axolotlsay-bun
  axolotlsay-js@0.3.0
    manifest: /private/tmp/axolotlsay-hybrid/axolotlsay-js/dist.toml
    [bin] axolotlsay-js

searching for rust project...
manifest: /private/tmp/axolotlsay-hybrid/Cargo.toml
target: /private/tmp/axolotlsay-hybrid/target
  axolotlsay@0.2.1
    manifest: /private/tmp/axolotlsay-hybrid/axolotlsay/Cargo.toml
    [bin] axolotlsay

This contains a breaking API change - I previously incorrectly put the build_command in the workspace definition for generic projects, which was wrong. It's been moved out of the workspace info and into the package info. This will require minor code changes in cargo-dist to use.

@mistydemeo mistydemeo requested a review from Gankra May 7, 2024 20:08
@mistydemeo mistydemeo force-pushed the generic_workspace_support branch 5 times, most recently from 0b78380 to 7828d0e Compare May 7, 2024 20:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant