Skip to content
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

[FIX] Properly resolve dependent shimmed modules #611

Closed
wants to merge 4 commits into from

Conversation

d3xter666
Copy link
Contributor

Fixes: SAP/ui5-tooling#807

If an external (non-UI5) module is provided as devDependency in an application, but there's a dependecy to a sub-module that uses the external module as a main dependency and is shimmed there, it's been cached without the shim and is not build properly later.

Sample structure:

app/
  \_ node_modules/
    \_ rxjs/ # devDependency, not shimmed
    \_ library/
      \_ node_modules/
        \_ rxjs/ # dependency, shimmed

@d3xter666 d3xter666 requested review from RandomByte and a team May 17, 2023 08:17
RandomByte added a commit that referenced this pull request May 17, 2023
If a visited module did not resolve to any specification (project or
extensions), try recreating the module when visiting it again from a
different parent.

Resolves SAP/ui5-tooling#807

This is an alternative to #611

This change might have a greater impact on performance since er might
recreate modules that are not relevant to UI5 Tooling more than once if
they are listed multiple times in the dependency tree.
Before this change, such modules where only visited once.
@coveralls
Copy link

Coverage Status

Coverage: 95.761% (+0.01%) from 95.751% when pulling 6bd829a on fix-resolve-properly-dependency-shims into 9278d76 on main.

@d3xter666 d3xter666 closed this May 19, 2023
@d3xter666
Copy link
Contributor Author

A better solution has been proposed

@matz3 matz3 deleted the fix-resolve-properly-dependency-shims branch May 19, 2023 08:01
RandomByte added a commit that referenced this pull request May 22, 2023
If a visited module did not resolve to any specification (project or
extensions), try recreating the module when visiting it again from a
different parent.

Resolves SAP/ui5-tooling#807

This is an alternative to #611

This change might have a greater impact on performance since er might
recreate modules that are not relevant to UI5 Tooling more than once if
they are listed multiple times in the dependency tree.
Before this change, such modules where only visited once.

---------

Co-authored-by: Yavor Ivanov <yavor.ivanov@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shims no longer bundled after migration to v3
2 participants