Comments (1)
Thanks for filing this issue! I think this makes a lot of sense - definitely being able to cache these values across runs is very sensible.
Would you be interested in trying to put together a PR to implement this? The key pieces of code to affect would be:
- The entry-point here should optionally take a path to a hash file instead of a
RevisionBefore
- I'd probably introduce a new structHashFileOrRevision
which has either aHashFile
orRevision
set, and populate that onconfig
. - This calls into
WalkAffectedTargets
- accept aHashFileOrRevision
forcommitishBefore
and pass it through toFullyProcess
. - In
FullyProcess
, populatequeryInfoBefore
by optionally deserializing JSON instead of callingfullyProcessRevision
.
As far as I know, everything in QueryResults
should be trivially JSON serializable (I think we'd need to add a Marshall implementation to MatchingTargets
, but it's just a wrapper around a slice, so should be trivial).
We may want to nil-out any instances of analysis.ConfiguredTarget
because they're probably very large and not useful other than for explaining why something changed. In fact, maybe all we want is to serialize MatchingTargets
and TargetHashCache.cache
, which maybe calls for its own struct purpose made for serialization/deserialization? We may also want to add some schema version number or similar but we can probably worry about that kind of thing in the future.
from target-determinator.
Related Issues (20)
- Add documentation to build target-determinator & driver from source HOT 1
- Should driver rebuild non-test targets? HOT 1
- Add --keep_going flag HOT 3
- [driver] bazel-opts are not passed to test command
- targets incompatible with the current platform are selected HOT 5
- bazel-opts are not passed to bazel-config command HOT 2
- deadlock in hashTarget -> build.Target_RULE -> hashRule HOT 6
- With Bazel 6 and bzlmod configured rules_python, target determinator complains of invalid characters HOT 2
- Bazel errors with --transitions=lite
- target-determinator does not evaluate aliases as changed HOT 2
- Enhancement: make it possible to print debug logs of what's being hashed
- Invalid options syntax error HOT 2
- Possible circular configurations? HOT 6
- When using with bzlmod rules_python encounter error with Bazel 6.4.0
- Provide an option to override bazel command HOT 2
- In Bazel 7 diffs involving 3rd party deps seem to be ignored HOT 8
- Support -enforce-clean=enforce-clean for when the "before" location is unclean HOT 2
- --enforce-clean accepts a tri-state value but only has boolean behaviour HOT 1
- TargetHashCache has already been frozen HOT 2
- Unclean checkout problem HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from target-determinator.