aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax
Commit message (Collapse)AuthorAge
* Cleanup Skylark types some moreGravatar Francois-Rene Rideau2015-09-17
| | | | | | | | | | | 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
* Rollback of commit 4e5037520e3067f9d8784e1c59f9545b96111cd4.Gravatar Lukacs Berki2015-09-17
| | | | | | | | | | | | | | | | | *** 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
* Create an abstraction for user defined data types in Skylark.Gravatar Lukacs Berki2015-09-17
| | | | | | | This will be used to remove Blaze-specific data types, FilesetEntry, Label and GlobList from the .syntax package. -- MOS_MIGRATED_REVID=103281375
* Remove support for the deprecated include() statement.Gravatar Lukacs Berki2015-09-17
| | | | | | | | | 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
* Defer Label parsing from BuildFileAST to PackageFunction so that ↵Gravatar Lukacs Berki2015-09-16
| | | | | | | BuildFileAST doesn't have to know about the existence of Labels. -- MOS_MIGRATED_REVID=103181342
* Remove a few minor lib.syntax -> lib.packages dependencies.Gravatar Lukacs Berki2015-09-16
| | | | | | | We want to move Skylark as down on the dependency graph as possible. The immediate motivation is to move Label to the lib.cmdline package, but this is a good idea nevertheless. -- MOS_MIGRATED_REVID=103178549
* Parse the label syntax "@//a:b" so that eventually we can make that the ↵Gravatar Lukacs Berki2015-09-15
| | | | | | | | | 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
* Hack serialization of Environment$Extension so that it deserializes, ↵Gravatar Janak Ramakrishnan2015-09-15
| | | | | | | although not correctly. Attempts to use it will still most likely fail, but won't crash. -- MOS_MIGRATED_REVID=103029603
* Fix and test SyntaxTreeVisitorGravatar Laurent Le Brun2015-09-15
| | | | | -- MOS_MIGRATED_REVID=103003770
* Fix typos in "Packages" description and MethodLibrary docGravatar Mark Schaller2015-09-14
| | | | | -- MOS_MIGRATED_REVID=102991839
* Prevented catching/wrapping of InterruptedExceptions, especially in ↵Gravatar Florian Weikert2015-09-14
| | | | | | | BaseFunction. -- MOS_MIGRATED_REVID=102988766
* Remove dead code, set private visibilityGravatar Laurent Le Brun2015-09-14
| | | | | -- MOS_MIGRATED_REVID=102986851
* Use the file size from FileValue instead of wastefully stat'ing the file ↵Gravatar Nathan Harmata2015-09-14
| | | | | | | again in order to get the file size in ParserInputSource#create (used multiple times for each BUILD file and Skylark .bzl file). -- MOS_MIGRATED_REVID=102930870
* Allow tuples inside square brackets (for list/dict indexing).Gravatar Laurent Le Brun2015-09-11
| | | | | -- MOS_MIGRATED_REVID=102841541
* Fixed Skylark stack trace:Gravatar Florian Weikert2015-09-11
| | | | | | | | | - 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
* Refactor Skylark Environment-sGravatar Francois-Rene Rideau2015-09-11
| | | | | | | | | | | | | | | | | | | | 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
* Preserve the original location in EvalExceptionWithStackTraceGravatar Laurent Le Brun2015-09-11
| | | | | -- MOS_MIGRATED_REVID=102744198
* LoadStatement: Keep the location of the path argument.Gravatar Laurent Le Brun2015-09-11
| | | | | -- MOS_MIGRATED_REVID=102743954
* Fix bug in the parser when a block was silently skipped.Gravatar Laurent Le Brun2015-09-11
| | | | | | | Some cosmetic changes with EnumSets. -- MOS_MIGRATED_REVID=102742596
* Fix error message when accessing unsupported operator [].Gravatar Laurent Le Brun2015-09-11
| | | | | | | | Old message was e.g. "No matching method found for $index(int) in set" -- MOS_MIGRATED_REVID=102685114
* Save subtasks for Skylark function profiler tasks and then report self time ↵Gravatar Klaas Boesche2015-09-09
| | | | | | | of function calls in HTML output -- MOS_MIGRATED_REVID=102663672
* Skylark macros: The attribute "generator_name" now contains the name of the ↵Gravatar Florian Weikert2015-09-08
| | | | | | | calling rule in the BUILD file. -- MOS_MIGRATED_REVID=102487335
* Rollback of commit 5a94e59f02833f9142bad9203acd72626b089535.Gravatar Janak Ramakrishnan2015-09-08
| | | | | | | | | *** Reason for rollback *** Breaks serialization of SkyValues. -- MOS_MIGRATED_REVID=102457225
* Refactor Skylark Environment-sGravatar Francois-Rene Rideau2015-09-08
| | | | | | | | | | | | | | | | | 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 creates it, so no Environment is left open for modification after being created and exported; exceptions for tests, the shell and initialization contexts. Unify Environment, SkylarkEnvironment and EvaluationContext into Environment. Have a notion of Frame for the bindings + parent + mutability. Replace the updateAndPropagate mechanism by a dynamicFrame. Simplify ValidationEnvironment, that is now always deduced from the Environment. -- MOS_MIGRATED_REVID=102363438
* Skylark: Show list of fields in error message for struct objects.Gravatar Laurent Le Brun2015-09-04
| | | | | -- MOS_MIGRATED_REVID=102341687
* Keep function parameters in the AST.Gravatar Laurent Le Brun2015-09-04
| | | | | -- MOS_MIGRATED_REVID=102330569
* Implement a Python 2 compatible isalpha function for Skylark strings.Gravatar Googler2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102263878
* Remove unused ParserInputSource method and other minor cleanupsGravatar Michajlo Matijkiw2015-09-03
| | | | | | | | | | | | Trying to curb usage of the create method taking a String for efficiency reasons. Noticed this method was unused + a few places where we could easily use chars instead of string. Not a major improvement but removes some temptation. RELNOTES: -- MOS_MIGRATED_REVID=102258319
* Fix a bug in SyntaxTreeVisitor to handle return statements.Gravatar Laurent Le Brun2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102237430
* Show a column with the location of a skylark function in HTML profiling ↵Gravatar Googler2015-09-02
| | | | | | | statistics. -- MOS_MIGRATED_REVID=102143715
* When a Skylark macro creates a native rule, it also sets the following rule ↵Gravatar Florian Weikert2015-09-02
| | | | | | | attributes: generator_{function, name, location} -- MOS_MIGRATED_REVID=102139196
* Update comments about function callsGravatar Francois-Rene Rideau2015-09-02
| | | | | -- MOS_MIGRATED_REVID=102083489
* Change URLs to bazelbuildGravatar Kristina Chodorow2015-09-01
| | | | | -- MOS_MIGRATED_REVID=102022958
* Move global objects to RuntimeGravatar Francois-Rene Rideau2015-08-31
| | | | | | | | Move away global constants and global namespaces out of Environment and into a new file Runtime. -- MOS_MIGRATED_REVID=101940218
* Fixes to Skylark function callGravatar Francois-Rene Rideau2015-08-31
| | | | | | | | Allow a call to a struct's field when it's a function. Check whether a java method exists before issuing KwArg error. -- MOS_MIGRATED_REVID=101937143
* Roll back "When a Skylark macro creates a native rule, it also..."Gravatar Michajlo Matijkiw2015-08-31
| | | | | -- MOS_MIGRATED_REVID=101798931
* Move PackageIdentifier to cmdlineGravatar Kristina Chodorow2015-08-31
| | | | | | | | This is necessary to have TargetResolver depend on it without making it depend on the packages target. First step of #389. -- MOS_MIGRATED_REVID=101790345
* When a Skylark macro creates a native rule, it also sets the following rule ↵Gravatar Florian Weikert2015-08-28
| | | | | | | attributes: generator_{function, name, location} -- MOS_MIGRATED_REVID=101774632
* Add profiling for Skylark lexer, parser, user- and built-in functions.Gravatar Googler2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101769963
* Improve documentation and error messages for sets.Gravatar Laurent Le Brun2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101765937
* Stop removing onlyLoadingPhase bindingsGravatar Francois-Rene Rideau2015-08-28
| | | | | | | | They are now disabled based on a dynamic flag instead. It's all too easy to bypass removal with duplication, anyway, as in my_native_glob = native.glob -- MOS_MIGRATED_REVID=101714237
* Improve debugging of EvalExceptionGravatar Francois-Rene Rideau2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101679755
* Make load() work in remote repositories too.Gravatar Lukacs Berki2015-08-27
| | | | | | | | | Previously, load() always looked up .bzl files in the main repository. Ideally, it would just take a label and then it would work by default, but for the time being, this quick fix will do. I had to put in an evil hack to make load() statements work in the prelude, because we currently have no way to distinguish load() statements from the prelude and from the BUILD file. Again, a proper label-based load() would solve this. -- MOS_MIGRATED_REVID=101677502
* EvalExceptionWithStackTrace does no longer remove non-EvalException ↵Gravatar Florian Weikert2015-08-27
| | | | | | | exceptions from its cause. -- MOS_MIGRATED_REVID=101673097
* Ensures that EvalExceptionWithStackTrace does not have an empty exception ↵Gravatar Florian Weikert2015-08-27
| | | | | | | message. -- MOS_MIGRATED_REVID=101659996
* Add a isLoadingPhase flag to EnvironmentGravatar Francois-Rene Rideau2015-08-27
| | | | | | | | | Have loadingPhase-only methods check that flag. It's no use removing the initial bindings to these methods when they may have been copied anyway. -- MOS_MIGRATED_REVID=101624770
* Create ValidationEnvironment from EnvironmentGravatar Francois-Rene Rideau2015-08-27
| | | | | | | | Allow ValidationEnvironment to be created from initial Environment so that there is no need to manually keep two different sets of constructors in synch. -- MOS_MIGRATED_REVID=101588695
* Use a concurrent LoadingCache for SkylarkType.Simple as opposed to having to ↵Gravatar Nathan Harmata2015-08-27
| | | | | | | hold a global lock in order to get a skylark type. -- MOS_MIGRATED_REVID=101585120
* Add string.capitalize()Gravatar Laurent Le Brun2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101575207
* Skylark stack traces are now displayed in Python format.Gravatar Florian Weikert2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101572295