moleike / haskell-jsonnet

🎏 Haskell implementation of Jsonnet
https://hackage.haskell.org/package/jsonnet
Other
21 stars 6 forks source link

Add external variable support #44

Closed ozkutuk closed 2 years ago

ozkutuk commented 2 years ago

Closes #38

As far as the Jsonnet spec goes, it seems like only the --ext-str flag is necessary, however I am trying to provide as much of the features from reference implementations as possible. Currently this PR adds:

I have also added the related golden tests from the C++ implementation's test suite, though some of them are not working because of the reasons that I believe to be unrelated to the external variables implementation. I have left those cases commented out.

Please let me know what you think! If this seems to be going in the right direction, I am going to be working on implementing the rest of the features as well.

moleike commented 2 years ago

@ozkutuk this is looking fantastic! Please go ahead, when you think it's ready change it from draft and I will look more thoroughly, but it is definitely going well.

moleike commented 2 years ago

The build is failing in CI, seems benchmarking code needs to be updated.

moleike commented 2 years ago

For reference, here's how it works in go-jsonnet cmd: https://github.com/google/go-jsonnet/blob/master/cmd/jsonnet/cmd.go#L59

ozkutuk commented 2 years ago

I didn't realize there was a benchmarking module available. I have updated the code so it should be good now.

ozkutuk commented 2 years ago

The build failure seems to be a case of #45.

moleike commented 2 years ago

The build failure seems to be a case of #45.

Yes, I think it makes sense to comment out, for now, the Roundtrip test, since it is far from working.