aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages
Commit message (Collapse)AuthorAge
* Add --incompatible_disallow_legacy_javainfo flag.Gravatar tomlu2018-05-02
| | | | | | | | When set to true, old-style JavaInfo provider construction methods become an error. RELNOTES[INC]: Add --incompatible_disallow_legacy_javainfo flag. PiperOrigin-RevId: 195104452
* Add CommonAliasRule.Gravatar dbabkin2018-05-02
| | | | | | | We need to have base class with logic related to alias rule. Based on this class other rule classes should be created, to avoid total code duplication. RELNOTES:none PiperOrigin-RevId: 195066568
* Migrate struct and Provider to the skylark build apiGravatar cparsons2018-05-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 195013604
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194985259
* Move BazelLibrary from syntax/ to packages/Gravatar brandjon2018-05-01
| | | | | | | | | This helps the Skylark interpreter to not depend on Bazel concepts, though it adds a temporary dependency of Skylint on packages/. The fix for that will be to create a Build API interface for BazelLibrary (e.g., "BazelLibraryAPI"). Refactored some GlobalFrame construction logic to be more uniform. Instead of constructing a whole Environment just to get a frame, we build the frame directly, using ImmutableMap.Builder to accumulate bindings. This convention may further change once we convert MethodLibrary and the like to @SkylarkGlobalLibrary, but for now it's more readable. RELNOTES: None PiperOrigin-RevId: 194960824
* Use a new pattern for builtin Provider objects with @SkylarkCallable.Gravatar cparsons2018-05-01
| | | | | | | | This deprecates the old NativeProvider pattern. The new pattern is demonstrated using AppleStaticLibraryInfo. RELNOTES: None. PiperOrigin-RevId: 194956883
* Migrate annotations of SkylarkAttr to an interface class.Gravatar cparsons2018-04-30
| | | | | | | This isolates the API from the implementation. RELNOTES: None. PiperOrigin-RevId: 194850527
* Ensure that all aspects which (even very indirectly) callGravatar jcater2018-04-27
| | | | | | | CppHelper.getToolchainFromPlatformConstraints declare that they require a cc toolchain. PiperOrigin-RevId: 194580065
* Normalize parameter name commentsGravatar cushon2018-04-27
| | | | PiperOrigin-RevId: 194512971
* Replace ConfigurationTransition with PatchTransition in a few places.Gravatar mstaib2018-04-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 194459347
* RuleTransitionFactory returns NoTransition instead of null.Gravatar mstaib2018-04-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 194433721
* Prevent Skylark actions from setting arbitrary execution infoGravatar ulfjack2018-04-25
| | | | PiperOrigin-RevId: 194236287
* Pass environment to Skylark provider constructors.Gravatar tomlu2018-04-24
| | | | | | | This is needed for constructors that want to be able to use SkylarkSemantics. RELNOTES: None PiperOrigin-RevId: 194180124
* Handle InterruptedException thrown from @SkylarkCallable methods appropriately.Gravatar cparsons2018-04-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 193370435
* Introduce `--incompatible_disallow_filetype` to remove the `FileType` function.Gravatar laurentlb2018-04-13
| | | | | | | | RELNOTES: `FileType` is deprecated and will be removed soon. Try the `--incompatible_disallow_filetype` flag to ensure your code is forward-compatible. PiperOrigin-RevId: 192758063
* Remove flag `incompatible_disallow_toplevel_if_statement`.Gravatar laurentlb2018-04-12
| | | | | | RELNOTES: Removed flag `--incompatible_disallow_toplevel_if_statement`. PiperOrigin-RevId: 192621765
* Introduce `--incompatible_disallow_slash_operator` to disable `/` operator.Gravatar laurentlb2018-04-11
| | | | | | | | RELNOTES: The `/` operator is deprecated in favor of `//` (floor integer division). Try the `--incompatible_disallow_slash_operator` flag to ensure your code is forward-compatible. PiperOrigin-RevId: 192430310
* Migrate Info's skylark methods to @SkylarkCallableGravatar cparsons2018-04-10
| | | | | RELNOTES: None PiperOrigin-RevId: 192337555
* Remove support for the --incompatible_disallow_three_arg_vardef command line ↵Gravatar lberki2018-04-10
| | | | | | | | | option. It was used for a migration, which is now done. RELNOTES: None. PiperOrigin-RevId: 192246659
* Delete dead codeGravatar carmi2018-04-06
| | | | | RELNOTES: None PiperOrigin-RevId: 191916828
* Split Args#add into three methods.Gravatar tomlu2018-04-05
| | | | | | | | | | | Args#add(value, *, arg, format) Args#add_all(value, *, arg, map_each, format_each, before_each, omit_if_empty, uniquify) Args#add_joined(value, *, arg, join_with, map_each, format_each, format_joined, omit_if_empty, uniquify) The old Args#add remains backwards compatible, but we add a flag to disable this compatibility mode. RELNOTES: None PiperOrigin-RevId: 191804482
* Disallow empty environment groups.Gravatar gregce2018-04-04
| | | | PiperOrigin-RevId: 191651271
* Migrate SkylarkNativeModule methods to use @SkylarkCallable instead of ↵Gravatar cparsons2018-04-04
| | | | | | | | | @SkylarkSignature Most notably, this involves introduction of a new function abstraction, BuiltinMethod, which can wrap a {objc, SkylarkCallable} pair into a BaseFunction for later calling. (This is required due to the current layer of indirection on the end "native" module) RELNOTES: None. PiperOrigin-RevId: 191642467
* Replaces JavaSerializableCodec with DynamicCodec as the defaultGravatar shahan2018-04-04
| | | | | | | | | * Skylark serialization was previously dropping location in error, which this fixes. * Deletes a lot of codecs with fidelity issues (DynamicCodec has full fidelity). * Deletes EnumRuntimeCodec which can now be replaced with the superior EnumCodec. * This should eventually allow us to delete Serializable from all Blaze. The remaining blocker is NoSuchPackageExceptionCodec. PiperOrigin-RevId: 191603929
* Tag SkylarkImpilicitOutputsFunctionWithCallback with @AutoCodec.Gravatar mjhalupka2018-04-03
| | | | PiperOrigin-RevId: 191488180
* Remove some unnecessary params.Gravatar nharmata2018-04-02
| | | | | RELNOTES: None PiperOrigin-RevId: 191354727
* Add codec for ImmutableMultimap.Gravatar cpeyser2018-04-02
| | | | PiperOrigin-RevId: 191323243
* Enforce @SkylarkCallable must have a non-empty doc string or explicitly be ↵Gravatar cparsons2018-03-30
| | | | | | | documented=false. RELNOTES: None. PiperOrigin-RevId: 191112140
* Make RuleClass serializable and remove Environment from it, since it was ↵Gravatar janakr2018-03-30
| | | | | | | | only being used for the transitive hash code and transitive label of its globals, which can be passed in explicitly. Assert along the way that the transitive label of its globals is always non-null. That is currently the case, although there seems to be no hard invariant of the system that it is true. Might as well tighten it now. PiperOrigin-RevId: 191103310
* Remove category checking from incompatible changes.Gravatar ccalvarin2018-03-30
| | | | | | | String categories are deprecated, replace this special-cased value with a specific OptionMetadata tag, TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES. RELNOTES: None. PiperOrigin-RevId: 191069412
* New incompatible flag to disable PACKAGE_NAME and REPOSITORY_NAME.Gravatar laurentlb2018-03-27
| | | | | | | | | RELNOTES[INC]: Variables PACKAGE_NAME and REPOSITORY_NAME are deprecated in favor of functions `package_name()` and `repository_name()`. https://docs.bazel.build/versions/master/skylark/lib/native.html#package_name PiperOrigin-RevId: 190657188
* Add AspectCodec. Can't be @AutoCodec because we don't want to serialize the ↵Gravatar janakr2018-03-26
| | | | | | full content of native aspects. PiperOrigin-RevId: 190489694
* As promised in an earlier commit, remove subinclude machinery from ↵Gravatar nharmata2018-03-26
| | | | | | | | | PackageFactory, Package, PackageFunction, and also all things that make use of Package#getSubincludeLabels. This code is completely dead, and has been for a while. RELNOTES: None PiperOrigin-RevId: 190486792
* Make a bunch more stuff serializable, especially anonymous classes and ↵Gravatar janakr2018-03-26
| | | | | | lambdas. Give a bit more information in JavaSerializableCodec when serialization fails on an anonymous class or lambda. PiperOrigin-RevId: 190472245
* @AutoCodec some more classes needed for large Java builds.Gravatar janakr2018-03-25
| | | | PiperOrigin-RevId: 190392567
* @AutoCodec SkylarkComputedDefaultTemplate and dependencies.Gravatar janakr2018-03-23
| | | | PiperOrigin-RevId: 190284631
* Remove a unused parameter in PackageFactory#evaluateBuildFile().Gravatar lberki2018-03-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 190207183
* Victory lap: Remove all code that used to support the three-argument form of ↵Gravatar lberki2018-03-23
| | | | | | | vardef(). RELNOTES: None. PiperOrigin-RevId: 190196933
* Remove RuleClass.Builder#depsCfg().Gravatar lberki2018-03-23
| | | | | | | The only user of it was Android resource trimming, which just got deleted. RELNOTES: None. PiperOrigin-RevId: 190193627
* Use an immutable Attribute factory in objects that are persisted to ↵Gravatar janakr2018-03-22
| | | | | | Skyframe, rather than the potentially mutable builder, and @AutoCodec SkylarkAttr.Descriptor. PiperOrigin-RevId: 190118565
* Remove the --incompatible_disallow_uncalled_set_constructor flagGravatar vladmos2018-03-22
| | | | | | | | RELNOTES[INC]: The --incompatible_disallow_uncalled_set_constructor flag is no longer available, the `set` constructor` is completely removed from Skylark. Use `depset` instead. PiperOrigin-RevId: 190053331
* Remove the flag --incompatible_show_all_print_messagesGravatar vladmos2018-03-22
| | | | | | | | RELNOTES[INC]: The flag --incompatible_show_all_print_messages is removed. Messages generated by `print` statements from any package will be displayed as DEBUG messages. PiperOrigin-RevId: 190043451
* Store RuleClassType in RuleClass. Shouldn't use much more memory, and allows ↵Gravatar janakr2018-03-21
| | | | | | serialization to preserve the type when reconstituting the RuleClass. PiperOrigin-RevId: 190015323
* Precompute Attribute#hashCode to remove gc churn from the Object[] ↵Gravatar nharmata2018-03-21
| | | | | | | | | allocation done by Attribute#hashCode. Attribute#hashCode is called a lot by the visitation done by e.g. Rule#getTransition. RELNOTES: None PiperOrigin-RevId: 189947421
* Remove no-op flag 'incompatible_load_argument_is_label'.Gravatar laurentlb2018-03-21
| | | | | | | No relnotes, because deletion was already announced. RELNOTES: None. PiperOrigin-RevId: 189934041
* Add ability to shallow-freeze individual objectsGravatar brandjon2018-03-20
| | | | | | | | | Clarify that the IMMUTABLE Mutability should only be used for deeply immutable things, not tuples. Created a new SHALLOW_IMMUTABLE Mutability for them. Note that the new shallow-freezing functionality marks things as deeply IMMUTABLE without traversing its contents. I.e., it lies, and it is up to the caller to ensure this doesn't cause problems. RELNOTES: NONE PiperOrigin-RevId: 189767422
* Add more documentation for rule.outputsGravatar brandjon2018-03-20
| | | | | | | | | We want to simplify/remove this API, but let's document it in the meantime. Also fix harmless bug that annoyed me. It used rawTemplate instead of formatStr when there are no placeholders. This would theoretically fail to properly escape % symbols, except that the code path luckily short-circuits later on if there are no placeholders. RELNOTES: PiperOrigin-RevId: 189760809
* Make "legacy globber" threads daemon.Gravatar carmi2018-03-19
| | | | | | | This allows an executable that uses PackageFactory (e.g., through PackageLoader) to exit immediately once it's done without waiting for these threads to finish. RELNOTES: None PiperOrigin-RevId: 189634305
* Remove unnecessary @VisibleForTestingGravatar michajlo2018-03-15
| | | | | | I imagine it was used at some point, can't find any usages now. PiperOrigin-RevId: 189226615
* Allow BazelPackageLoader to load external repositories.Gravatar carmi2018-03-13
| | | | | | | | | Also, disallow BazelPackageLoader from fetching missing external repos. Integration tests for BazelPackageLoader wrt external repos will be left for a follow-up CL. RELNOTES: None. PiperOrigin-RevId: 188967694