Conversation
- Move 218 test functions from lib.rs to tests/all_tests.rs - Reduce lib.rs from 13,500 lines to 375 lines (code only) - Migrate 544 snapshot files from src/snapshots/ to tests/snapshots/ - All 1,221 tests pass (986 unit + 235 integration) This separation improves code organization and compile times by keeping test code separate from library code.
Phase 2 foundation for Turbopack multi-core support: - Add ExtractionContext struct (extractor/src/context.rs) - Holds class_map, file_map, prefix, debug state - Replaces global state for parallel extraction - Full test coverage (8 tests) - Add context-aware CSS operations (css/src/context_ops.rs) - sheet_to_classname_with_context() - sheet_to_variable_name_with_context() - keyframes_to_keyframes_name_with_context() - Full test coverage (9 tests) - Export ExtractionContext from extractor crate - Add bimap dependency to extractor This lays groundwork for threading context through DevupVisitor and eliminating global state from core extraction logic.
Add sync methods to ExtractionContext for global state interop: - sync_to_globals(): push context state to global variables - sync_from_globals(): pull global state back to context - from_globals(): create context from current global state Add extract_with_context() function that wraps extract() with context synchronization, enabling stateless extraction for parallel processing (e.g., Turbopack multi-core builds). This is an incremental approach - internal modules still use global state, but the new API provides the foundation for future parallelization work.
Contributor
Changepacks |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.