aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/SkylarkModules.java
Commit message (Collapse)AuthorAge
* Remove isSkylark and eval from Environment.Gravatar Laurent Le Brun2016-11-29
| | | | | -- MOS_MIGRATED_REVID=140371603
* Move Bazel-specific functions in a separate file.Gravatar Laurent Le Brun2016-11-21
| | | | | | | | "type", "set" and "select" should not be part of the standalone Skylark library. -- MOS_MIGRATED_REVID=139578095
* Cleanup, remove differences between Build and Skylark environments.Gravatar Laurent Le Brun2016-10-14
| | | | | | | | | | | | | The only visible difference for users is that a few more functions are available in BUILD files. That's fine, this difference was not even documented. RELNOTES: A few functions are added to BUILD files for consistency (hash, dir, hasattr, getattr) with .bzl files, although they are not very useful. -- MOS_MIGRATED_REVID=136151633
* Enable injection of Skylark modules through the RuleClassProviderGravatar Damien Martin-Guillerez2016-02-15
| | | | | | | | | | | This enable BlazeModule to specify extraneous Skylark modules. This will be used by Skylark remote repositories to add them from the BazelRepositoryModule. Issue #893, step 2 of the roadmap of http://goo.gl/OZV3o0 -- MOS_MIGRATED_REVID=114677157
* Delete unused SkylarkModules.getNewEnvironment()Gravatar Damien Martin-Guillerez2016-02-15
| | | | | | | This method is never used. Found while working on #893. -- MOS_MIGRATED_REVID=114672682
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | 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
* 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
* 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
* 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
* 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
* Move MethodLibrary from packages to syntaxGravatar Francois-Rene Rideau2015-07-30
| | | | | -- MOS_MIGRATED_REVID=99396919
* Use BuiltinFunction for all builtinsGravatar Francois-Rene Rideau2015-04-22
| | | | | | | | Replace the uses of AbstractFunction, MixedModeFunction, SkylarkFunction and SimpleSkylarkFunction by BuiltinFunction. -- MOS_MIGRATED_REVID=91763158
* Migrate SkylarkBuiltin annotations to SkylarkSignature instead.Gravatar Francois-Rene Rideau2015-04-21
| | | | | -- MOS_MIGRATED_REVID=91603959
* More skylark function cleanupsGravatar Francois-Rene Rideau2015-04-17
| | | | | -- MOS_MIGRATED_REVID=91407816
* Simplify ValidationEnvironment.Gravatar Laurent Le Brun2015-04-16
| | | | | | | We need only a set of symbols, types are not used anymore. -- MOS_MIGRATED_REVID=91299566
* More ValidationEnvironment cleanup, remove SkylarkType.GLOBAL.Gravatar Laurent Le Brun2015-04-15
| | | | | | | We don't need to store object methods, just global values. -- MOS_MIGRATED_REVID=91094780
* Allow evaluation from StringGravatar Francois-Rene Rideau2015-04-13
| | | | | | | | | | | | | | | | | | | 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
* Skylark: the native module is refactored and documented.Gravatar Googler2015-03-24
| | | | | | | | - SkylarkNativeModule is added to handle to native module. - Glob function is migrated to be a SkylarkFunction. Note that other functions in the native module are more difficult to migrate since they are not static. -- MOS_MIGRATED_REVID=89292579
* Misc Skylark cleanups and small featuresGravatar Francois-Rene Rideau2015-03-10
| | | | | -- MOS_MIGRATED_REVID=88224368
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957