facebook / starlark-rust

A Rust implementation of the Starlark language
Apache License 2.0
672 stars 53 forks source link

Add a --version flag #76

Closed stagnation closed 6 months ago

stagnation commented 1 year ago

Hi!

I am a happy user, mainly for Bazel work, but have been very pleased with the release of Buck2. Now I find myself with multiple builds of the program as I try to follow the new features as they land in here, rather than wait for official releases of the cargo package.

Each time I rebase though I find myself typing starlark --version, and realize that it does not tell me a version.

That said, I'm a happy mono-repo developer and mostly live at head, and I know of the headache build stamping leads to. But I feel that a version flag would still be useful,a stamped shaid and the commit date would be nice.

ndmitchell commented 1 year ago

I think this is probably a issue request for https://github.com/facebook/buck2? I imagine you want to do buck2 --version?

stagnation commented 1 year ago

No actually it is the starlark interpreter, and the LSP, in particular. I use it for all my .bzl and BUILD files in my bazel projects. I'm convinced it is even better if I had a buck2 project. But it is very useful for bazel as is, and has more checks that buildifier, dead code and such. I have my editor setup to use both starlark and buildifier as LSPs.


buck2 already has it, and I envision something similar.

$ buck2 --version
buck2 8432bb6e5967c530067997d8adddf798997b2898 <local>
ndmitchell commented 6 months ago

Added in 863cfe75ad9b16bd732c1c8f2ed5edbc8f69f8da - shows the Cargo.toml version.