feat: support extending a parent environment #398
Merged
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.
Adds a new environment configuration to bin/hermit.hcl
Setting this inherits the Hermit environment from a parent directory, inheriting environment variables and packages.
This should be useful in larger monorepos where we want to have a single root environment with most tooling, but want to still allow subprojects to have their own owerwrites and environment variables.
Note, the packages in parent environment won't have access to the child environment even when being called from the child environment. This means that any package calling another package in the parent environment will still call the parent package even if that is overwritten in the child environment. Though this can be potentially confusing, it should give more consistent behaviour between parent and child environments. Also, package dependencies can not cross environments. So, it is not possible to have a package dependency from a child environment package to a parent environment package.
Finally, for the time being, all hermit operations apply only to the currently active environment. So, it is not possible to upgrade, install, or uninstall parent packages from the child environment