Jakub Majocha

Results 151 comments of Jakub Majocha

[Minimal repro](https://fsprojects.github.io/fantomas-tools/#/fantomas/preview?data=N4KABGBEDGD2AmBTSAuKAKdwBKYDuAlgC4AWYAWmALxgCMAvgJSOQA04UAzokUQQHYBzTqjABtDhFAQZUACREAngAdkaSAKJtJMyHIBuAQwA2AVzXidsgAztZsyAEl%2BSfkQDKBAF7I79iAAsVmAAujr0flLBekqqohpu2v56RmYWEv4QtJH2kACyhgAeADICiMWIQqRJmbQATNbBYbIROtK5CioWkJXwAPIAZqX8iO5Kxr7RBibmohmZdTkOAKIug8OTmVDGA5BN4TntDp1x6gBGsLDGNceps2jz-gDMS7rO3ABORABiAiYAcog8MYyjd7EQPuZ9i1DlNYt0LlcwRAUjN0sFAq8Ue5lIZoIgAEKIAawD6IAAKhg%2BhgAtjxEB9kTIIVD-M0ZK1ZEddCcEZdrq9UWk5hiwABWLFQHF4wnE0nlWB4BnQQzcZz6WAqviwfhMiAsxDQjmw5K8%2BKIgVTO7orYANklkGl%2BKJJLJAFVlKoPiq1fwNVqCDq9WABiZuEaIJyZNyUWbzvymUL7pYtgB2B1O2WuxAAYWMqs4OZ1nBZ0CIpODoeM4bZBzacK65oTgumwoeooAHBncc65WS8ogaWcGZWw4bazD66b4U2kS3rSKtgBObsyl3yovGIOSqs1%2BzsyMmjoz%2BNzq1oxe1Wyix09xAAQQGRAZRZpNMMwYNEbAUai08bp6WqaC7tlstDZDembrmS7iDgQcBbrqO5jt%2Bv5gDG8gnlAFqJq2yaPPY9Srvij7Ph8sE0vBVzbqKX4TsaU7HgB2HNuebYprULyQXe94fLApguAAIogIKUWRn6QuO%2B51lyDanFAmi4SBHH%2BLQAQOgUhSOAMAAqJCVO4JCkkQADqBDwNUkqNPRh6MccWEJFo84XqBtQSjemnaXplTLNWoxGV8ZkWSQwa2tZ0mTrJ-7yY5SkuSphH2h5RTOAMBCFH0XqGOWHzLIUyhkpwnCBkhnbhbIB4-ke9nMbFznsQRsi0OmyWFNgiBwB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think it would be more logical to assign the comment to the `else if` node rather than to the condition, i. e. this: ```f# if bar then a

This makes me think if there is a way to make Fantomas maintain the offside rules in a general way.

Hi, @nojaf. Thanks for the swift and detailed response. This is a contrived example I did, so I probably shouldn't tick "breaks my code" when what I had on mind...

Wow, so MacOS and Linux passes 😅. The one failure seems unrelated, and due to concurrent access to `StringBuilder` in test utils: ``` Error message System.ArgumentOutOfRangeException : Index was out...

@0101, if this is checks green, please take a look if this is the right direction.

> It might be nice to have this configurable and have stack traces for debugging and no-restarts for release. Debugging as in debugging the FCS itself?

Hmmm ok, so this passes without reverting16348 (#16536).

> > Hmmm ok, so this passes without reverting16348 (#16536). > > Damn, how come? The failures that happen in the other branch don't even touch this code 🤔 tbh,...

At this moment this is just trying things in the dark. I don't think it fixes anything. Actually I've seen the random test failure locally (TaskCancelledException), when running all tests...