Skip to content

refactor: remove base module and flatten module hierarchy #1583

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gvozdvmozgu
Copy link
Collaborator

No description provided.

@gvozdvmozgu gvozdvmozgu requested a review from Copilot May 5, 2025 12:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the project by removing the legacy “base” modules and flattening the module hierarchy, simplifying import paths throughout the codebase.

  • Updated import paths across multiple files by replacing references to "segments::base::ErasedSegment" with "segments::ErasedSegment".
  • Removed the legacy "base" modules (in both parser/grammar and dialects), consolidating their functionality into the updated module structure.

Reviewed Changes

Copilot reviewed 153 out of 153 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/lib-core/src/parser/node_matcher.rs Updated import path for ErasedSegment to reflect the new module structure.
crates/lib-core/src/parser/matchable.rs Updated import paths for grammar and segments.
crates/lib-core/src/dialects/base.rs Removed file as part of the module flattening refactor.
crates/lib-core/src/dialects.rs Adjusted module contents to consolidate dialect functionality.
(Other parser and grammar files) Similar updates to remove references to the "base" submodule.
Comments suppressed due to low confidence (2)

crates/lib-core/src/dialects/base.rs:1

  • The removal of this deprecated base module appears intentional. Please confirm that no remaining components rely on this file and that all dependencies have been updated to reflect the new module structure.
Entire file removed

crates/lib-core/src/parser/node_matcher.rs:7

  • The updated import path from 'segments::base::ErasedSegment' to 'segments::ErasedSegment' is consistent with the new module hierarchy. Please verify that all references throughout the codebase now correctly use the flattened structure.
+use crate::parser::segments::ErasedSegment;

@gvozdvmozgu gvozdvmozgu force-pushed the remove-base-flatten-hierarchy branch from 6bf2a25 to 8f1a080 Compare May 5, 2025 12:45
Copy link

github-actions bot commented May 5, 2025

Benchmark for 7466a1a

Click to view benchmark
Test Base PR %
DepthMap::from_parent 40.1±0.43µs 39.6±0.32µs -1.25%
fix_complex_query 9.2±0.11ms 9.7±0.73ms +5.43%
fix_superlong 89.5±5.85ms 96.6±6.27ms +7.93%
parse_complex_query 2.8±0.04µs 2.9±0.03µs +3.57%
parse_expression_recursion 5.0±0.05µs 5.2±0.09µs +4.00%
parse_simple_query 789.4±12.03ns 804.5±12.36ns +1.91%

Copy link

github-actions bot commented May 5, 2025

Benchmark for b0e17c0

Click to view benchmark
Test Base PR %
DepthMap::from_parent 40.2±0.40µs 40.1±0.46µs -0.25%
fix_complex_query 9.3±0.07ms 9.6±0.57ms +3.23%
fix_superlong 95.4±7.33ms 104.9±8.60ms +9.96%
parse_complex_query 2.9±0.02µs 2.9±0.03µs 0.00%
parse_expression_recursion 5.0±0.06µs 5.1±0.05µs +2.00%
parse_simple_query 800.6±12.77ns 791.5±7.76ns -1.14%

@gvozdvmozgu gvozdvmozgu force-pushed the remove-base-flatten-hierarchy branch from 8f1a080 to 7846400 Compare May 5, 2025 13:48
Copy link

github-actions bot commented May 5, 2025

Benchmark for 965ba91

Click to view benchmark
Test Base PR %
DepthMap::from_parent 40.1±0.41µs 39.8±0.76µs -0.75%
fix_complex_query 9.2±0.07ms 9.7±0.48ms +5.43%
fix_superlong 95.9±7.39ms 111.2±67.81ms +15.95%
parse_complex_query 2.9±0.03µs 2.9±0.05µs 0.00%
parse_expression_recursion 5.1±0.07µs 5.1±0.09µs 0.00%
parse_simple_query 811.3±8.92ns 812.2±14.39ns +0.11%

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.

1 participant