Skip to content

build_config: give the msvc build a name of its own - #7246

Merged
matz merged 1 commit into
mruby:masterfrom
takumin:msvc-own-name
Aug 18, 2026
Merged

build_config: give the msvc build a name of its own#7246
matz merged 1 commit into
mruby:masterfrom
takumin:msvc-own-name

Conversation

@takumin

@takumin takumin commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

build_config/ci/msvc.rb opens an anonymous MRuby::Build, and an unnamed build is called host (lib/mruby/build.rb:114). The build tree is keyed by that name (:127), so MRUBY_CONFIG=ci/msvc aims a full-core build with MRB_GC_FIXED_ARENA at build/host, the directory a default build on the same machine uses. The Windows-VC job never sees that, since it builds a fresh checkout, but a developer who points MRUBY_CONFIG at this config on a tree the default config has built shares one directory between two gem sets, which is the shape #7195, #7197, #7199 and #7200 took out of the other configs that had it.

14d6e42 named the bintest build in ci/gcc-clang and left this one alone, on the ground that a single build has no sibling for a name to tell it apart from. That was a reason about telling builds apart; the build directory is decided by the name whether or not there is a sibling, and that is the reason here.

Naming it

The build is named after its config, as build_config/mrbc.rb, clang-asan.rb and cosmopolitan.rb (#7245) are. Nothing in the file needs the build to be called host. It is an MRuby::Build, and it pulls mruby-bin-mrbc in through full-core, so it lends no mrbc to any cross target and creates its own internal one either way (:174). The name reaches three other places: install_prefix (:625), the bin/*.bat wrappers that define_installer_if_needed writes only when host? answers true (:461, :482), and the mrbtest that rake clean removes from MRUBY_ROOT/bin (tasks/test.rake:82). The job runs rake -m test:run:serial (.github/workflows/build.yml:89), which installs nothing and cleans nothing, so none of the three fires. enable_bintest has not required the name host since fd113da, and test/bintest.rb resolves every binary it runs from BUILD_DIR rather than from bin/; the bintest build in ci/gcc-clang is this same shape under a name, in the same workflow.

Verified

There is no MSVC here to run the job with, so the Windows-VC job on this PR is the run. What can be checked on Linux is that the config still loads and that the tree it names is its own:

$ MRUBY_CONFIG=ci/msvc rake -T | grep amalgam
rake amalgam    # Generate amalgamated mruby.h and mruby.c in .../build/msvc/amalgam

Summary by CodeRabbit

  • Build Configuration
    • Updated the MSVC build target naming for clearer build identification.

@takumin
takumin requested a review from matz as a code owner August 18, 2026 00:53
@github-actions github-actions Bot added the build label Aug 18, 2026
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a9538b3-b610-4994-8959-fa2082e4774e

📥 Commits

Reviewing files that changed from the base of the PR and between 1ae98a3 and 5eed346.

📒 Files selected for processing (1)
  • build_config/ci/msvc.rb

Included review availability: Your plan includes up to 8 reviews per rolling hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The MSVC CI build configuration now assigns the MRuby build the explicit target name msvc.

Changes

MSVC build configuration

Layer / File(s) Summary
Assign the MSVC target name
build_config/ci/msvc.rb
The MRuby build uses the explicit target name msvc instead of the unnamed default target.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 5eed3

This change gives the MSVC configuration its own build directory without evidence of a current correctness or production-impact risk; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: assigning a distinct name to the MSVC build.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@takumin takumin changed the title ci: give the msvc build a name of its own build_config: give the msvc build a name of its own Aug 18, 2026
build_config/ci/msvc.rb opened an anonymous `MRuby::Build`, and an
unnamed build is called 'host' (lib/mruby/build.rb:114).  The build tree
is keyed by that name (:127), so MRUBY_CONFIG=ci/msvc aimed a full-core
build with `MRB_GC_FIXED_ARENA` at build/host, the directory a default
build on the same machine uses.  The Windows-VC job never sees that,
since it builds a fresh checkout, but a developer who points
MRUBY_CONFIG at this config on a tree the default config has built
shares one directory between two gem sets, which is the shape mruby#7195,
mruby#7197, mruby#7199 and mruby#7200 took out of the other configs that had it.

14d6e42 named the bintest build in ci/gcc-clang and left this one alone,
on the ground that a single build has no sibling for a name to tell it
apart from.  That was a reason about telling builds apart; the build
directory is decided by the name whether or not there is a sibling, and
that is the reason here.

Name it after its config, as build_config/mrbc.rb, clang-asan.rb and
gctest.rb are.  Nothing in the file needs the build to be called
'host'.  It is an `MRuby::Build`, and it pulls `mruby-bin-mrbc` in
through full-core, so it lends no mrbc to any cross target and creates
its own internal one either way (:174).  The name reaches three other
places: `install_prefix` (:625), the `bin/*.bat` wrappers that
`define_installer_if_needed` writes only when `host?` answers true (:461
and :482), and the mrbtest that `rake clean` removes from MRUBY_ROOT/bin
(tasks/test.rake:82).  The job runs `rake -m test:run:serial`
(.github/workflows/build.yml:89), which installs nothing and cleans
nothing, so none of the three fires.  `enable_bintest` has not required
the name 'host' since fd113da, and test/bintest.rb resolves every binary
it runs from BUILD_DIR rather than from bin/; the `bintest` build in
ci/gcc-clang is this same shape under a name, in the same workflow.

There is no MSVC here to run the job with.  What can be checked on
Linux is that the config still loads and that the tree it names is its
own; the job on this change is the run:

    $ MRUBY_CONFIG=ci/msvc rake -T | grep amalgam
    rake amalgam    # Generate amalgamated mruby.h and mruby.c in .../build/msvc/amalgam
@matz
matz merged commit 769124c into mruby:master Aug 18, 2026
20 of 21 checks passed
@takumin
takumin deleted the msvc-own-name branch August 18, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants