bitter-ability-32190
09/28/2022, 5:19 PMlint for formatters đ§”bitter-ability-32190
09/28/2022, 5:22 PMautoflake is our first formatter, and if it makes changes, you'll see it "fail" in lint after converting to a LintResult.
I'm guessing because the inputs are the same (None snapshot) the rule is getting memoized (whereas previously the snapshot would differ since fmt changed the file).
...I think For whatever reason I'm feeling a bit fuzzy on the memoization todayhundreds-father-404
09/28/2022, 5:24 PMbut autoflake is our first formatter, and if it makes changes, you'll see it "fail" in lint after converting to a LintResult.we want that, right?
bitter-ability-32190
09/28/2022, 5:24 PMfmt lint ::hundreds-father-404
09/28/2022, 5:25 PMfmt does it's thing, we would expect the inputs to have changed from when Autoflake ran for `fmt`; thus, it reruns for lintbitter-ability-32190
09/28/2022, 5:26 PMFieldSet (which I'm guessing gets invalidated? Due to maybe the source field?) to a filepathbitter-ability-32190
09/28/2022, 5:27 PMhundreds-father-404
09/28/2022, 5:28 PMhundreds-father-404
09/28/2022, 5:29 PMlint.py I think, not the autoflake rule. Use --only=autoflakebitter-ability-32190
09/28/2022, 5:32 PMhundreds-father-404
09/28/2022, 5:33 PMbitter-ability-32190
09/28/2022, 5:34 PMbitter-ability-32190
09/28/2022, 6:49 PMwitty-crayon-22786
09/28/2022, 8:13 PMFieldSet doesnât âcontainâ the file: instead, consuming it and requesting sources (capturing a Snapshot of the sources) depends on the files on disk. when they change, the dependees are invalidatedwitty-crayon-22786
09/28/2022, 8:14 PMlint / fmt around caching, except that the Result types are marked uncacheable for the purposes of their log messageswitty-crayon-22786
09/28/2022, 8:29 PMautoflake running twice (in fmt and then in lint), because it only actually runs once (in fmt)bitter-ability-32190
09/28/2022, 8:32 PMlint and succeedwitty-crayon-22786
09/28/2022, 8:42 PMlint?witty-crayon-22786
09/28/2022, 8:42 PMbitter-ability-32190
09/28/2022, 8:43 PMwitty-crayon-22786
09/28/2022, 8:44 PMwitty-crayon-22786
09/28/2022, 8:45 PMfmt and lint, files will have changed on disk, and nodes should be invalidatedwitty-crayon-22786
09/28/2022, 8:45 PMbitter-ability-32190
09/28/2022, 8:46 PMfmt lint that file. (And optionally using --only)bitter-ability-32190
09/28/2022, 8:46 PMlint should succeed after rerunning autoflakewitty-crayon-22786
09/28/2022, 8:49 PM+ autoflake made changes.
âŠ
13:48:06.10 [INFO] Filesystem changed during run: retrying `Lint` in 500ms...
âŠ
â autoflake failed.
so: what is being written to disk?witty-crayon-22786
09/28/2022, 8:50 PMwitty-crayon-22786
09/28/2022, 8:52 PMbitter-ability-32190
09/28/2022, 9:18 PMwitty-crayon-22786
09/28/2022, 9:19 PMSideEffecting)witty-crayon-22786
09/28/2022, 9:20 PMhundreds-father-404
09/28/2022, 9:23 PMbitter-ability-32190
09/28/2022, 9:27 PMwitty-crayon-22786
09/28/2022, 9:34 PMbitter-ability-32190
09/28/2022, 9:38 PMwitty-crayon-22786
09/28/2022, 9:46 PMand so the subgraph gets should be invalidated before the memoization happens for the fmt SubPartition rulei mean, between
fmt and lint, the writing of the files to disk will invalidate a bunch of nodes out of the graph, such that they need to re-runbitter-ability-32190
09/29/2022, 12:42 AMcareful-address-89803
09/29/2022, 1:50 AM./pants fmt lint will have a formatter make changes, fail its lint, and write the correct output to disk.witty-crayon-22786
09/29/2022, 1:55 AMbitter-ability-32190
09/29/2022, 2:10 AMcareful-address-89803
09/29/2022, 2:26 AMbitter-ability-32190
09/29/2022, 10:41 AMbitter-ability-32190
09/29/2022, 12:54 PMbitter-ability-32190
09/29/2022, 5:15 PM