| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Moved some tests, fixed formatting, changed to use assertThat().
--
PiperOrigin-RevId: 144356402
MOS_MIGRATED_REVID=144356402
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 143204724
MOS_MIGRATED_REVID=143204724
|
|
|
|
|
|
|
|
|
|
|
| |
that makes an appropriate call to Interners.InternerBuilder#concurrencyLevel.
For current readers of this CL, I used this class everywhere in the Blaze codebase.
For future readers of this CL, this class should be used to create an Interner in the Blaze codebase.
--
MOS_MIGRATED_REVID=140063271
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=135816105
|
|
|
|
|
|
|
| |
This in preparation to DeclaredProviders implementation.
--
MOS_MIGRATED_REVID=129420617
|
|
|
|
|
| |
--
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
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure to wrap a GlobList into a MutableList in convertToSkylark.
Indeed, GlobList is somehow a SkylarkValue, but is not actually acceptable
as a Skylark value. Until this is cleaned up, tweak convertToSkylark.
Also, robustify ClassObject by eagerly calling convertToSkylark on values.
--
MOS_MIGRATED_REVID=113421790
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Fix convertToSkylark that was wrapping List-s into new MutableList-s,
which became wrong since SkylarkList now implements List.
--
MOS_MIGRATED_REVID=113256638
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
|
|
|
| |
Use SkylarkList everywhere rather than either List or GlobList.
Keep a GlobList underneath a MutableList, where applicable.
--
MOS_MIGRATED_REVID=105864035
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=105552023
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change affects only lists, because it is the only mutable type.
The change is also temporary. We will later make the list immutable (when
it comes from a different context) and we will be able to remove the copy.
This fixes a critical bug where values could be mutated from a BUILD file
and affect other BUILD files.
--
MOS_MIGRATED_REVID=105400506
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make Environment-s freezable: Introduce a class Mutability
as a revokable capability to mutate objects in an Environment.
For now, only Environment-s carry this capability.
Make sure that every Mutability is revoked in the same function that create...
This reinstates a change that previously rolled-back because it broke the
serializability of SkylarkLookupValue. Bad news: serializing it succeeds for the
wrong reason, because a SkylarkEnvironment was stored as a result (now an
Environment.Extension) that was Serializable but inherited its bindings from an Environment (now an Environment.BaseExtension) which wasn't Serializable.
Apparently, Java doesn't try to serialize the bindings then (or at least doesn't
error out when it fails), because these bindings map variable names to pretty
arbitrary objects, and a lot of those we find in practice aren't Serializable.
Thus the current code passes the same tests as the previous code, but obviously
the serialization is just as ineffective as it used to be.
--
MOS_MIGRATED_REVID=102776694
|
|
|
|
|
|
|
|
| |
Move away global constants and global namespaces out of Environment
and into a new file Runtime.
--
MOS_MIGRATED_REVID=101940218
|
|
|
|
|
|
|
| |
hold a global lock in order to get a skylark type.
--
MOS_MIGRATED_REVID=101585120
|
|
|
|
|
|
|
|
|
| |
This avoids using a RuntimeException (IllegalArgumentException)
to circumvent declaration issues, which when we were catching it too well
was hiding actual issues of RuntimeException.
--
MOS_MIGRATED_REVID=95767534
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=93920816
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=93415666
|
|
|
|
|
|
|
| |
Last step in refactoring of Skylark builtin functions.
--
MOS_MIGRATED_REVID=91796746
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91603959
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91216722
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91175430
|
|
|
|
|
|
|
| |
SkylarkType.castMap() a little.
--
MOS_MIGRATED_REVID=90988088
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=90981107
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Move castList, castMap, toMap utilities away from SkylarkFunction to SkylarkType
where the cast utility already has been moved.
--
MOS_MIGRATED_REVID=89042835
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88713932
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88224368
|
|
|
|
|
|
|
|
|
|
| |
Classes of the same EvalUtils.getSkylarkType are once again the same for the
type inferencer.
Also, for debugging purposes, only print SkylarkClassObject as struct, not all classes that implement ClassObject yet are considered disjoint by the type engine.
--
MOS_MIGRATED_REVID=87933890
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=87821306
|
|
|
|
|
|
|
|
|
|
|
| |
Fix race condition in SkylarkType.of(), whereby .equals() but not same (==) types were created, by making Simple.of() synchronized.
Also make SkylarkType#includes() more robust by using .equals() instead of == (it's a little bit slower in the case of Simple types once fixed, but also works on complex types that don't hash-cons their values).
Also, distinguish SkylarkList (printed as list) and java.util.List (printed as List) and similarly for tuple vs Tuple, when printing types in debugging messages.
--
MOS_MIGRATED_REVID=87490176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
--
MOE_MIGRATED_REVID=85702957
|