Comments (5)
Thanks for the pointers. I will give it a shot.
from target-determinator.
I think for each affected target bazel cquery --config=asan "config(target, id)"
must be called to check if the target should be selected.
https://bazel.build/query/cquery#config
from target-determinator.
Thanks for the bug report! Yeah, this makes sense - I think the right place for us to fix this is in MatchingTargets
:
target-determinator/pkg/target_determinator.go
Lines 736 to 757 in 201ee22
There are two approaches I can see to going about changing it:
- Either when we're populating it, or when we're returning targets, run a
cquery
like this to filter to just the targets in the right configuration - We do have all of the configuration details in this struct, we just don't use it - if we knew the configuration we wanted to build for, we could do this just with in-memory map lookups without needing to call out to Bazel again
I'd probably lean towards 1 because a clear "filter via an opaque call to bazel" is more obviously correct than "work out the correct configuration ID and filter by it", but I think either could work.
Could I interest you in putting together a PR? I imagine it would take the shape of running one more cquery to filter this slice:
and possibly only conditionally doing so based on a new field inContext
(because some users may want the superset for other analysis reasons, rather than to perform platform filtering)from target-determinator.
Hi Daniel, I looked into your suggestions. I have not yet decided which option to use. But was wondering if the second one is even feasible. Is this information available somewhere - "if we knew the configuration we wanted to build for"? Is there a command to query the configuration id given bazel-opts?
from target-determinator.
Is there a command to query the configuration id given bazel-opts?
After running bazel cquery
, if you run bazel config
, you'll get a dump of configurations which exist - some will be explicitly labelled as "exec" or "host" configs, and others won't be. I believe any that aren't exec or host, are target configs which we may be attempting to build for. But I'll be honest - I'm not completely sure on this part. It definitely leads me to prefer approach 1, but if someone wants to do the research to work out a viable way to do 2, that could be interesting too :)
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
- 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 3
- In Bazel 7 diffs involving 3rd party deps seem to be ignored HOT 9
- 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 3
- 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.