WireCell / wire-cell-toolkit

Toolkit for Liquid Argon TPC Simulation and Reconstruction
https://wirecell.github.io/
Other
7 stars 22 forks source link

The gojsonnet lib instead of the C++ libjsonnet should be made default #342

Open brettviren opened 2 months ago

brettviren commented 2 months ago

The Go version of the Jsonnet library is far faster than the C++ version and I believe everyone (?) uses it. This requires the user to give an option when configuring the build.

This should be switched so that gojsonnet is the default and anyone stuck with the C++ libjsonnet external may specify an option.

This issue is meant to stew for a bit to see if this switch would cause major breakage.

To effect it, the 'Jsonnet' libs= entry in waft/wcb.py needs editing.

HaiwangYu commented 2 months ago

Hi @brettviren ,

Currently the 'Jsonnet' entry in waft/wcb.py shows

('Jsonnet',  dict(incs=["libjsonnet.h"], libs=['jsonnet'])),

At configure time, I am using:

--with-jsonnet-include="$GOJSONNET_FQ_DIR/include" \  
--with-jsonnet-lib="$GOJSONNET_FQ_DIR/lib" \    

So what will be the changes in your proposal?

brettviren commented 2 months ago

The change involves adding "go" to the libs name:

 ('Jsonnet',  dict(incs=["libjsonnet.h"], libs=['gojsonnet'])),

A user will still supply --with-jsonnet-{lib,include} (assuming their Jsonnet is not found automatically) but they would no longer need to supply --with-jsonnet-libs=gojsonnet.