starlark icon indicating copy to clipboard operation
starlark copied to clipboard

Starlark Language

Results 84 starlark issues
Sort by recently updated
recently updated
newest added

### Description of the feature request: It would be great to support [JSONC](https://code.visualstudio.com/docs/languages/json#_json-with-comments) format in json module. ```starlark json.decode(str, allow_comments = True) ``` or ```starlark jsonc.decode(str) ``` ### What underlying...

type: feature request

JSON is great for hosting raw data, but not great for human-written configs. It would be nice that json module could allow jsonc inputs (eg. with comments and trailing commas).

Hi, There is already a `fail` function, but it's not ergonomic to use, because it takes 2 lines and 1 added indentation level. It would be good if we could...

I propose adding a zero-argument form of `dir()`, matching that of Python 3: https://docs.python.org/3/library/functions.html#dir There are two use cases, which are currently not very easy to work around otherwise: *...

P2
type: feature request

https://github.com/bazelbuild/starlark/blob/ce1fdb0e4eb2c85dfc549ddee4dcf55974392334/README.md?plain=1#L36-L37 The readme says: > It is safe to execute untrusted code. https://github.com/google/starlark-go/issues/241#issuecomment-816369357 says: > we've never claimed that it is secure for running untrusted code. Scripts can easily cause...

I believe that https://peps.python.org/pep-0570, which describes very simple syntax for positional-only arguments, would be very useful to have in Starlark. It does enable one to write clean and robust helper...

The spec doesn't take a position on the stringification for most types. But in practice, the Java and Go implementations agree that positive infinity gets turned into `"+inf"` rather than...

tl;dr: The result of `proto.encode_text(struct(foo="hello", bar=None))` should be `"{foo: "hello"}` rather than an error. Otherwise I need to use `hasattr` a whole lot, which seems bad. I'm ducktyping a proto...

Now that Starlark has gained support for floating point, it makes sense to revisit the decision to not allow width or precision specifiers for `%` string interpolation formats. This would...

We should add `abs` to the set of "universal" predeclared functions, following Python3. It would return the absolute magnitude of its argument, preserving type (float or int), unlike Python3's math.fabs,...