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

witty-crayon-22786

12/06/2021, 10:16 PM
fwiw:
-ldebug
+
--loop
got a little bit more interesting in #13559: it now reports which edges were invalidated
👀 1
❤️ 1
so adding a comment to a scala file beneath
--loop check
looks like:
Copy code
14:09:56.36 [DEBUG] Dependency DigestFile(testprojects/src/jvm/org/pantsbuild/example/app/ExampleApp.scala) of Some("Snapshot(testprojects/src/jvm/org/pantsbuild/example/app/ExampleApp.scala)") changed.
14:09:56.45 [DEBUG] Dependency Snapshot(testprojects/src/jvm/org/pantsbuild/example/app/ExampleApp.scala) of Some("@rule(pants.engine.internals.graph.hydrate_sources(testprojects/src/jvm/org/pantsbuild/example/app/ExampleApp.scala))") changed.
14:09:56.46 [DEBUG] Dependency @rule(pants.engine.internals.graph.hydrate_sources(testprojects/src/jvm/org/pantsbuild/example/app/ExampleApp.scala)) of Some("@rule(pants.core.util_rules.source_files.determine_source_files())") changed.
14:09:56.46 [DEBUG] Dependency @rule(pants.core.util_rules.source_files.determine_source_files()) of Some("@rule(pants.backend.scala.dependency_inference.scala_parser.analyze_scala_source_dependencies())") changed.
14:09:56.46 [DEBUG] Running Analyzing testprojects/src/jvm/org/pantsbuild/example/app/ExampleApp.scala under semaphore with concurrency id: 5
(also fun is that it takes us less than 20 ms to extract imports here)
Copy code
14:09:56.46 [DEBUG] Connected to nailgun instance nailgun server for nailgun_server_org.pantsbuild.backend.scala.dependency_inference.ScalaParser at 127.0.0.1:55685...
14:09:56.47 [DEBUG] Completed: Analyzing testprojects/src/jvm/org/pantsbuild/example/app/ExampleApp.scala
also, in this output, because we don’t see a
Dependency X of Y changed
message above source analysis, we can see that early cutoff prevented us from actually re-running the graph calculation rules above the analyzer (since all we did was add a comment)
oh, super interesting though: adding a
+
sign to the code (for the first time) does trigger symbol remapping, but it’s a false positive: that’s a consumed symbol, rather than a provided symbol. so those two types of analysis should be broken out into separate
@rule
outputs most likely. cc @fast-nail-55400, @ancient-vegetable-10556
f

fast-nail-55400

12/06/2021, 10:39 PM
we should probably exclude infix symbols from being consumed types
they generally will be method names
w

witty-crayon-22786

12/06/2021, 10:39 PM
no, that part is totally fine imo… it’s just that we should break up consumed vs provided into separate dataclasses
because consuming a new type doesn’t affect what i provide. also, this is very very microoptimizey at this point: just thought it was fun
😁 1