Repository navigation
docs: replace "inherit" terminology with config layering #8046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,8 +84,8 @@ impl PrepareEngine { | |||||||||
| /// Discover all applicable prepare providers for the current project | ||||||||||
| /// | ||||||||||
| /// Each config file's prepare providers are scoped to that config file's directory. | ||||||||||
| /// Prepare configs are NOT inherited from parent directories - a `[prepare.pnpm]` | ||||||||||
| /// defined in a root mise.toml only runs from the root, not from subdirectories. | ||||||||||
| /// Prepare configs are scoped to the directory where they are defined - a `[prepare.pnpm]` | ||||||||||
| /// in a root mise.toml only applies when running from that root, not from subdirectories. | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The phrasing of the example could be clearer to avoid ambiguity. The phrase "only applies when running from that root" might be misinterpreted to mean it depends on the user's current working directory. To make the scoping behavior more explicit, I suggest rephrasing the example to focus on where the provider's command executes. This clarifies that the execution context is tied to the config file's location, regardless of where
Suggested change
|
||||||||||
| fn discover_providers(config: &Config) -> Result<Vec<Box<dyn PrepareProvider>>> { | ||||||||||
| let project_root = config | ||||||||||
| .project_root | ||||||||||
|
|
@@ -99,7 +99,7 @@ impl PrepareEngine { | |||||||||
| // Process each config file's prepare config independently, using that | ||||||||||
| // config file's directory as the project root for its providers. | ||||||||||
| // Only include config files that belong to the current project root | ||||||||||
| // (not inherited from parent directories). | ||||||||||
| // (skip config files from parent directories). | ||||||||||
|
||||||||||
| for cf in config.config_files.values() { | ||||||||||
| let Some(prepare_config) = cf.prepare_config() else { | ||||||||||
| continue; | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These doc comments read a bit awkwardly/ambiguously as written: (1) using a hyphen instead of an em dash or a full stop makes the sentence easier to misread, and (2) “in a root mise.toml” could be read as describing the command’s location rather than where the config is defined. Consider rephrasing to something like: “Prepare configs are scoped to the directory where they are defined. For example, a
[prepare.pnpm]defined in the root mise.toml only applies when running from the root directory, not from subdirectories.”