This PR adds --version support for the nls binary, using the same scheme as for the main nickel binary. Its absence made it hard to know which version of NLS users would currently run, which isn't great for chasing bugs.
Doing so, I discovered some underlying feature unification issues that were here but just invisible, namely that the little stunt we pull off for generating versions in different environments (in the git repo, building for crates.io and the nixified version) requires the string feature of clap, but we didn't enable this feature explicitly anywhere. It just happened that it was enabled previously for nickel-lang-cli by chance, thanks to feature unification (through comrak which is used for the doc feature). In fact building nickel-lang-cli without the default features is failing on current master, because the absence of doc doesn't pull comrak in, which doesn't enable the string feature.
This PR fixes the compilation issue by adding the missing string feature to the clap dependency for both the cli and the lsp. We also make nickel-lang-lsp also depend on nickel-lang-core without the default featurs (as most of them are useless for the LSP), and we fix another unrelated compilation error of nickel-lang-cli without default features by making nickel-lang-core always export eval_record_spine, which would only be included when the doc feature was enabled before, but is actually used for other purposes now (namely the CLI customize mode).
This PR adds
--version
support for thenls
binary, using the same scheme as for the mainnickel
binary. Its absence made it hard to know which version of NLS users would currently run, which isn't great for chasing bugs.Doing so, I discovered some underlying feature unification issues that were here but just invisible, namely that the little stunt we pull off for generating versions in different environments (in the git repo, building for crates.io and the nixified version) requires the
string
feature of clap, but we didn't enable this feature explicitly anywhere. It just happened that it was enabled previously fornickel-lang-cli
by chance, thanks to feature unification (throughcomrak
which is used for thedoc
feature). In fact buildingnickel-lang-cli
without the default features is failing on current master, because the absence ofdoc
doesn't pullcomrak
in, which doesn't enable thestring
feature.This PR fixes the compilation issue by adding the missing
string
feature to theclap
dependency for both the cli and the lsp. We also makenickel-lang-lsp
also depend onnickel-lang-core
without the default featurs (as most of them are useless for the LSP), and we fix another unrelated compilation error ofnickel-lang-cli
without default features by makingnickel-lang-core
always exporteval_record_spine
, which would only be included when thedoc
feature was enabled before, but is actually used for other purposes now (namely the CLI customize mode).