[PR #2168] [MERGED] Create bx.cmd #24844

Open
opened 2026-01-31 09:05:41 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2168
Author: @zadjii-msft
Created: 7/31/2019
Status: Merged
Merged: 8/6/2019
Merged by: @zadjii-msft

Base: masterHead: dev/migrie/f/bx.cmd


📝 Commits (5)

  • ae02a9c Try createing a script to only build the current working directory
  • 87571fb Merge remote-tracking branch 'origin/master' into dev/migrie/f/bx.cmd
  • 9d2c3ec Cleanup for PR
  • db0cd1f fix some bugs with building outside a project directory.
  • 44d23f4 PR nits

📊 Changes

5 files changed (+126 additions, -12 deletions)

View changed files

tools/bcx.cmd (+7 -0)
📝 tools/bcz.cmd (+81 -10)
tools/bx.cmd (+7 -0)
tools/bx.ps1 (+28 -0)
📝 tools/bz.cmd (+3 -2)

📄 Description

Summary of the Pull Request

Adds a bx script that only builds the project in your current directory (and all the project's dependencies).

Detailed Description of the Pull Request / Additional comments

When we were in Windows, bz behaved a lot more like this, because obviously you don't want to build all of Windows when just working on the Console. However, when we moved the console to MsBuild, the solution only took like 4s to build, so we never bothered with creating a script to build a single project.

However, the Terminal projects take a very long time to build. So rebuilding the entire solution from the commandline became increasingly painful. This change should alleviate that pain. Hopefully quickly iterating on code in the Console codebase should be much more manageable with this change.

Building a single project in a solution is a little tricky however. You need to supply the target name to msbuild.exe, which is not as simple as just the Project's name or path. So we need to parse the sln's .metaproj file to correlate vcxproj file to target name. That's what bx.ps1 is for.

This change could use some extra love - generating the metaproj takes a little while, as does parsing it. There might be a way to only generate the metaproj if it's changed, I didn't really investigate this, but presumably it could be done with a powershell script. I'll leave that for another work item in the future. It's still much faster to build with bx than before, but it could be faster.

Validation Steps Performed

Built the thing using bx and bcx.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/2168 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 7/31/2019 **Status:** ✅ Merged **Merged:** 8/6/2019 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `master` ← **Head:** `dev/migrie/f/bx.cmd` --- ### 📝 Commits (5) - [`ae02a9c`](https://github.com/microsoft/terminal/commit/ae02a9c1040c12b3271756be8aeece470938c8ba) Try createing a script to only build the current working directory - [`87571fb`](https://github.com/microsoft/terminal/commit/87571fb5d89f0a14dcc5744b1cf3a5b0238a73a3) Merge remote-tracking branch 'origin/master' into dev/migrie/f/bx.cmd - [`9d2c3ec`](https://github.com/microsoft/terminal/commit/9d2c3ec2dd06f13b438bdf287e81695728b5b316) Cleanup for PR - [`db0cd1f`](https://github.com/microsoft/terminal/commit/db0cd1f587eadc74ff4364fdcdb4b1e523d849bc) fix some bugs with building outside a project directory. - [`44d23f4`](https://github.com/microsoft/terminal/commit/44d23f4fce61dfc949e1e842e5de53675e905d9e) PR nits ### 📊 Changes **5 files changed** (+126 additions, -12 deletions) <details> <summary>View changed files</summary> ➕ `tools/bcx.cmd` (+7 -0) 📝 `tools/bcz.cmd` (+81 -10) ➕ `tools/bx.cmd` (+7 -0) ➕ `tools/bx.ps1` (+28 -0) 📝 `tools/bz.cmd` (+3 -2) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Adds a `bx` script that **only** builds the project in your current directory (and all the project's dependencies). <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments When we were in Windows, `bz` behaved a lot more like this, because obviously you don't want to build all of Windows when just working on the Console. However, when we moved the console to MsBuild, the solution only took like 4s to build, so we never bothered with creating a script to build a single project. However, the Terminal projects take a _very_ long time to build. So rebuilding the entire solution from the commandline became increasingly painful. This change should alleviate that pain. Hopefully quickly iterating on code in the Console codebase should be much more manageable with this change. Building a single project in a solution is a little tricky however. You need to supply the _target_ name to `msbuild.exe`, which is not as simple as just the Project's name or path. So we need to parse the sln's .metaproj file to correlate `vcxproj` file to target name. That's what `bx.ps1` is for. This change could use some extra love - generating the metaproj takes a little while, as does parsing it. There might be a way to only generate the metaproj _if it's changed_, I didn't really investigate this, but presumably it could be done with a powershell script. I'll leave that for another work item in the future. It's still much faster to build with `bx` than before, but _it could be faster_. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Built the thing using `bx` and `bcx`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:05:41 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24844