https://pantsbuild.org/ logo
#development
Title
# development
w

witty-crayon-22786

07/09/2019, 10:07 PM
@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

hundreds-breakfast-49010

07/09/2019, 10:58 PM
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

witty-crayon-22786

07/09/2019, 11:01 PM
Would pose a list of questions on the ticket and @red-balloon-89377 or I can respond
h

hundreds-breakfast-49010

07/09/2019, 11:02 PM
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

witty-crayon-22786

07/09/2019, 11:02 PM
We use the rust
log
crate which defines macros like
warn!
etc
h

hundreds-breakfast-49010

07/09/2019, 11:04 PM
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

witty-crayon-22786

07/09/2019, 11:05 PM
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

happy-kitchen-89482

07/10/2019, 12:52 AM
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

witty-crayon-22786

07/10/2019, 12:56 AM
yea. and a particularly rusty one
h

hundreds-father-404

07/10/2019, 1:50 AM
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.