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(core): imported symbols runtime leak #2896

Merged
merged 7 commits into from
Sep 18, 2023
Merged

Conversation

idoros
Copy link
Collaborator

@idoros idoros commented Aug 27, 2023

This pull request addresses a longstanding regression related to the unintended runtime leakage of imported symbols.

During the process of refactoring the internal symbol resolution code to achieve consistent handling of various symbols, an oversight occurred. This oversight caused the generated JavaScript runtime and the .d.ts files to inadvertently expose imported symbols of the stylesheet.

This situation is problematic because Stylable's assumption is that symbols of a stylesheet are only meant to be used if the stylesheet is imported into a JavaScript file. If it's not imported this way, it's assumed that the symbols' namespacing can't be connected to the DOM and can thus be removed as unnecessary code from the final output.

This fix is undoubtedly necessary. However, it's important to acknowledge that there's a possibility it could introduce disruptions in external code. To mitigate this potential impact, we're planning to conduct a thorough search across both public code repositories and internal code projects accessible to us. This search aims to identify instances where this fix might cause conflicts or complications. Based on our findings, we will make an informed decision about whether to integrate this fix into the upcoming v5 release or reserve it for inclusion in the subsequent major release, v6. For now this change will only effect version 6, and we might port it back to v5 at some point.

- also check that they are not exposed in d.ts
- also check that they are not exposed in d.ts
- also check that they are not exposed in d.ts
- also check that they are not exposed in d.ts
- also check that they are not exposed in d.ts
@idoros idoros added bug Unexpected behavior or exception core Processing and transforming logic runtime Runtime API labels Aug 27, 2023
@idoros idoros requested review from barak007 and tomrav August 27, 2023 13:59
@idoros idoros self-assigned this Aug 27, 2023
@idoros idoros marked this pull request as ready for review September 18, 2023 09:33
@idoros idoros merged commit f3b4c33 into master Sep 18, 2023
18 checks passed
@idoros idoros deleted the ido/fix-runtime-symbols-scope branch September 18, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected behavior or exception core Processing and transforming logic runtime Runtime API
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants