| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
--
MOS_MIGRATED_REVID=114860576
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks many targets, see []
*** Original change description ***
Reinstate mutable SkylarkDict
Add <String, Object> annotation to optionMap invocation in SkylarkAttr,
to make JDK 1.7 happy.
Give the visible name "aspect" to class SkylarkAspect.
--
MOS_MIGRATED_REVID=113543873
|
|
|
|
|
|
|
|
|
|
| |
Add <String, Object> annotation to optionMap invocation in SkylarkAttr,
to make JDK 1.7 happy.
Give the visible name "aspect" to class SkylarkAspect.
--
MOS_MIGRATED_REVID=113394826
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Break Java 1.7 builds of Bazel.
See http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/327/console
Test:
git clone ... && git revert c0a8c58 && export JAVA_VERSION=1.7 && export BAZEL_COMPILE_TARGET=compile && bash -c "source scripts/ci/build.sh; bazel_build"
*** Original change description ***
Make Skylark dicts mutable
Represent Skylark dict using a new subclass SkylarkDict<K, V> of Map<K, V>.
Back it with a TreeMap to provide a deterministic iteration order.
Also make SkylarkList generic in its element type <E>.
Have Artifact implement Comparable<Object> so it can be used as TreeMap key.
--
MOS_MIGRATED_REVID=113359718
|
|
|
|
|
|
|
|
|
|
| |
Represent Skylark dict using a new subclass SkylarkDict<K, V> of Map<K, V>.
Back it with a TreeMap to provide a deterministic iteration order.
Also make SkylarkList generic in its element type <E>.
Have Artifact implement Comparable<Object> so it can be used as TreeMap key.
--
MOS_MIGRATED_REVID=113277489
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SkylarkList now implements the List interfaces, except that its mutating methods
throw an UnsupportedOperationException, just like ImmutableList does.
To actually mutate a SkylarkList, you need to pass a Location and a suitable
Environment object with a matching Mutability while it is still active.
Introduce SkylarkMutable and SkylarkMutable.MutableCollection to better handle
mutable data structures.
Remove some functions in EvalUtils made obsolete by this and previous changes regarding Skylark lists.
--
MOS_MIGRATED_REVID=112768457
|
|
|
|
|
|
|
| |
Mostly reuses the interpreters argument checking and helper functions.
--
MOS_MIGRATED_REVID=107395974
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=107391382
|
|
|
|
|
|
|
|
| |
Use SkylarkList everywhere rather than either List or GlobList.
Keep a GlobList underneath a MutableList, where applicable.
--
MOS_MIGRATED_REVID=105864035
|
|
|
|
|
|
|
|
|
|
|
| |
The headers were modified with
`find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'`
And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan.
The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand.
--
MOS_MIGRATED_REVID=103938715
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103374106
|
|
|
|
|
|
|
|
| |
Make SkylarkList no longer read-only to match Python and the BUILD language.
Instead, subject it to a Mutability object inherited from the Environment.
--
MOS_MIGRATED_REVID=103332973
|
|
|
|
|
|
|
|
|
|
|
| |
Clarify the criterion for being a valid Skylark value;
stop claiming immutability is "the" criterion when Skylark now has mutable values;
stop relying on a reflection with a magic list (this also fixes the SkylarkShell build).
Clarify the criterion for determining immutable types when making a SkylarkNestedSet.
Clarify and use the criterion for being a valid Skylark dict key.
--
MOS_MIGRATED_REVID=103313934
|
|
|
|
|
|
|
|
|
| |
- Moved registration mechanism from BaseFunction into ASTNode / Statement / Expression
- Added more details about statements/expressions to the output trace (including if's)
- Fixed wrong locations
--
MOS_MIGRATED_REVID=102841164
|
|
|
|
|
|
|
|
|
|
| |
Rename some methods to avoid clashes.
Add function formattable to create lazily-formatted objects,
remove now unused strFormattable and reprFormattable.
Also some whitespace cleanup.
--
MOS_MIGRATED_REVID=101459565
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101363350
|
|
|
|
|
|
|
|
| |
Refactor the implementation of format.
Add %r. Improve some error messages.
--
MOS_MIGRATED_REVID=96154542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move printing code from EvalUtils to Printer.
Rename functions in Printer:
printValue becomes str or print,
prettyPrintValue becomes repr or write,
formatString becomes format,
makeFormattable becomes strFormattable,
prettyPrintValues becomes listString.
write being self-sufficient is made the reference,
and print is the one that is a wrapper around write,
rather than the other way around, avoiding mutual recursion.
--
MOS_MIGRATED_REVID=95897834
|
|
|
|
|
|
|
|
|
| |
This function was introduced in Guava 0.19 but Guava 0.19 is not yet
released. We know exactly the size we want for the map so there is no
need to request extraneous space.
--
MOS_MIGRATED_REVID=93702023
|
|
|
|
|
|
|
|
|
|
| |
Previously, the resulting map was using a HashMap as an intermediate
map to construct the final map then converted to an ImmutableMap.
HashMap iteration or is non-deterministic and can even vary between
execution of the same binary.
--
MOS_MIGRATED_REVID=93512467
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a SkylarkList is an operand of the + operator, the other
parameter is converted to a SkylarkList so we can actually
perform the concatenation. A few exceptions are needed to
maintain the legacy behavior.
This change also extract the + operator part in a separate
function.
Fixes #121
--
MOS_MIGRATED_REVID=93503382
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=93129861
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91304912
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91289047
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91192716
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91181886
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91175430
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
change, the following syntax:
deps = [':always'] + select({':a': [':adep'], ':b': [':bdep']})
or
deps = select({':a': [':adep'], ':b': [':bdep']})
+ select({':c': [':cdep'], ':d': [':ddep']})
works.
--
MOS_MIGRATED_REVID=91016337
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the new EvaluationContext infrastructure to simplify Skylark tests
(said infrastructure is originally based on code from these tests).
Merge AbstractEvaluationTestCase and AbstractParserTestCase into
a non-abstract class EvaluationTestCase that uses EvaluationContext.
Cleanup the EventCollectionApparatus it uses.
Refactor all Skylark tests to use this new infrastructure.
Fix EvaluationTest and MethodLibraryTest to actually and correctly
run tests in both modes.
Fix small bugs in the main code base discovered by actually running the
code in both modes, and make error messages identical when possible.
--
MOS_MIGRATED_REVID=90828053
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=89977206
|
|
|
|
|
|
|
| |
In particular, struct, dict and set addition work like in Skylark files.
--
MOS_MIGRATED_REVID=88929558
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88713932
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88440711
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor SkylarkType, notably adding Union types and runtime typechecks.
These are pre-requisites to unifying all Skylark function calls to use the same
code path, that will check types (like SkylarkFunction currently does) as well
handle a more complete Python calling convention (like MixedModeFunction is
almost but not quite able to do).
A SkylarkType can be either
* a Simple type corresponding to a Java class, with special types TOP and BOTTOM
corresponding respectively to Object and EmptyType (similar to Void).
* a Combination of a generic class (LIST, MAP or SET) and an argument type
* a Union of a finite number of types
* a FunctionType associated with a name and a returnType (with ugly
validation-time side-effects that we should probably move out of the type)
Unions are necessary because:
1- the type of some builtin function arguments are actually the Union of some
type and a function type for a callback that computes the actual value.
2- the type of some builtin function arguments declared as "List" is actually
the Union of java List and SkylarkList.
3- instead of adding lots of special cases at the point of argument validation,
it's cleaner and more generally useful to have explicit Union types, that can
then be displayed to users for documentation or debugging purposes.
Validation-time "type inference" is re-expressed simply as type intersection.
None is treated specially as inferred into TOP instead of NoneType.
Combination types are printed as genericType of argTypes, e.g. "dict of ints". "type" and "generic1" become "genericType" and "argType". In SkylarkList and SkylarkNestedSet, genericType becomes contentType.
--
MOS_MIGRATED_REVID=87340881
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=87154772
|
|
|
|
|
|
|
|
| |
These shouldn't affect the semantic of the program in any significant way,
but will hush the linter and other such metaprograms.
--
MOS_MIGRATED_REVID=86089271
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=85722639
|
|
--
MOE_MIGRATED_REVID=85702957
|