Skip to content

Ferric --verbose --concurrency and --clean - #332

Merged
kraenhansen merged 3 commits into
mainfrom
kh/ferric-verbose-concurrency-and-clean
Nov 14, 2025
Merged

Ferric --verbose --concurrency and --clean#332
kraenhansen merged 3 commits into
mainfrom
kh/ferric-verbose-concurrency-and-clean

Conversation

@kraenhansen

Copy link
Copy Markdown
Collaborator

Merging this PR will add three options to ferric:

  • --verbose outputs more to the terminal while building
  • --concurrency puts a limit on the number of concurrent sub-command invocations
  • --clean deletes the target (build) directory before building

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds three new command-line options to the ferric build tool to improve developer experience and control over build processes:

  • --verbose enables detailed output from underlying compilers and tools
  • --concurrency limits parallel build tasks (defaults to CPU count)
  • --clean removes the target directory before building

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/ferric/src/cargo.ts Passes verbose flag to control cargo output mode and add target prefixes
packages/ferric/src/build.ts Implements all three new options with concurrency control and improved logging
packages/cli-utils/src/index.ts Exports p-limit for concurrency control
packages/cli-utils/package.json Adds p-limit dependency
.changeset/evil-pens-shop.md Documents cli-utils changes
.changeset/big-plums-write.md Documents ferric-cli changes

Comment thread packages/ferric/src/build.ts Outdated
),
),
]),
{

Copilot AI Nov 14, 2025

Copy link

Choose a reason for hiding this comment

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

The isSilent: verbose logic appears counterintuitive - when verbose mode is enabled, the spinner becomes silent. Consider renaming to make the relationship clearer, or add a comment explaining that verbose mode replaces the spinner with direct output.

Suggested change
{
{
// In verbose mode, direct output replaces the spinner, so we silence it.

Copilot uses AI. Check for mistakes.
@kraenhansen
kraenhansen force-pushed the kh/ferric-verbose-concurrency-and-clean branch from 5678932 to ae899b1 Compare November 14, 2025 23:10
@kraenhansen
kraenhansen force-pushed the kh/ferric-verbose-concurrency-and-clean branch from ae899b1 to 5d05e45 Compare November 14, 2025 23:12
@kraenhansen
kraenhansen merged commit 441dcc4 into main Nov 14, 2025
9 checks passed
@kraenhansen
kraenhansen deleted the kh/ferric-verbose-concurrency-and-clean branch November 14, 2025 23:24
kraenhansen pushed a commit that referenced this pull request Aug 13, 2026
`ANDROID_STL` was hardcoded to `c++_shared` when configuring Android
builds, with no escape hatch for an addon that needs `c++_static` or must
match a prebuilt third-party dependency's STL (#418).

The generic `-D`/`--define` cache-variable pass-through (added for #332,
which #227 also asks for) already lets a consumer set arbitrary CMake
cache variables, including `ANDROID_STL` - but it didn't actually work:
our hardcoded Android defaults were appended to the CMake command line
*after* the user-provided `-D` arguments, and CMake resolves a variable
set multiple times via `-D` to its last occurrence, so the hardcoded
value always won.

Fix the ordering so the user's `--define` is applied last. `ANDROID_STL`
still defaults to `c++_shared`, matching what React Native itself uses.

Extract the CMake definitions building into an exported
`buildCommonDefinitions` and add unit tests covering the default and the
override precedence.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DaK9eAAF5G8wj6UT8VekAm
kraenhansen added a commit that referenced this pull request Aug 13, 2026
`ANDROID_STL` was hardcoded to `c++_shared` when configuring Android
builds, with no escape hatch for an addon that needs `c++_static` or must
match a prebuilt third-party dependency's STL (#418).

The generic `-D`/`--define` cache-variable pass-through (added for #332,
which #227 also asks for) already lets a consumer set arbitrary CMake
cache variables, including `ANDROID_STL` - but it didn't actually work:
our hardcoded Android defaults were appended to the CMake command line
*after* the user-provided `-D` arguments, and CMake resolves a variable
set multiple times via `-D` to its last occurrence, so the hardcoded
value always won.

Fix the ordering so the user's `--define` is applied last. `ANDROID_STL`
still defaults to `c++_shared`, matching what React Native itself uses.

Extract the CMake definitions building into an exported
`buildCommonDefinitions` and add unit tests covering the default and the
override precedence.


Claude-Session: https://claude.ai/code/session_01DaK9eAAF5G8wj6UT8VekAm

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants