- Checkout with submodules, otherwise the sdist won't include libjsonnet.h
- Install golang in the cibuildwheel build container.
- Skip musllinux build; it's not working for me.
- Skip Windows platform builds; they're not working for me.
It would be nice to get the other platforms working but I have already
spent hours on this and haven't succeeded yet. Previous go-jsonnet
releases on PyPI didn't have prebuilt wheel packages anyway, so it's
still strictly better to have some rather than none even if not all
platforms are covered.
This changes the bazel module dependencies so that the C++ jsonnet
repo dependency (which is actually used as the source for the
standard library and nothing else in the Bazel build) comes from
a specific commit of the jsonnet repo, rather than depending on
the 'published' jsonnet 0.20.0.
The two repos are tightly coupled anyway so I think this more
accurately reflects the situation. Particularly since the C++ repo
is also linked (at a specific commit) as a git submodule, which
is used for non-Bazel build and testing.
It was added in Jan 2020 and apparently has never been updated since
then. It refers to Bazel 1.2.1 which is long out of date (Bazel 5 is
the oldest still maintained version, and Bazel 8 is the current
active version).
This corresponds to a similar commit on the C++ jsonnet repo:
a02a615def
The is intended to make it easier for me to trigger running CI on
existing pull requests.
This includes the stdlib additions in
https://github.com/google/jsonnet/pull/1187
Also updates golden files for go-jsonnet tests; the changes
to the goldens are mostly changes to error locations from
the standard library.
The `valueToString` operation introduced by #742 is incompatible with the way
the implementation from #739 as it tries to manifest an object from stack while
the implementation needed by the debugger returns the value as-is without
further evaluation.
* chore: update rules_go and gazelle version to fix bazel build
* chore: fix source file list in ast directory (ref: #746)
* chore: fix dependency list in formatter directory
* fix: fix conversion from int to float64
* fix: fix a compile error
```
cannot convert v (variable of type interface{}) to type float64: need type assertion
```
* Gracefully handle encountered regular expression when running jsonnetfmt, adding tests.
* Do not validate verbatim strings.
* Also do not validate string blocks.
* Change golden prefix for formatter tests to fmt.golden to be consistant with cpp version.
* Export FormatNode so external users can pretty print an AST
Signed-off-by: Tom Wilkie <tom@grafana.com>
* Expose RawAST function.
Signed-off-by: Tom Wilkie <tom@grafana.com>
* Add comment
Signed-off-by: Tom Wilkie <tom@grafana.com>
---------
Signed-off-by: Tom Wilkie <tom@grafana.com>
Co-authored-by: Tom Wilkie <tom@grafana.com>
manifestYamlDoc takes two optional parameters, `indent_array_in_object` and `quote_keys`. This commit teaches jsonnet-lint about them so that it doesn't raise errors when you use them.
There are other stdlib library functions with this problem; the true solution is probably to auto-generate this from the stdlib AST, but this at least gets the linter happy with this particular function.