Skip to content

feat(mason_cli): expose BrickVarComputer extension#1639

Draft
felangel wants to merge 1 commit intomasterfrom
feat/mason_cli-brick-var-computer
Draft

feat(mason_cli): expose BrickVarComputer extension#1639
felangel wants to merge 1 commit intomasterfrom
feat/mason_cli-brick-var-computer

Conversation

@felangel
Copy link
Owner

@felangel felangel commented Feb 10, 2026

Status

HOLD

Description

Sample Usage

Future<void> run(HookContext context) async {
  final brick = Brick.git(
    const GitPath(
      'https://github.com/felangel/bloc',
      ref: 'master',
      path: 'bricks/bloc',
    ),
  );
  final overrides = {...context.vars};
  final vars = await brick.computeVars(logger: context.logger, overrides: overrides);

  // The rest of your pre_gen.dart...
}

You'll also need to be sure to add package:mason_cli as a dependency in your hook:

dependencies:
  mason_cli:
    git:
      url: https://github.com/felangel/mason
      ref: 0b19943e150bfe5d280c12904e5119b8398ef99e
      path: packages/mason_cli

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@felangel felangel self-assigned this Feb 10, 2026
@felangel felangel added the enhancement New feature or request label Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mason): allow packages that use MasonGenerator to acess BrickVariableProperties.

1 participant