Skip to content

Refactor resource accessors generator to minify output source files.#5298

Merged
Konstantin (terrakok) merged 2 commits into
masterfrom
res-limit
May 6, 2025
Merged

Refactor resource accessors generator to minify output source files.#5298
Konstantin (terrakok) merged 2 commits into
masterfrom
res-limit

Conversation

@terrakok

@terrakok Konstantin (terrakok) commented Apr 24, 2025

Copy link
Copy Markdown
Member

Refactor resource accessors generator to minify output source files.

  • Number of items per file was decreased to 100
  • Common part of the path extracted to the private const
  • Added imports
  • Removed the private object with item's properties
  • The file structure was reorganized

Fixes CMP-7934 Too large String0.commonMain.kt will break code insight feature in AS

Testing

Integration tests.
This should be tested by QA

Release Notes

Fixes - Resources

  • Fix IDE highlighting/resolution when a generated file with resource accessors is too big

 - Number of items per file was decreased to 100
 - Common part of the path extracted to the private const
 - Added imports
 - Removed the private object with item's properties
 - The file structure was reorganized
This test verifies the generation of resource files and accessors for projects with a massive number of resources (25_000 icons + (25_000 * 80) strings).
@terrakok Konstantin (terrakok) merged commit 1b6e615 into master May 6, 2025
10 of 13 checks passed
@terrakok Konstantin (terrakok) deleted the res-limit branch May 6, 2025 11:46
Konstantin (terrakok) added a commit that referenced this pull request May 9, 2025
…5298)

Refactor resource accessors generator to minify output source files.

- Number of items per file was decreased to 100
- Common part of the path extracted to the private const
- Added imports
- Removed the private object with item's properties
- The file structure was reorganized

Fixes [CMP-7934](https://youtrack.jetbrains.com/issue/CMP-7934) Too
large String0.commonMain.kt will break code insight feature in AS

## Testing
Integration tests.
This should be tested by QA

## Release Notes
### Fixes - Resources
- Fix IDE highlighting/resoulution when a generated file with resource
accessors is too big

(cherry picked from commit 1b6e615)
Vlad Konstantinov (Kpotko) pushed a commit that referenced this pull request May 9, 2025
…5298)

Refactor resource accessors generator to minify output source files.

- Number of items per file was decreased to 100
- Common part of the path extracted to the private const
- Added imports
- Removed the private object with item's properties
- The file structure was reorganized

Fixes [CMP-7934](https://youtrack.jetbrains.com/issue/CMP-7934) Too
large String0.commonMain.kt will break code insight feature in AS

## Testing
Integration tests.
This should be tested by QA

## Release Notes
### Fixes - Resources
- Fix IDE highlighting/resoulution when a generated file with resource
accessors is too big

(cherry picked from commit 1b6e615)
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.

2 participants