Conversation
This is fixed by prefixing the auto-import with `inherited-` if: The auto-import is for the dependency that has a `provided-via` attribute which has the value of the path to a local ftd file that overrides the contents of this dependency. After the prefix is added. We check for this prefix while resolving imports, if the imported module starts with `inherited-` we instead read it's `provided-via` file path and load its contents instead. This way even the third party dependencies end up importing this `imported-` module by sourcing the `provided-via` path. The users don't have to know about this `inherited-` prefixing as it is done by the framework to the auto imports only. Explicitly importing the `provided-via` package by its name works as usual and will import the un-overriden original variant of the dependency. This is useful in case where you want to override a few components in your `provided-via` file but re-export original symbols by importing the original dependency. fixes: #2139
Contributor
Author
|
Also closes #2069 |
amitu
approved these changes
Jun 11, 2025
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.
This is fixed by prefixing the auto-import with
inherited-if:The auto-import is for the dependency that has a
provided-viaattribute which has the value of the path to a local ftd file that
overrides the contents of this dependency.
After the prefix is added. We check for this prefix while resolving
imports, if the imported module starts with
inherited-we instead readit's
provided-viafile path and load its contents instead. This wayeven the third party dependencies end up importing this
imported-module by sourcing the
provided-viapath.The users don't have to know about this
inherited-prefixing as it isdone by the framework to the auto imports only.
Explicitly importing the
provided-viapackage by its name works asusual and will import the un-overriden original variant of the
dependency. This is useful in case where you want to override a few
components in your
provided-viafile but re-export original symbols byimporting the original dependency.
fixes: #2139