Skip to content

schema: do not write files if unchanged

Administrator requested to merge k/schema-nowrite into main

Created by: keegancsmith

This updates both stringdata.go and the go-jsonschema-compiler to only write the target files if the content has changed. I noticed this firing a few times in our dev environment, leading to needless recompiles. This should avoid that need.

Additionally go generate ./schema is faster now by only compiling stringdata.go once. On my machine it goes from 6.6s to 1.5s.

Merge request reports

Loading