Skip to content

feat: add pathOverrides support for Envied annotations#183

Merged
petercinibulk merged 1 commit into
mainfrom
feat/path-overrides
May 10, 2026
Merged

feat: add pathOverrides support for Envied annotations#183
petercinibulk merged 1 commit into
mainfrom
feat/path-overrides

Conversation

@techouse
Copy link
Copy Markdown
Collaborator

@techouse techouse commented Apr 30, 2026

Summary

  • Add pathOverrides builder option for per-@Envied path overrides.
  • Keep existing global path override behavior unchanged.
  • Resolve override paths by @Envied(name) first, then original annotation path, then global path, then annotation/default path.
  • Document YAML and CLI usage for pathOverrides.

Addresses

@techouse techouse requested a review from petercinibulk as a code owner April 30, 2026 07:46
@techouse techouse added the enhancement New feature or request label Apr 30, 2026
@techouse techouse linked an issue Apr 30, 2026 that may be closed by this pull request
@techouse techouse requested review from Copilot and removed request for petercinibulk April 30, 2026 07:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds per-@Envied path override support to envied_generator via a new pathOverrides build option, while preserving existing global path override behavior and documenting configuration usage.

Changes:

  • Introduces BuildOptions.pathOverrides and parsing/validation from builder config.
  • Updates EnviedGenerator path resolution to prefer overrides by @Envied(name) then original @Envied(path), with fallback to global path then annotation/default.
  • Adds generator and build options tests plus fixture .env files; updates README docs with YAML/CLI examples.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/envied_generator/lib/src/generator.dart Implements path resolution precedence and updates generated_from to reflect resolved paths.
packages/envied_generator/lib/src/build_options.dart Adds pathOverrides option and strict parsing/validation.
packages/envied_generator/test/envy_generator_test.dart Registers new annotated-element tests covering override precedence and override disabled behavior.
packages/envied_generator/test/src/generator_tests_with_path_overrides.dart Adds golden generation expectations for name/path/global fallback precedence.
packages/envied_generator/test/src/generator_tests_with_path_overrides_disabled.dart Verifies pathOverrides are ignored when override: false.
packages/envied_generator/test/build_options_test.dart Unit tests for pathOverrides parsing and invalid inputs.
packages/envied_generator/test/.env.path_overrides_* Test env fixtures to validate override selection.
packages/envied/README.md Documents pathOverrides in build.yaml and CLI usage, including precedence rules.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@techouse techouse added this to the 1.3.5 milestone May 3, 2026
@petercinibulk petercinibulk merged commit 2dd73cb into main May 10, 2026
9 checks passed
@techouse techouse deleted the feat/path-overrides branch May 10, 2026 18:38
@techouse techouse mentioned this pull request May 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.

Controlling Multiple Environments from the CLI?

3 participants