| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
| |
- Using a thread-safe container to store handlers.
- Using a ThreadLocal NumberFormat to produce readable action counts.
NumberFormat (or rather the default implementation DecimalFormat) use
internal state and locking.
- Adding a lock-free fast path for START and FINISH events in
ExperimentalEventHandler.
RELNOTES: None.
PiperOrigin-RevId: 208479896
|
|
|
|
|
|
|
|
|
| |
...in a single event instead of relying on the synchronisation on the
reporter. In this way, it will be possible to focus on output of errors,
and also to deduplicate warnings.
Change-Id: I9669e8497ca6e22a01f3e285ec9ee42c1ecf3fb5
PiperOrigin-RevId: 208223882
|
|
|
|
|
|
| |
This also gets rid of some static initialization cycles which we should try very hard to avoid in the future.
PiperOrigin-RevId: 187334087
|
|
|
|
|
|
|
|
|
| |
This is only used by the static method of the same name, which is only used by RuleFactory.
This method is showing up in profiles as creating more garbage than I'm happy with, but not
enough to make me drop everything and fix it now. Instead make it private so folks are less
inclined to use it later...
PiperOrigin-RevId: 187208467
|
|
|
|
|
|
| |
to select a codec.
PiperOrigin-RevId: 186378153
|
|
|
|
|
|
| |
* Moves SingletonCodec to third_party.
PiperOrigin-RevId: 182143153
|
|
|
|
|
|
| |
Post to the Skyframe Environment instead.
PiperOrigin-RevId: 182096559
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't make copies of Events on replay. The same events may be replayed a lot,
so it's better to copy before storing the events. Also avoid a copy if the
tag doesn't actually change.
The intent of this change is to reduce gc churn on incremental builds. When
I wrote this change (~a year ago), this was a noticable source of gc churn in
some benchmarks I ran at the time.
PiperOrigin-RevId: 177450696
|
|
|
|
|
|
|
| |
Debug messages (generated with Skylark's `print` function) used to be filtered out by the output filter: if such messages are generated during the analysis phase in a package different to the target package (e.g. if a user builds //foo:foo and the message is generated in a dependency //bar:bar), the message are not shown by default, which makes an erroneous impression that the code for //bar:bar hasn't been executed at all and interferes with debugging. Now the output filter doesn't affect debug messages at all.
RELNOTES: Debug messages generated by `print()` are not being filtered out by --output_filter anymore, it's recommended not to use them in production code.
PiperOrigin-RevId: 177431255
|
|
|
|
|
|
|
|
| |
Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own.
This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually.
PiperOrigin-RevId: 175033526
|
|
|
|
|
|
|
|
|
| |
Previously, the end line and column of a location were the position past the actual end of a location. This makes sense for the end offset, because one can use `input.substring(startOffset, endOffset)` to get the string belonging to an ASTNode.
However the line and column (as opposed to the offset) aren't used for that. Therefore I made the change that the end line and column now point to the last character in the location. This is also they way every compiler I know does it.
RELNOTES: none
PiperOrigin-RevId: 170723732
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 167574104
|
|
|
|
|
| |
RELNOTES: The `print` function now prints debug messages instead of warnings.
PiperOrigin-RevId: 164880003
|
|
|
|
|
|
|
| |
With a few manual fixes for readability.
RELNOTES: None.
PiperOrigin-RevId: 160582556
|
|
|
|
|
|
|
| |
...instead of relying on all the methods to call printErrLn with exactly the
right format string.
PiperOrigin-RevId: 158951236
|
|
|
|
|
|
|
| |
The call sites in QueryEnvironment implementations were not needed because QueryEnvironments are always made afresh.
RELNOTES: None.
PiperOrigin-RevId: 158698881
|
|
|
|
|
| |
RELNOTES: none.
PiperOrigin-RevId: 158694769
|
|
|
|
|
|
|
|
|
|
| |
As SkyFunctions are supposed to be restartable, e.g., if prerequisites are
missing, events generated by them are temporarily stored. So are BuildEvents
posted by them. However, once the evaluation of a SkyFunction is finalized,
the stored posts need to be reposted. Do this.
Change-Id: I4ce20266fbfcbb298e93eb53086fa9916874f5d8
PiperOrigin-RevId: 157575119
|
|
|
|
|
|
|
|
|
|
|
| |
In this way, we can easily add other fetch-like events to be reported
in a similar way as plain downloads.
--
Change-Id: I518df5ba27b6593eca98d30407b582f509a52aeb
Reviewed-on: https://cr.bazel.build/9313
PiperOrigin-RevId: 149655918
MOS_MIGRATED_REVID=149655918
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Skyframe Evaluation, events reporting about progress are meant to be seen
immediately by the environment. More over, they are not to be replayed when
taking this SkyFunction out of cache. So change the custom implementation of the
StoredEventHandler in the SkyFunctionEnvironment to forward appropriately.
--
Change-Id: I30baf0088595ef684f16270f11668e980e65aa41
Reviewed-on: https://cr.bazel.build/9112
PiperOrigin-RevId: 148766400
MOS_MIGRATED_REVID=148766400
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With more specific information to be reported by Skyfunctions, e.g.,
to inform the build-event protocol on missing files, the EventHandler
interface is no longer enough. Therefore, provide an enriched context
for reporting events.
--
Change-Id: I2d06166fe4d5b9054e24ad8c752fafc039e3f9f8
Reviewed-on: https://cr.bazel.build/8794
PiperOrigin-RevId: 148463437
MOS_MIGRATED_REVID=148463437
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 148349051
MOS_MIGRATED_REVID=148349051
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not in all situation, having an EventHandler allows detailed enough
reporting on events during the build. Therefore add a new interface
that additionally allows posting arbitrary objects on the event bus.
--
Change-Id: I6ff3eebcad5f36b52c38d3f7ac20df8af2706821
Reviewed-on: https://cr.bazel.build/8793
PiperOrigin-RevId: 148078891
MOS_MIGRATED_REVID=148078891
|
|
|
|
|
|
|
|
| |
platform-default and latin-1
--
PiperOrigin-RevId: 143439199
MOS_MIGRATED_REVID=143439199
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 143390220
MOS_MIGRATED_REVID=143390220
|
|
|
|
|
|
|
|
|
|
| |
Bypass converting bytes to string - RecordOutputStream is typically used to
wrap stdout/err, which we write bytes to, the string step is waste.
Make defensive copies of byte[]s passed to Event since Event doesn't.
--
MOS_MIGRATED_REVID=137949714
|
|
|
|
|
|
|
| |
This makes null builds with a lot of events ~50% faster.
--
MOS_MIGRATED_REVID=131919322
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=128476121
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=120418505
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106407898
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106389517
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106382513
|
|
|
|
|
|
|
|
| |
Also remove a bunch of custom uses of EventCollector, and use the (already
existing) EventCollectionApparatus instead.
--
MOS_MIGRATED_REVID=106047665
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=102497981
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks serialization of SkyValues.
--
MOS_MIGRATED_REVID=102457225
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
attributes: generator_{function, name, location}
--
MOS_MIGRATED_REVID=102139196
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101798931
|
|
|
|
|
|
|
| |
attributes: generator_{function, name, location}
--
MOS_MIGRATED_REVID=101774632
|
|
|
|
|
|
|
| |
This means that some tests had to be changed from using exact equality of error messages to working with contains() / startsWith().
--
MOS_MIGRATED_REVID=100923593
|
|
|
|
|
|
|
|
|
| |
color when the build fails.
Includes fix for problems causing the original slowdown to blaze query
--
MOS_MIGRATED_REVID=99755414
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Query performance regression.
--
MOS_MIGRATED_REVID=99560234
|
|
|
|
|
|
|
| |
color when the build fails.
--
MOS_MIGRATED_REVID=98736813
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do this by implementing equality for TaggedEvents (and all objects
it transitively includes). Before this change, if a Skyframe node
re-evaluated to the same value as in the previous build, but had
(transitive) events, change pruning would not cut off the evaluation
of its parents. This is not a big issue in practice because most nodes
that would re-evaluate to the same value (like FileValues or
GlobValues) never emit events, and others (like ActionExecutionValues)
have secondary caches that mask this effect.
Also do a drive-by fix where we were using the hash code of a nested
set instead of the shallow hash code (didn't have any bad effects in
practice because we never hash these values).
(Minor formatting clean-ups from https://bazel-review.googlesource.com/1610 )
--
Change-Id: I751a8479627f0456993c5ec8834528aeb593d736
Reviewed-on: https://bazel-review.googlesource.com/1610
MOS_MIGRATED_REVID=98115908
|
|
|
|
|
|
|
| |
mismatch.
--
MOS_MIGRATED_REVID=97878625
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
1. Make --analysis_warnings_as_errors a no-op.
2. Stop doing a sanity check that we didn't succeed in analysis even with errors emitted.
3. As a result, emit an error about shared actions to the proper listener.
--
MOS_MIGRATED_REVID=92262247
|