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

CfW: Introduce webCommonW3C source set to fix metadata compilation while avoiding code duplication #1123

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

eymar
Copy link
Collaborator

@eymar eymar commented Feb 20, 2024

The goals of this PR:

  • Enable back compileJsWasmMainKotlinMetadata tasks
  • Fix "common w3c" symbol resolving in IDE

Solution:

  • The code with "common w3c" usages is moved to a new folder called "webQuasiCommon"
  • jsMain and wasmJsMain source sets include this folder

How to test:

These tasks should be successfull:

./gradlew :mpp:publishComposeJbToMavenLocal -Pcompose.platforms=web,jvm,android // no native to test on linux agents 
./gradlew :compose:mpp:demo:wasmJsBrowserProductionWebpack
./gradlew :compose:mpp:demo:jsBrowserProductionWebpack

Cons:
IDEA treats the new webQuasiCommon as a k/js source set. Meaning we still need to be careful and test the changes (on CI too).

Pros:*
Working with the code in IDE is more convenient now with resolved symbols.
No need for a workaround anymore in user projects.

@eymar eymar requested a review from Schahen February 20, 2024 11:43
@eymar eymar changed the title CfW: Introduce webQuasiCommon source set to fix metadata compilation while avoiding code duplication CfW: Introduce webCommonW3C source set to fix metadata compilation while avoiding code duplication Feb 20, 2024
@eymar eymar merged commit 7b5af48 into jb-main Feb 20, 2024
4 of 6 checks passed
@eymar eymar deleted the ok/cfw_quasi_common_web_sources branch February 20, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants