Skip to content

Conversation

@tuler
Copy link
Member

@tuler tuler commented Jul 18, 2025

This PR brings changes to the build command.
It now uses --output type=tar instead of crane.
The build tasks are now managed by Listr2. Output is much less verbose by default. There is a new option --verbose to make it verbose.

@tuler tuler requested a review from endersonmaia July 18, 2025 15:13
@changeset-bot
Copy link

changeset-bot bot commented Jul 18, 2025

🦋 Changeset detected

Latest commit: 0c032b9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cartesi/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@socket-security
Copy link

socket-security bot commented Jul 18, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedlistr2@​8.3.3 ⏵ 9.0.1991007792 +2100

View full report

@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2025

Coverage Report for ./apps/cli

Status Category Percentage Covered / Total
🔵 Lines 24.74% 271 / 1095
🔵 Statements 24.66% 276 / 1119
🔵 Functions 25.26% 48 / 190
🔵 Branches 21.88% 109 / 498
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/cli/src/machine.ts 0% 0% 0% 0% 5-120
apps/cli/src/builder/directory.ts 100% 75% 100% 100%
apps/cli/src/builder/docker.ts 86.11% 72.22% 60% 91.17% 50, 53, 83-85, 141-147
apps/cli/src/builder/empty.ts 100% 100% 100% 100%
apps/cli/src/builder/none.ts 100% 100% 100% 100%
apps/cli/src/builder/tar.ts 100% 100% 100% 100%
apps/cli/src/commands/build.ts 0% 0% 0% 0% 30-168
apps/cli/src/commands/shell.ts 0% 0% 0% 0% 9-67
apps/cli/src/exec/cartesi-machine.ts 75% 50% 50% 75% 13, 29-31
apps/cli/src/exec/genext2fs.ts 95.83% 50% 100% 95.65% 89
apps/cli/src/exec/util.ts 92.3% 75% 100% 92.3% 49
Generated in workflow #629 for commit 0c032b9 by the Vitest Coverage Report Action

@tuler tuler force-pushed the feature/buildx-tar-exporter branch from 6c1fafc to d4cc76c Compare July 18, 2025 15:21
@tuler tuler force-pushed the feature/build-improvements branch from 714f343 to dda7590 Compare July 18, 2025 17:35
@tuler tuler force-pushed the feature/buildx-tar-exporter branch from d4cc76c to 90c72bb Compare July 18, 2025 17:36
@endersonmaia
Copy link
Contributor

I'm getting errors from xgenext2fs and some log messages are repeated.

> cartesi/dapps/my-go-dapp ❯ cartesi-dev build
❯ Build drives
  ✖ Command failed with ENOENT: xgenext2fs --block-size 4096 --faketime --readjustment '+0' --tarball root.tar root.ext2
    spawn xgenext2fs ENOENT
◼ Build Cartesi machine
Command failed with ENOENT: xgenext2fs --block-size 4096 --faketime --readjustment '+0' --tarball root.tar root.ext2
spawn xgenext2fs ENOENT

--verbose

> cartesi/dapps/my-go-dapp ❯ cartesi-dev build --verbose
[STARTED] Build drives
[STARTED] Building drive root
[FAILED] Command failed with ENOENT: xgenext2fs --block-size 4096 --faketime --readjustment '+0' --tarball root.tar root.ext2
[FAILED] spawn xgenext2fs ENOENT
[FAILED] Command failed with ENOENT: xgenext2fs --block-size 4096 --faketime --readjustment '+0' --tarball root.tar root.ext2
[FAILED] spawn xgenext2fs ENOENT
Command failed with ENOENT: xgenext2fs --block-size 4096 --faketime --readjustment '+0' --tarball root.tar root.ext2
spawn xgenext2fs ENOENT

Copy link
Contributor

@endersonmaia endersonmaia left a comment

Choose a reason for hiding this comment

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

LGTM

@tuler tuler force-pushed the feature/build-improvements branch from 020a2d1 to c6c8705 Compare July 19, 2025 03:17
Base automatically changed from feature/build-improvements to prerelease/v2-alpha July 19, 2025 03:18
@tuler tuler force-pushed the feature/buildx-tar-exporter branch 2 times, most recently from 7c0a16d to 6cfa85f Compare July 19, 2025 03:20
@tuler tuler force-pushed the feature/buildx-tar-exporter branch from 6cfa85f to 0c032b9 Compare July 19, 2025 04:29
@tuler tuler merged commit b56724a into prerelease/v2-alpha Jul 21, 2025
4 checks passed
@tuler tuler deleted the feature/buildx-tar-exporter branch July 21, 2025 13:16
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