feat(render): Render files into subdirectories#88
Open
dmcilvaney wants to merge 1 commit intomicrosoft:mainfrom
Open
feat(render): Render files into subdirectories#88dmcilvaney wants to merge 1 commit intomicrosoft:mainfrom
dmcilvaney wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a per-component rendered spec output directory convention (grouped by the lowercase first letter of the component name) and surfaces that directory on resolved component configs.
Changes:
- Added
RenderedSpecDirtoprojectconfig.ComponentConfigand populate it during component resolution. - Introduced
components.RenderedSpecDir(renderedSpecsDir, componentName)helper + unit tests. - Removed
samber/lousage incomponent listand expanded tests to coverRenderedSpecDir.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/projectconfig/component.go | Adds derived RenderedSpecDir field and carries it through WithAbsolutePaths. |
| internal/app/azldev/core/components/resolver.go | Sets RenderedSpecDir when creating resolved components. |
| internal/app/azldev/core/components/renderedspecdir.go | New helper to compute {renderedSpecsDir}/{letter}/{componentName} output dir. |
| internal/app/azldev/core/components/renderedspecdir_test.go | Unit tests for RenderedSpecDir helper. |
| internal/app/azldev/cmds/component/list.go | Removes lo.Map dependency; builds slice via loop. |
| internal/app/azldev/cmds/component/list_test.go | Adds coverage asserting computed RenderedSpecDir in list results. |
Comments suppressed due to low confidence (1)
internal/app/azldev/core/components/resolver.go:458
- The PR title/description says rendered files will be placed into per-letter/per-component subdirectories, but this change only computes/stores RenderedSpecDir on the resolved config. There are no call sites that use ComponentConfig.RenderedSpecDir (or Project.RenderedSpecsDir) to actually write rendered specs into the new layout, so the runtime behavior appears unchanged.
func (r *Resolver) createComponentFromConfig(componentConfig *projectconfig.ComponentConfig) Component {
componentConfig.RenderedSpecDir = RenderedSpecDir(
r.env.Config().Project.RenderedSpecsDir, componentConfig.Name,
)
return &resolvedComponent{
env: r.env,
config: *componentConfig,
}
07caa6f to
94efa01
Compare
94efa01 to
a7ce5e3
Compare
a7ce5e3 to
872abb8
Compare
reubeno
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Place rendered components into subdirs. i.e.,
aaagoes into./specs/a/aaa,BBBgoes into./specs/b/BBB.