親フレーバーをhooq.tomlで定義した際、デフォルトの子フレーバーにその親フレーバーの設定が引き継がれない問題の修正#159
Open
anotherhollow1125 wants to merge 5 commits intomainfrom
Open
親フレーバーをhooq.tomlで定義した際、デフォルトの子フレーバーにその親フレーバーの設定が引き継がれない問題の修正#159anotherhollow1125 wants to merge 5 commits intomainfrom
anotherhollow1125 wants to merge 5 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
hooq.toml で親フレーバーを定義した場合に、デフォルトの子フレーバーへ設定が継承されない不具合(#158)を解消するため、フレーバー構造と読み込み適用ロジックを継承可能な形へ変更し、併せてドキュメントのソース抜粋位置を更新するPRです。
Changes:
- フレーバーを「ノード(sub_flavors保持)」と「設定(継承可能フィールド)」に分離し、解決時に実体(Instance)へ変換する構成へ変更
hooq.toml適用処理を、親設定を子へ継承できるように更新- 日本語/英語ドキュメントの
rustdoc_include行番号を更新し、説明文を一部調整
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| hooq-macros/src/impls/root_attr/mod.rs | Flavor から FlavorInstance 取得に追従 |
| hooq-macros/src/impls/inert_attr/parse.rs | Flavor から FlavorInstance 取得に追従 |
| hooq-macros/src/impls/flavor/toml_load/apply.rs | hooq.toml の反映ロジックを継承前提に変更 |
| hooq-macros/src/impls/flavor/mod.rs | 継承可能な設定表現(Node/Settings/Instance)へ再設計 |
| hooq-macros/src/impls/flavor/presets/*.rs | preset フレーバーを新構造(FlavorNode/FlavorSettings)に追従 |
| docs/ja/hooq-mdbook-ja/src/reference/flavors.md | ソース抜粋行番号の更新 |
| docs/en/hooq-mdbook-en/src/reference/flavors.md | ソース抜粋行番号の更新+文言調整 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
11
to
18
| pub fn update_flavors( | ||
| flavors: &mut HashMap<String, Flavor>, | ||
| flavors: &mut HashMap<String, FlavorNode>, | ||
| hooq_toml: HooqToml, | ||
| ) -> Result<(), String> { | ||
| update_flavor_inner(flavors, hooq_toml.flavors, &Flavor::default())?; | ||
| update_flavor_inner(flavors, hooq_toml.flavors, &FlavorSettings::default())?; | ||
|
|
||
| Ok(()) | ||
| } |
There was a problem hiding this comment.
This change introduces non-trivial inheritance behavior between parent/sub-flavors (including preset flavors overridden via hooq.toml), but there are no tests covering it. Adding unit tests around toml_load::apply::update_flavors / FlavorStore::get_flavor for cases like overriding [log] and asserting [log.warn] inherits would help prevent regressions.
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.
📌 Overview / 概要
表題の通り。イシュー #158 を解決した。
⚙ Changes / 変更点
🧪 Tests / テスト
📚 Related Issues / 関連Issue
✅ Checklist