Merge pull request #73 from hlopko:skylark_bye_bye

PiperOrigin-RevId: 314484747
Change-Id: Ic88f26a254371a4204844e279a4a189f9775b2d0
This commit is contained in:
Copybara-Service 2020-06-03 00:53:38 -07:00
commit 5cbd3dfbd1
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@
def resolve_labels(repository_ctx, labels): def resolve_labels(repository_ctx, labels):
"""Resolves a collection of labels to their paths. """Resolves a collection of labels to their paths.
Label resolution can cause the evaluation of Skylark functions to restart. Label resolution can cause the evaluation of Starlark functions to restart.
For functions with side-effects (like the auto-configuration functions, which For functions with side-effects (like the auto-configuration functions, which
inspect the system and touch the file system), such restarts are costly. inspect the system and touch the file system), such restarts are costly.
We cannot avoid the restarts, but we can minimize their penalty by resolving We cannot avoid the restarts, but we can minimize their penalty by resolving
@ -82,7 +82,7 @@ def split_escaped(string, delimiter):
if not string: if not string:
return [] return []
# Iterate over the length of string since Skylark doesn't have while loops # Iterate over the length of string since Starlark doesn't have while loops
for _ in range(length): for _ in range(length):
if i >= length: if i >= length:
break break