Skip to content

fix: Actually working system packages! - #2146

Merged
amitu merged 3 commits into
mainfrom
fix/2139
Jun 11, 2025
Merged

fix: Actually working system packages!#2146
amitu merged 3 commits into
mainfrom
fix/2139

Conversation

@siddhantk232

Copy link
Copy Markdown
Contributor

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

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
@siddhantk232

siddhantk232 commented Jun 11, 2025

Copy link
Copy Markdown
Contributor Author

Also closes #2069

@amitu
amitu merged commit 2d943d9 into main Jun 11, 2025
@amitu
amitu deleted the fix/2139 branch June 11, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Cascading component overrides don't work for a system package Importing the system package should import the overriding file.

2 participants