| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke tests, I mistakenly assumed it was flakiness.
*** Original change description ***
Remove support for the deprecated include() statement.
This is part of the crusade to eliminate as every dependency in Skylark on the rest of the code so that it can be moved deeper in the dependency graph.
RELNOTES: The include() statement in BUILD files is not supported anymore.
--
MOS_MIGRATED_REVID=103284257
|
|
|
|
|
|
|
|
|
| |
This is part of the crusade to eliminate as every dependency in Skylark on the rest of the code so that it can be moved deeper in the dependency graph.
RELNOTES: The include() statement in BUILD files is not supported anymore.
--
MOS_MIGRATED_REVID=103279943
|
|
|
|
|
|
|
|
|
| |
syntax that means "refer to the main repository".
There isn't an overarching plan for what we are going to do with the cmdline package, which seems to be separated from the .syntax one in all sorts of awkward ways.
--
MOS_MIGRATED_REVID=103088960
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102986851
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102841541
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102743954
|
|
|
|
|
|
|
| |
Some cosmetic changes with EnumSets.
--
MOS_MIGRATED_REVID=102742596
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102330569
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102237430
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101769963
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101363350
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=100268427
|
|
|
|
|
|
|
| |
E.g. load("/foo/bla", my_rule = "old_name") will introduce the symbol "my_rule" as an alias for "old_name".
--
MOS_MIGRATED_REVID=98933635
|
|
|
|
|
|
|
| |
methods.
--
MOS_MIGRATED_REVID=98922811
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=97951248
|
|
|
|
|
|
|
|
|
|
|
| |
This involved quite a few changes, mainly changing a bunch of places where we refer to packages by a PathFragment to PackageIdentifier.
The only wart is the code in PathPackageLocator: ideally, it would just call into PackageLookupFunction. Unfortunately, it is (through globbing and Parser.include) called from within a Skyframe function, and we don't want to have two eval() calls going on at the same time, so we cannot use that.
There is a potential correctness issue there: PathPackageLocator now assumes where external repositories are put and assumes that they are there when it gets control, but my understanding is that the associated RepositoryValue is always evaluated before, so it works out okay.
--
MOS_MIGRATED_REVID=97751539
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=97648982
|
|
|
|
|
|
|
|
|
|
|
| |
This involved quite a few changes, mainly changing a bunch of places where we refer to packages by a PathFragment to PackageIdentifier.
The only wart is the code in PathPackageLocator: ideally, it would just call into PackageLookupFunction. Unfortunately, it is (through globbing and Parser.include) called from within a Skyframe function, and we don't want to have two eval() calls going on at the same time, so we cannot use that.
There is a potential correctness issue there: PathPackageLocator now assumes where external repositories are put and assumes that they are there when it gets control, but my understanding is that the associated RepositoryValue is always evaluated before, so it works out okay.
--
MOS_MIGRATED_REVID=97647787
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=97224936
|
|
|
|
|
|
|
| |
Location was not set.
--
MOS_MIGRATED_REVID=96096088
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=96095253
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=95833265
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classes.
This makes the code cleaner because a lot of places never read the file and thus never needed a Path in the first place. I got to this change in a bit convoluted way:
- I wanted the default tools in Android rules to point to //external:
- I wanted to make sure that that doesn't cause an error is no Android rules are built, thus I had to add some binding for them in the default WORKSPACE file
- I wanted the Android rules not to depend on Bazel core with an eye towards eventually moving them to a separate jar / Skylark code
- The default WORKSPACE file is currently composed from files extracted by the Bazel launcher which would make the Android rules depend on a very core mechanism
- I couldn't simply pass in jdk.WORKSPACE as a String because Location, ParserInputSource and a bunch of other things needed a Path, which a simple string doesn't have.
Thus, this change.
--
MOS_MIGRATED_REVID=95828839
|
|
|
|
|
|
|
|
| |
Fixes #233.
https://github.com/google/bazel/issues/233
--
MOS_MIGRATED_REVID=95632067
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=94649435
|
|
|
|
|
|
|
|
|
| |
Rationale: it makes BUILD files less declarative and makes harder to do
automated changes on BUILD files. It is however still allowed in .bzl
files.
--
MOS_MIGRATED_REVID=94577442
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=93881507
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=93515487
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=93129861
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91714318
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91192716
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Lift the Evaluation code from the test files AbstractParserTestCase and
AbstractEvaluationTestCase into new files EvaluationContext.
Remove this code's dependency on FsApparatus (and thus to InMemoryFS),
by making the Lexer accept null as filename.
Also remove dependency on EventCollectionApparatus;
parameterized by an EventHandler.
Have the SkylarkSignatureProcessor use this Evaluation for defaultValue-s.
While refactoring evaluation, have SkylarkShell use it,
which fixes its ValidationEnvironment issues.
TODO: refactor the tests to use this new infrastructure.
--
MOS_MIGRATED_REVID=90824736
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=90157406
|
|
|
|
|
|
|
|
| |
Reduce the number of error message after a parse error.
Recover only when we have confidence we are in good state.
--
MOS_MIGRATED_REVID=90147322
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=89307831
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=89296523
|
|
|
|
|
|
|
| |
Also, use LValue in ForStatement.
--
MOS_MIGRATED_REVID=89122760
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python, tuples normally don't need parens, e.g.
a, b = c, d
for i, j in e: pass
However, they are sometimes required to avoid ambiguity:
fct((x, y))
[(1, 2), (3, 4)]
This distinction is handled with parseExpression vs parseNonTupleExpression.
--
MOS_MIGRATED_REVID=89118478
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* New hierarchy BaseFunction > UserModeFunction, BuiltinFunction.
The old hierarchy still exists for now, to be deleted after migration:
Function > AbstractFunction > MixedModeFunction >
(UserModeFunction, SkylarkFunction > SimpleSkylarkFunction)
(UserModeFunction is already migrated, and
BaseFunction implements Function, for now.)
* Function supports *args and **kwargs when calling functions, and
mandatory named-only parameters in the style of Python 3.
Notable difference with Python: *args binds the variable to a tuple,
because a Skylark list would have to be monomorphic.
* A better, simpler, safer FFI using reflection with BuiltinFunction.
Handles typechecking, passes parameters in a more Java style.
(Not used for now, will be used later.)
* A new annotation @SkylarkSignature, intended to replace @SkylarkBuiltin,
supports the full function call protocol, including default arguments.
* Support for annotating function Factory-s rather than functions.
--
MOS_MIGRATED_REVID=88958581
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88857682
|
|
|
|
|
|
|
|
|
| |
e.g. def foo(x, y): print(x); print(y)
Bug found when adding the pass statement.
--
MOS_MIGRATED_REVID=88852710
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88830705
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88813915
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88727892
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=88726457
|
|
|
|
|
|
|
| |
Also add tests.
--
MOS_MIGRATED_REVID=88474801
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=87535290
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=87519507
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first meaty cl in a series to refactor the Skylark function call protocol.
1- We introduce a first-class notion of FunctionSignature, that supports positional and named-only arguments, mandatory and optional, default values, type-checking, *stararg and **kwarg;
2- To keep things clean, we distinguish two different kinds of Argument's: Argument.Passed that appears in function calls, and Parameter, that appears in function definitions.
3- We refactor the Parser so it uses this infrastructure, and make minimal changes to MixedModeFunction so that it works with it (but don't actually implement *starparam and **kwparam yet).
4- As we modify FuncallExpression, we ensure that the args and kwargs arguments it passes to the underlying function are immutable, as a prerequisite to upcoming implementation of *starparam and **kwparam as being provided directly from a skylark list or dict.
Further changes under review will take advantage of this FunctionSignature to redo all our function call protocol, to be used uniformly for both UserDefinedFunction's and builtin function. The result will be a simpler inheritance model, with better type-checking, builtin functions that are both simpler and better documented, and many redundant competing functionality-limited codepaths being merged and replaced by something better.
NB: The changes to MixedModeFunction, SkylarkFunction and MethodLibrary are temporary hacks to be done away with in an upcoming CL. The rest is the actual changes.
--
MOS_MIGRATED_REVID=86704072
|
|
|
|
|
|
|
|
| |
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
|