prql icon indicating copy to clipboard operation
prql copied to clipboard

`prql-compiler` name?

Open max-sixty opened this issue 2 years ago • 11 comments

I remember this was discussed a while ago, around possibly renaming to prqlc. I don't have a view but wanted to ensure I wasn't dropping something others were expecting.

The others I'm familiar with are rustc and ocamlc (but also ocamlopt), though go is just go IIUC. Any others?

I can understand not just calling it prql given it is more "core" and probably not going to be called directly by many people.

We should ensure the brew references reflect the correct name, whether that's prqlc or prql-compiler. https://github.com/prql/prql/issues/866

max-sixty avatar Nov 02 '22 15:11 max-sixty

I think we need a distinction between:

  • prql-compiler, which is a library that can be used directly from Rust or via bindings for other languages, and
  • prqlc which is the CLI that you can invoke to compile .prql files to .sql. This is the thing that needs a short name.

prql-compiler will probably be split into it's own sub-dependencies (prql-ast for example) so future projects (such as LSP server, database plugins or query execution engine) can utilize only parts that they need.

aljazerzen avatar Nov 03 '22 13:11 aljazerzen

Great suggestion @aljazerzen . I agree with that.

snth avatar Nov 03 '22 20:11 snth

Where do we currently use prql-compiler name? cargo crate that is the cli?

aljazerzen avatar Dec 20 '22 21:12 aljazerzen

Where do we currently use prql-compiler name? cargo crate that is the cli?

Yes, and the brew recipe

max-sixty avatar Dec 20 '22 21:12 max-sixty

I see. So to do this, we'd have to

  • publish a new crate prqlc,
  • rename brew recipe,
  • and possibly remove Cli structs from prql-compiler library crate.

@max-sixty can you do this? It involves GH actions and cargo organization that I don't fully understand. I'm not saying now, just in general.

aljazerzen avatar Dec 20 '22 22:12 aljazerzen

For sure! Definitely my area

max-sixty avatar Dec 20 '22 22:12 max-sixty

I'm not sure if I'm understanding correctly but I don't think that you have to publish a new crate. You can just rename the binary target in the crate. The prql-query crate is called prql-query but the binary it produces is called pq.

snth avatar Dec 20 '22 22:12 snth

Edit: @snth beat me to it


and possibly remove Cli structs from prql-compiler library crate. publish a new crate prqlc,

Why split the crates up though? Isn't it simpler to have a single crate? (no strong specific view though)

max-sixty avatar Dec 20 '22 22:12 max-sixty

How does this work then? There is a single crate published and it contains both library you can call from your code and the binary with some other name?

aljazerzen avatar Dec 20 '22 22:12 aljazerzen

Yes, I think you can do this: https://stackoverflow.com/questions/26946646/package-with-both-a-library-and-a-binary

Edit: This is for the package, I'm not so sure about the published aspect of this.

snth avatar Dec 20 '22 22:12 snth

We currently publish both the library and binary as a single crate — the change would be to the binary name. pq is a good example!

max-sixty avatar Dec 20 '22 22:12 max-sixty