aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-10Allow Soongs/blueprint's microfactory build starlark-go am: 9ff3db46c2 am: ↵android-t-preview-2android-t-preview-1android-t-beta-3android-s-v2-preview-2android-s-v2-preview-1android-s-v2-beta-3android-s-v2-beta-2android-s-qpr3-beta-1android-12.1.0_r9android-12.1.0_r8android-12.1.0_r7android-12.1.0_r26android-12.1.0_r25android-12.1.0_r24android-12.1.0_r23android-12.1.0_r22android-12.1.0_r21android-12.1.0_r20android-12.1.0_r19android-12.1.0_r18android-12.1.0_r17android-12.1.0_r16android-12.1.0_r15android-12.1.0_r14android-12.1.0_r13android-12.1.0_r12android-12.1.0_r11android-12.1.0_r10android-12.0.0_r32android-12.0.0_r29android-12.0.0_r28android-12.0.0_r27android-12.0.0_r26android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android-12.0.0_r16android12L-devandroid12L-d2-s8-releaseandroid12L-d2-s7-releaseandroid12L-d2-s6-releaseandroid12L-d2-s5-releaseandroid12L-d2-s4-releaseandroid12L-d2-s3-releaseandroid12L-d2-s2-releaseandroid12L-d2-s1-releaseandroid12L-d2-releaseandroid12-qpr3-s7-releaseandroid12-qpr3-s6-releaseandroid12-qpr3-s5-releaseandroid12-qpr3-s4-releaseandroid12-qpr3-s3-releaseandroid12-qpr3-s2-releaseandroid12-qpr3-s1-releaseandroid12-qpr3-releaseandroid12-qpr1-releaseandroid12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-releaseandroid12-devandroid-t-preview-1android-s-v2-preview-1android-s-v2-beta-3android-s-qpr3-beta-1Sasha Smundak
87b79b8fa6 am: 96856bab52 Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1672645 Change-Id: If90699c830bb9c71982496f034a331c98ac6ae62
2021-04-10Allow Soongs/blueprint's microfactory build starlark-go am: 9ff3db46c2 am: ↵Sasha Smundak
87b79b8fa6 Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1672645 Change-Id: I5e807767e148ee53a21e5ed346c1768b9a2187f0
2021-04-10Allow Soongs/blueprint's microfactory build starlark-go am: 9ff3db46c2android-s-beta-5android-s-beta-4android-s-beta-3android-s-beta-5android-s-beta-4Sasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1672645 Change-Id: I2aa0e3df6011f64b1e8ce82730cf99213a6eb0cd
2021-04-09Allow Soongs/blueprint's microfactory build starlark-goandroid-s-beta-2android-s-beta-1Sasha Smundak
Change build directives to avoids additional external dependency (golang.org/x/sys/unix) at the cost of small performance degradation when handling integers. Bug: 172923994 Test: treehugger Change-Id: I11aa727031a523a309ba9372300e6d413847e02d
2021-03-31Export starlark-test, reformat. am: 949fa76edc am: e454b58a2b am: 27a5ba1ec0Sasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1635119 Change-Id: I31873ffb1950e9cd2f36f10e26ba12205847fee7
2021-03-31Export starlark-test, reformat. am: 949fa76edc am: e454b58a2bSasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1635119 Change-Id: I239b329b71a164fb9b93e1cdef3216bfe36aab1a
2021-03-31Export starlark-test, reformat. am: 949fa76edcSasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1635119 Change-Id: I37d530b13770eb0c066464078cd3955400025571
2021-03-14Export starlark-test, reformat.Sasha Smundak
Bug: 180529448 Test: treehugger Change-Id: I56fdd04239fb0c53c25907390bab927d8679e79c
2021-03-01[LSC] Add LOCAL_LICENSE_KINDS to external/starlark-go am: c1178f37dc am: ↵Bob Badour
4603692ae4 am: b2bf863872 Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1609821 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ib4447f38306ba589a5b6bad353322207c3c108e2
2021-03-01[LSC] Add LOCAL_LICENSE_KINDS to external/starlark-go am: c1178f37dc am: ↵Bob Badour
4603692ae4 Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1609821 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ie833d8c4890fb7b21012cd5cd38a5e7e7bd95c7a
2021-03-01[LSC] Add LOCAL_LICENSE_KINDS to external/starlark-go am: c1178f37dcplatform-tools-31.0.2platform-tools-31.0.1Bob Badour
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1609821 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ib2012f89569b5f450427f1efd719c371db3abd4f
2021-02-26[LSC] Add LOCAL_LICENSE_KINDS to external/starlark-goBob Badour
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ia76dda689eed6ca5031697b335871c4b2335b2b0
2021-02-24Add Android.bp to build starlark-go modules am: cb4dba6bd6 am: 482a43388c ↵Sasha Smundak
am: 76e40a5192 Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592917 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I797aa634e9677d076cffa4b5418038d466ffdcbf
2021-02-24Add the files required for the imported software am: e142ffe179 am: ↵Sasha Smundak
8a51b9f1ff am: 0b870394cf Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592916 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ic629cd875834eb38e13629807e295303e135ddee
2021-02-24Import from upstream. am: 2ba90398f8 am: 0710991d7f am: 20e766c836Sasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592915 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I7de853231e5f99ff3e6d803ba7d0e774f329fbc3
2021-02-24Add Android.bp to build starlark-go modules am: cb4dba6bd6 am: 482a43388cSasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592917 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I2ff23ca0c300a7a8e1bca3b8b0ad227c6f51e492
2021-02-24Add the files required for the imported software am: e142ffe179 am: 8a51b9f1ffSasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592916 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I622499f79660089c5f85319c49d521cc1b1fe6c9
2021-02-24Import from upstream. am: 2ba90398f8 am: 0710991d7fSasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592915 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I75502a9aa211e4ce1785124baecbd2e795f18b12
2021-02-24Add Android.bp to build starlark-go modules am: cb4dba6bd6Sasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592917 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1516c89924f537fa489650e135b80b7727582f8d
2021-02-24Add the files required for the imported software am: e142ffe179Sasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592916 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Iacfaa96de2377308aa3c695bc7fc40fc1f89fa73
2021-02-24Import from upstream. am: 2ba90398f8Sasha Smundak
Original change: https://android-review.googlesource.com/c/platform/external/starlark-go/+/1592915 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I2342babc15ec846be46b25cb69fe8432104f0330
2021-02-17Add Android.bp to build starlark-go modulesSasha Smundak
Bug: 180529448 Test: m nothing Change-Id: Ie5c3fba85dd00a3ec4f7ea56f435cbd2e34e77bb
2021-02-17Add the files required for the imported softwareSasha Smundak
Bug: 180529448 Test: N/A Change-Id: Iee18f0ea86b67eb8d0a325464e4e9a330650c121
2021-02-17Import from upstream.Sasha Smundak
Bug: 180529448 Test: N/A Change-Id: I36e5c9f953ef2df0c1952c3ce7a426ba96529be1
2021-02-12starlark: add 'bytes' data type, for binary strings (#330)alandonovan
THIS IS AN INCOMPATIBLE LANGUAGE CHANGE; see below This change defines a 'bytes' data type, an immutable string of bytes. In this Go implementation of Starlark, ordinary strings are also strings of bytes, so the behavior of the two is very similar. However, that is not required by the spec. Other implementations of Starlark, notably in Java, may use strings of UTF-16 codes for the ordinary string type, and thus need a distinct type for byte strings. See testdata/bytes.star for a tour of the API, and some remaining questions. See the attached issue for an outline of the proposed spec change. A Java implementation is underway, but is greatly complicated by Bazel's unfortunate misdecoding of UTF-8 files as Latin1. The string.elems iterable view is now indexable. The old syntax.quote function (which was in fact not used except in tests) has been replaced by syntax.Quote, which is similar to Go's strconv.Quote. This change removes go.starlark.net.lib.proto.Bytes. IMPORTANT: string literals that previously used hex escapes \xXX or octal escapes \OOO to denote byte values greater than 127 will now result in a compile error advising you to use \u escapes instead if you want the UTF-8 encoding of a code point in the range U+80 to U+FF. A string literal can no longer denote invalid text, such as the 1-element string formerly written "\xff". Updates https://github.com/bazelbuild/starlark/issues/112 Fixes https://github.com/google/starlark-go/issues/222
2021-02-08syntax: support setting initial line/col for scanner (#349)alandonovan
The new FilePortion type, which may be provided to the scanner, parser, or ExecFile functions, combines a piece of text along with its start line/column numbers, for applications that extract a Starlark expression from the middle of a larger file. Fixes https://github.com/google/starlark-go/issues/346
2021-01-26Remove an unused Thread in the sequential load example (#345)Xùdōng Yáng
2021-01-25starlark: fix bug in int(string, base=int) (#344)alandonovan
Previously, when int was called with an explicit base, it would report an error if the digit string starts with a base prefix for a different base, such as int("0b101", 16). Now, it uses the base prefix only if it matches the requested base, so the example above would return 0x0b101, as would int("0x0b101", 16). The int(string, int) case has been split out for clarity. Update doc. Fixes #337
2021-01-22testdata: s/blacklist/blocklist/g per Google policy (#343)alandonovan
See https://www.adexchanger.com/data-driven-thinking/no-more-inflammatory-jargon-change-blacklist-to-blocklist/
2021-01-22starlark: report "uninitialized cell" errors gracefully (#341)alandonovan
The contents of a cell may be null, just like any other local. We should report this as an error. So that we can name the variable in the error message, we change the instruction set so that LOCAL<local>+CELL are combined into a single LOCALCELL<local> instruction, and FREE<free>+CELL become a single FREECELL<free> instruction. For symmetry we also combine LOCAL<local>+SETCELL into SETLOCALCELL, though it cannot fail. (Happily, all three changes are optimizations previously described by TODO comments.) Fixes #340
2021-01-22spec: remove more stale implementation notes (#342)alandonovan
2021-01-21resolver: make -nesteddef and -lambda always on (#328)alandonovan
See https://github.com/bazelbuild/starlark/pull/145 for spec changes. Updates https://github.com/bazelbuild/starlark/issues/20
2021-01-19doc/spec.md: fix mistake regarding sign of x % y (#339)alandonovan
See https://github.com/bazelbuild/starlark/issues/148 for change to Starlark spec. Updates https://github.com/bazelbuild/starlark/issues/148
2021-01-19Add functionality for parsing floats (#338)James Johnson
* Add functionality for parsing floats * Run gofmt on unpack.go Co-authored-by: James <jjohnsonjj1251@gmail.com>
2021-01-17Fix: Immutability of Int is broken by BigInt method (#332) (#333)Germán Fuentes Capella
* Fix: Immutability of Int is broken by BigInt method (#332) The interface of Int assumes the value is immutable but a reference to its content is leaked through the BigInt() method, which is mutable. This fix resolves the leak by: - making a copy of the *big.Int in MakeBigInt() - returning a copy of the *big.Int content in BigInt() - creating an internal method bigInt() for internal use that still returns reference to the internal big.Int Fixes: #332 * Fix: Immutability of Int is broken by BigInt method (#332) Addressing review comments regarding documentation Fixes: #332
2021-01-13starlark: avoid constants > 1<<32 in tests (#336)alandonovan
...so that they compile on 32-bit platforms like GOARCH=386.
2020-12-10starlark: add AsInt helper function for unpacking values to Go ints (#329)alandonovan
Also, use it in Unpack* functions. This is a minor breaking change: any call that assumed values unpacked to 'int' were always in the int32 range will need to be modified to handle possible int64 values.
2020-12-08lib/proto: a Starlark package for protobuf processing (#318)alandonovan
This change defines an optional Starlark module for encoding and decoding protocol buffers (https://developers.google.com/protocol-buffers/). It adds a dependency on google.golang.org/protobuf. No promises of API stability yet: there are a number of TODOs to be resolved and questions to be answered first, but I would like to get this into the hands of the community. See discussion in https://github.com/stripe/skycfg/issues/23. Fixes #309
2020-12-04ci: Add support for go 1.15.x to .travis.yml (#325)Tim Bart
Also drops testing against go 1.12.x
2020-12-02starlark: add parameter to bench_xyz(b) benchmark functions (#323)alandonovan
The parameter is a wrapper around a testing.B, that provides the number of iterations and start/stop/reset methods. It follows the design used in java.starlark.net; see https://github.com/bazelbuild/starlark/pull/75#pullrequestreview-275604129 https://github.com/bazelbuild/bazel/commit/146cd2cecae52ebad6664046fd1430c2a23b55e1
2020-11-18starlark: use portable syscall wrapper for mmap (#321)alandonovan
Also, add test to ensure that new dependencies (such as golang.org/x/sys/unix) are not added casually. Fixes #320
2020-11-18starlark: skip last frame of stack backtrace if built-in (#319)alandonovan
Instead, the name of the built-in function is append to the error message ("Error in foo: ...").
2020-11-13starlarkjson: sort dict keys (#316)alandonovan
This is for consistency with the java.starlark.net implementation and proposed spec. This is a (minor) incompatible behavior change.
2020-11-13starlark: disallow keyword argument after *args (#317)alandonovan
f(*args, k=v) is a now an error. Use f(k=v, *args). Arguments are evaluated left-to-right, as in Python2 (but not Python3). See https://github.com/bazelbuild/starlark/issues/13 for spec change.
2020-11-11spec: remove stale implementation notes (#315)alandonovan
Updates https://github.com/bazelbuild/starlark/issues/20
2020-11-11starlark: disallow None < None comparisons (#314)alandonovan
See spec change https://github.com/bazelbuild/starlark/issues/116
2020-11-11starlark: bring floating-point into spec compliance (#313)alandonovan
This change makes go.starlark.net's floating-point implementation match the proposed spec (see https://github.com/bazelbuild/starlark/pull/119), and thus much more closely match the behavior of the Java implementation. The major changes are: - Float values are totally ordered; NaN compares greater than +Inf. - The string form of a finite float value always contains an exponent or a decimal point, so they are self-evidently not int values. - Operations that would cause a large integer to become rounded to an infinite float are now an error. The resolve.AllowFloat boolean, and the corresponding -float command-line flag, now have no effect. Floating point support is always enabled.
2020-10-26Initial empty repositoryInna Palant
2020-10-14spec: fix typo in raw string example (#311)alandonovan
2020-10-06starlark: fix float % float bug (#308)alandonovan
We had a test, but the test was wrong. Fixes issue #307