<@U051221NF>: it's possible that a more valuable p...
# development
w
@happy-kitchen-89482: it's possible that a more valuable project for @hundreds-breakfast-49010 might be https://github.com/pantsbuild/pants/issues/7906 ?
writing
@rules
is well and good, but there are some landmines there, and it requires a fairly deep understanding of how pants works today
the advantage to something like #7906 is that it would get us a very meaningful bit closer to
./pants --no-v1 --v2 --v2-ui test $something
being usable
h
so it looks like
EngineDisplay
is only really being instantiated once, in
<http://scheduler.rs|scheduler.rs>
👍 1
and there's a
LOGGER
singleton that
<http://scheduler.rs|scheduler.rs>
should make sure has a reference to this
EngineDisplay
?
w
Would pose a list of questions on the ticket and @red-balloon-89377 or I can respond
h
where are some examples of logging happening in rust code right now?
just ot get a hihg-level overview of how logging currently works
w
We use the rust
log
crate which defines macros like
warn!
etc
h
okay, I've used
log
before
so what's`logger` doing on top of that?
also do you no longer need to type
macro_use
when importing a crate with macros?
w
See the linked ticket
For an explanation of where this code is going
(er, linked from my link above: so https://github.com/pantsbuild/pants/issues/6004)
h
It's not either/or - writing rules is part of the learning curve (plus we need various rules to be written). But yes, the idea was that he would try and write some rules and see what engine warts he hit, and address them. It looks like this is an already-known wart...
👍 1
w
yea. and a particularly rusty one
h
For what’s it worth, writing a V2 rule is where I really started to understand V2. Agreed it will be helpful in the next week or two to port something to V2.