Skip to content

Gradually move prlqc-ast code into other crates #4603

@max-sixty

Description

@max-sixty

What's up?

As discussed with @aljazerzen & @m-span (though not necessarily agreed yet, feedback welcome), prqlc-ast isn't quite pulling its weight as a "cross-compiler external interface".

I'm very keen to continue to make the compiler more modular by stage. But this crate doesn't do that — instead it adds context to understanding a particular stage.

So I think it makes sense to:

  • At least move into prqlc-parser the items which only have prqlc-parser as a dependent. For example span.rs (or token.rs, which I recently combined with similar code)
    • (technically prqlc also depends on Span — but only because it's used in prqlc-parser, I'm counting that as "only have prqlc-parser as a dependent", hope that's not too confusing...)
  • Possibly do more — e.g. we have some code in generic.rs which lots of crates depend on — we could consider also dissolving that. But we can wait to see what's left

Keen not to just continually refactor the library (meme below), but in this case I do think it would make it simpler and is worthwhile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions