[PR #11859] [MERGED] Use x-macros for action args too #28765

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11859
Author: @zadjii-msft
Created: 12/1/2021
Status: ✅ Merged
Merged: 12/6/2021
Merged by: @undefined

Base: main ← Head: dev/migrie/eim/3475-aa-xmacro-magic


📝 Commits (10+)

  • 2009193 Convert a couple more, add support for additional ctors
  • d2cc16d convert most of the remaining args
  • ca42ce2 finish converting. aylmao, the local tests pass
  • a4f8e6b remove dead code
  • c63b425 BODGY use initializer list empty struct for comma mitigation
  • 94cd2a9 documentation is good
  • 6baec40 slightly more ergonomic
  • a8bb0aa cleanup
  • 7660a84 this is the wrong commit but whatever
  • 8873a30 This is way better

📊 Changes

4 files changed (+396 additions, -1465 deletions)

View changed files

📝 .github/actions/spelling/allow/allow.txt (+2 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+233 -1465)
➕ src/cascadia/TerminalSettingsModel/ActionArgsMagic.h (+160 -0)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj (+1 -0)

📄 Description

This adds x-macros for each of the actions, greatly reducing the amount of boilerplate needed for each action args.

Originally, I wanted to do more with this, but I think the x-macros we've discovered properly treads the line of ease-of-use and native c++ support, with how much it'll do for us


🔄 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/11859 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 12/1/2021 **Status:** ✅ Merged **Merged:** 12/6/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/eim/3475-aa-xmacro-magic` --- ### 📝 Commits (10+) - [`2009193`](https://github.com/microsoft/terminal/commit/2009193699e4f83f677e03dae74feaac351ef1be) Convert a couple more, add support for additional ctors - [`d2cc16d`](https://github.com/microsoft/terminal/commit/d2cc16d27f173f70b8db691ab77d96035278004e) convert most of the remaining args - [`ca42ce2`](https://github.com/microsoft/terminal/commit/ca42ce248f8528a97edca11685651be0a7513842) finish converting. aylmao, the local tests pass - [`a4f8e6b`](https://github.com/microsoft/terminal/commit/a4f8e6bb589e6457a5478e69d4d723f686550418) remove dead code - [`c63b425`](https://github.com/microsoft/terminal/commit/c63b42509ecff9e3749db178a1f20a34522de0e2) BODGY use initializer list empty struct for comma mitigation - [`94cd2a9`](https://github.com/microsoft/terminal/commit/94cd2a95ffafaa7806d73660465f694bcef22763) documentation is good - [`6baec40`](https://github.com/microsoft/terminal/commit/6baec400618d2cf10f5c6f7f48a4709e83ec5fc1) slightly more ergonomic - [`a8bb0aa`](https://github.com/microsoft/terminal/commit/a8bb0aaeb348aed56bbe370b45d2113d975fbd5e) cleanup - [`7660a84`](https://github.com/microsoft/terminal/commit/7660a84e038cf0142da55341170e7e4bb0b8e1d7) this is the wrong commit but whatever - [`8873a30`](https://github.com/microsoft/terminal/commit/8873a30a718f0bef7dea7e78051efe5d070a08b2) This is way better ### 📊 Changes **4 files changed** (+396 additions, -1465 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/allow.txt` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+233 -1465) ➕ `src/cascadia/TerminalSettingsModel/ActionArgsMagic.h` (+160 -0) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj` (+1 -0) </details> ### 📄 Description This adds x-macros for each of the actions, greatly reducing the amount of boilerplate needed for each action args. Originally, I wanted to do more with this, but I think the x-macros we've discovered properly treads the line of ease-of-use and native c++ support, with how much it'll do for us * [x] Closes #3475 * [x] Sure enough, the tests still pass. * [ ] mmmmmmm ![image](https://user-images.githubusercontent.com/18356694/144319133-329ee7ef-4aa7-4769-b11b-6e4994075dd0.png) --- <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:30:37 +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#28765