Skip to content

Split src/parser/mod.rs and src/ast/mod.rs into smaller modules #2591

Description

@LucaCappelletti94

Several source files have grown past the point where navigating them is practical, with the parser mod at over 20k and the ast mod at over 10k.

This has come up before. #944 (2023, still open) proposed one parser file per statement, and #1581 (2024) split the whole parser in one draft PR. Both got agreement on the goal, conditioned on a series of small pure-move PRs. The earlier one-shot attempts #344 and #351 (2021) stalled on reviewer bandwidth, with concerns about conflicts with open PRs and about coupled code being easier to read in one file.

I suggest we try to do this before the next release, currently roughly planned for end of October (#2454), as a series of pure move PRs. I believe that, given the size of the task, it may be desirable to:

  1. Do this operation in single, reasonably sized PRs
  2. Prepare BEFORE a script for the CI that checks that the move is actually a move, and it is complete

If agreed, this supersedes #944.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions