aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages
Commit message (Collapse)AuthorAge
* Add context argument to ObjectCodec.{serialize,deserialize}Gravatar michajlo2018-02-11
| | | | | | | | | | Context implementations are currently empty, just doing the plumbing in this change. Once this is in we can start passing along the ObjectCodecRegistry, which will allow runtime codec resolution for classes not known at compile time. We'll also inevitably add some memoization helpers, allowing us to optimize the serialization process further. PiperOrigin-RevId: 185305674
* Replace path implementation.Gravatar tomlu2018-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Path and PathFragment have been replaced with String-based implementations. They are pretty similar, but each method is dissimilar enough that I did not feel sharing code was appropriate. A summary of changes: PATH ==== * Subsumes LocalPath (deleted, its tests repurposed) * Use a simple string to back Path * Path instances are no longer interned; Reference equality will no longer work * Always normalized (same as before) * Some operations will now be slower, like instance compares (which were previously just a reference check) * Multiple identical paths will now consume more memory since they are not interned PATH FRAGMENT ============= * Use a simple string to back PathFragment * No more segment arrays with interned strings * Always normalized * Remove isNormalized * Replace some isNormalizied uses with containsUpLevelReferences() to check if path fragments try to escape their scope * To check if user input is normalized, supply static methods on PathFragment to validate the string before constructing a PathFragment * Because PathFragments are always normalized, we have to replace checks for literal "." from PathFragment#getPathString to PathFragment#getSafePathString. The latter returns "." for the empty string. * The previous implementation supported efficient segment semantics (segment count, iterating over segments). This is now expensive since we do longer have a segment array. ARTIFACT ======== * Remove Path instance. It is instead dynamically constructed on request. This is necessary to avoid this CL becoming a memory regression. RELNOTES: None PiperOrigin-RevId: 185062932
* Move BazelRuleClassProvider.J2OBJC_RULES to its own class.Gravatar lpino2018-02-08
| | | | PiperOrigin-RevId: 184983111
* Non-test AspectClass codecs.Gravatar shahan2018-02-07
| | | | PiperOrigin-RevId: 184862552
* Expose structField callable methods of skylark objects to dir() and str() callsGravatar cparsons2018-02-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 184498836
* Stop allowing generic LateBoundDefault value types. Such types are always ↵Gravatar janakr2018-02-02
| | | | | | | | either a Label or a List<Label>. We can easily enforce this through static type checking, so do it. This will help with LateBoundDefault serialization, since we don't have to serialize an arbitrary object. PiperOrigin-RevId: 184347100
* Start process of tagging AspectKey. Still a lot of subclasses of AspectClass ↵Gravatar janakr2018-02-02
| | | | | | | | to do. Also change AspectDescriptor #isEmpty() semantics because they seemed like a bug to me. PiperOrigin-RevId: 184319840
* Fix string_list_dict values to be skylark lists in all casesGravatar cparsons2018-01-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 184016150
* Rename Transition to ConfigurationTransition.Gravatar gregce2018-01-30
| | | | PiperOrigin-RevId: 183859414
* Some simplifications for package serialization.Gravatar cpeyser2018-01-30
| | | | PiperOrigin-RevId: 183842057
* Refine return type of STRUCT factory methodsGravatar brandjon2018-01-23
| | | | | RELNOTES: None PiperOrigin-RevId: 182937363
* Add codec for TestFilter, and clean up some things: use ↵Gravatar janakr2018-01-22
| | | | | | java.util.function.Predicate and move some code that was only called by TestFilter inside it. PiperOrigin-RevId: 182884550
* Add registration of execution platformsGravatar John Cater2018-01-22
| | | | | | | Part of #4442. Change-Id: I6debbf7cfdf560d2113e736176702c2cd889c0d2 PiperOrigin-RevId: 182763864
* Fix usages of PathFragment segments that will become inefficient.Gravatar tomlu2018-01-19
| | | | | | | An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient. RELNOTES: None PiperOrigin-RevId: 182553098
* Add a way for BaseCodecs to register association with subtypesGravatar brandjon2018-01-18
| | | | | | Also add accessor to SkylarkInfo for the custom error message, and expose its concrete implementation classes for the benefit of reflection. PiperOrigin-RevId: 182443146
* Remove ConfigurationTransitionProxy.NONE and ↵Gravatar gregce2018-01-18
| | | | | | | | BaseRuleClasses.DYNAMIC_TRANSITION_MAP. This leaves DATA as the last remaining legacy transition. PiperOrigin-RevId: 182422552
* Include the list of 'excludes' glob patterns in the error message used when ↵Gravatar nharmata2018-01-18
| | | | | | | an IOException is encountered from a Globber. The io error may have been encountered during evaluation of one of the 'excludes' patterns. RELNOTES: None PiperOrigin-RevId: 182390180
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Fix blaze crashes with running under JDK9.Gravatar tomlu2018-01-17
| | | | | RELNOTES: None PiperOrigin-RevId: 182223038
* Encapsulate SkylarkInfo layouts in a classGravatar brandjon2018-01-12
| | | | | | | | | This avoids invalid layouts (non-sequential map values), and provides better separation between a layout's representation as a map and its view as a list. Also removed a factory method that's unnecessary, now that the plan is not to closely tie SkylarkInfo to SkylarkProvider. RELNOTES: None PiperOrigin-RevId: 181807071
* PiperOrigin-RevId: 181797878Gravatar Googler2018-01-12
|
* Honor repository when checking for conflictsGravatar Klaus Aehlig2018-01-12
| | | | | | | | | | When checking for conflicts between an input and an output file of a rule, honor the repository the label belongs to. It is a perfectly valid use case to create one file from an equally named (including path) in a different repository. Change-Id: I3aaa99eaa0c473ec31c5cc77beacf657c41ef56d PiperOrigin-RevId: 181761940
* Move custom err msg functionality from Info to SkylarkInfoGravatar brandjon2018-01-11
| | | | | | | Info objects no longer store a string pointer for their error message format, which is almost always the same as the one specified by their provider type. Only map-based SkylarkInfo used this (for fancy built-in structs like ctx.attr), so the field is pushed down to there. RELNOTES: None PiperOrigin-RevId: 181654641
* Adds a CODECs for Package and PackageValue.Gravatar shahan2018-01-11
| | | | PiperOrigin-RevId: 181624201
* Refactor SkylarkInfo constructorsGravatar brandjon2018-01-11
| | | | | | | | | - Info now has one protected constructor. (Would've preferred the builder pattern, but inheritance makes it much more verbose.) - Direct SkylarkInfo subclass access is replaced by factory methods and an isCompact() accessor. - Added/simplified tests RELNOTES: None PiperOrigin-RevId: 181616757
* Info-related cleanupsGravatar brandjon2018-01-10
| | | | | | | | | - Reorder Info methods for consistency with ClassObject - "StructConstructor" -> "StructProvider" - Added javadoc RELNOTES: None PiperOrigin-RevId: 181469643
* Remove obsolete ConfigurationTransition.SPLIT.Gravatar gregce2017-12-28
| | | | PiperOrigin-RevId: 180291093
* Replace Attribute.ConfigurationTransition with ↵Gravatar gregce2017-12-28
| | | | | | | | | | | | | | | | config.transitions.ConfigurationTransitionProxy. The "proxy" part is to dissuade people from writing: void myfunc(ConfigurationTransition transition) signatures casually. Maybe that's actually a better name than "Transition". But I'd rather rename Transition to ConfigurationTransition in its own change if we want to do that. PiperOrigin-RevId: 180285321
* Rename some ClassObject/Provider-related methodsGravatar brandjon2017-12-28
| | | | | | | The terminology "field" is preferred over "key" for the components of a struct or struct-like object. RELNOTES: None PiperOrigin-RevId: 180269374
* Refactor Info classGravatar brandjon2017-12-27
| | | | | | | This simplifies the location field (now non-nullable), removes a couple redundant loc args, and clarifies the type's description and some javadoc. RELNOTES: None PiperOrigin-RevId: 180210943
* Replace Attribute.SplitTransition with config.transitions.SplitTransition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179948322
* Replace Attribute.Transition with config.transitions.Transition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179936355
* Remove some code leftover from back when BUILD file preprocessing was a ↵Gravatar nharmata2017-12-22
| | | | | | | thing. Also remove some TODOs that were leftover from before we added the caches used after a PackageFunction restart. RELNOTES: None PiperOrigin-RevId: 179926806
* Redo FileType to reduce generated garbage.Gravatar tomlu2017-12-22
| | | | | | | | | | | | | * Change FileType to no longer assume it operates on just the base name (it can now be given a full path). * Move the responsibility to specific classes (Artifact, Path, PathFragment) to decide how they want to offer up a string that includes the file name. * Flip the order in which users are expected to check Artifact type, from FileType#matches(Artifact) to Artifact#isFileType(FileType). This looks natural and should encourage developers to use efficient file type checking methods. * Change CppCompileAction to use the new API. RELNOTES: None PiperOrigin-RevId: 179903239
* Remove testing flag --internal_do_not_export_builtinsGravatar brandjon2017-12-21
| | | | | | | Also add a @VisibleForTesting accessor to SkyframeExecutor. RELNOTES: None PiperOrigin-RevId: 179875655
* Remove ConfigurationTransition.HOST.Gravatar gregce2017-12-21
| | | | | | Use HostTransition.INSTANCE instead. PiperOrigin-RevId: 179851769
* Refactor SkylarkProvider constructors and add testsGravatar brandjon2017-12-21
| | | | | | | A new constructor is exposed for building an already-exported SkylarkProvider. The existing constructor no longer takes a name argument (since it was almost entirely ignored). The contract around the name arg for BaseFunction has been refined: it is null if the subclass provides its own naming mechanism. RELNOTES: None PiperOrigin-RevId: 179804491
* Enable syscall cache and eager sub-directory globbing in AbstractPackageLoader.Gravatar carmi2017-12-20
| | | | | RELNOTES: None PiperOrigin-RevId: 179757650
* Remove ConfigurationTransition.HOST references from lib.packages.Gravatar gregce2017-12-20
| | | | | | | | | | | | | | | | | | | | This removes the main barrier to making host transitions routine patch transitions. Today you signify a host transition by calling Attribute.Builder.cfg(ConfigurationTransition.HOST). Blaze's configuration machinery auto-converts this to HostTransition.INSTANCE, which is a patch transition. This change provides the groundwork for removing ConfigurationTransition.HOST and removing the special conversion logic. This also paves the way for better API support for multiple host configurations. Also change some cfg(HOST) rule references to cfg(HostTransition.INSTANCE). PiperOrigin-RevId: 179754619
* Expose ObjcProtoAspect to Skylark.Gravatar cparsons2017-12-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 179737025
* Don't assume java.home points to a jre/ sub-directoryGravatar cushon2017-12-18
| | | | | | this assumption doesn't hold under JDK 9. PiperOrigin-RevId: 179443947
* Add a new flag to disable glob tracking: --incompatible_disable_glob_trackingGravatar laurentlb2017-12-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 178760403
* Remove unused Info constructor argGravatar brandjon2017-12-08
| | | | | RELNOTES: None PiperOrigin-RevId: 178408662
* Automated rollback of commit 337f19cc54e77c45daa1d5f61bf0a8d3daf8268f.Gravatar buchgr2017-12-08
| | | | | | | | | | | | | | | | | *** Reason for rollback *** This breaks downstream projects and blocks Bazel's 0.9.0 release. See https://github.com/bazelbuild/bazel/issues/4249 for more information. *** Original change description *** Move override check to the createAndOverrideRule function So we actually test for override also from skylark repositories. Fixes #3908. Change-Id: I7650a17834a6915a73c89df46989f72aa2f56920 PiperOrigin-RevId: 178370143
* Remove the --incompatible_list_plus_equals_inplace flagGravatar vladmos2017-12-08
| | | | | | | | RELNOTES[INC]: The flag --incompatible_list_plus_equals_inplace is removed, its default behavior is preserved. += on lists now always mutates the left hand side. PiperOrigin-RevId: 178359047
* Register builtins with RuntimeGravatar brandjon2017-12-07
| | | | | | | | | | | This covers all builtins in classes that use SkylarkSignatureProcessor#configureSkylarkFunctions. Generally this means things you define with @SkylarkSignature. It is now an error to call configureSkylarkFunctions multiple times for the same class. It should only be called in static initializers. Runtime's static knowledge of builtins has been factored into Runtime.BuiltinRegistry. RELNOTES: None PiperOrigin-RevId: 178295926
* New flag `--incompatible_depset_union` to disable old-style depset merging.Gravatar laurentlb2017-12-07
| | | | | | | RELNOTES: Using `+`, `|` or `.union` on depsets is now deprecated. Please use the new constructor instead (see https://docs.bazel.build/versions/master/skylark/depsets.html). PiperOrigin-RevId: 178262338
* Add option to populate selector list in blaze query's proto output.Gravatar twerth2017-12-06
| | | | | | RELNOTES[NEW]: query: Add option --noproto:flatten_selects to turn off flattening of selector lists in proto output. PiperOrigin-RevId: 178106289
* Flip the --incompatible_disallow_uncalled_set_constructor flagGravatar vladmos2017-12-06
| | | | | | | | RELNOTES: The deprecated builtin `set` is no longer allowed even from within unexecuted code in bzl files. It's temporarily possible to use --incompatible_disallow_uncalled_set_constructor=false if this change causes incompatibility issues. PiperOrigin-RevId: 178087669
* Build output files if the build tag filter contains only tags to exclude.Gravatar lberki2017-12-05
| | | | | | | | | This is arguably more correct, since output files don't have any tags, therefore you cannot exclude them by specifying tags to exclude. Fixes #4012. RELNOTES: None. PiperOrigin-RevId: 177950851