Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> debugging is a real pain

yes! As always, it's mostly a tooling issue. Surely, some aspects of the language like lazy evaluation, make it even harder, but fundamentally there is no reason we cannot significantly improve on the overall experience.

And this is not just about debugging when things go wrong. It's also hard to navigate the codebase and understand where are the templates that you care about. Things can happen at multiple levels (that's the feature!) and so it can be quite hard to figure out which files you need to touch if you want to change something in the output. I'm working on a tool to answer that question: "if I wanted to change this field in the generated out put, what are the places in the input files that contribute to produce this value"

    $ ursonnet testdata/child.jsonnet '$.deployment.spec.template.spec.containers[0].resources.limits.cpu'   
    testdata/common.libsonnet:27 
    testdata/base.jsonnet:5 
    testdata/common.libsonnet:23 
    testdata/common.libsonnet:22 
    testdata/config.libsonnet:5
The tool lives in https://github.com/mkmik/ursonnet . I got the basics working but it doesn't work on my larger codebases due to some bug I didn't have yet time hunting down. Having some interest/feedback/help from the community would help making this a reality.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: