lizmat / App-Rak

21st century grep / find / ack / ag / rg on steroids
Artistic License 2.0
152 stars 7 forks source link

Crashes when temp files are removed. #12

Closed demanuel closed 1 year ago

demanuel commented 1 year ago

Hi.

i use emacs with flycheck and while i was doing a search i kept editing my file. And since i have flycheck enabled it generates a temporary file named "flycheck_XXXXXXXX". Because of this rak failed with the following exception

A worker in a parallel iteration (hyper or race) initiated here:
  in sub MAIN at /home/demanuel/.rakubrew/versions/moar-master/install/share/perl6/site/sources/1DB59DA63325592C0EB2D7F93BCB6EA641AF8111 (App::Rak) line 1357
  in block <unit> at /home/demanuel/.rakubrew/versions/moar-master/install/share/perl6/site/resources/732D462F1780FA65BC56EC589341A86285D15050 line 11
  in sub MAIN at /home/demanuel/.rakubrew/versions/moar-master/install/share/perl6/site/bin/rak line 3
  in block <unit> at /home/demanuel/.rakubrew/versions/moar-master/install/share/perl6/site/bin/rak line 1

Died at:
    Failed to open file /home/demanuel/github/C7-Technical-Test/src/test/sfr/failover/flycheck_test_exposure_manager.py: No such file or directory
      in sub MAIN at /home/demanuel/.rakubrew/versions/moar-master/install/share/perl6/site/sources/1DB59DA63325592C0EB2D7F93BCB6EA641AF8111 (App::Rak) line 1357
      in block <unit> at /home/demanuel/.rakubrew/versions/moar-master/install/share/perl6/site/resources/732D462F1780FA65BC56EC589341A86285D15050 line 11
      in sub MAIN at /home/demanuel/.rakubrew/versions/moar-master/install/share/perl6/site/bin/rak line 3
      in block <unit> at /home/demanuel/.rakubrew/versions/moar-master/install/share/perl6/site/bin/rak line 1

Unfortunately it's not possible to disable the writing of temp files ( https://github.com/flycheck/flycheck/issues/334 ). Is it possible to avoid this crash?

lizmat commented 1 year ago

So, if I get this right, the problem is that when rak makes its list of files to check, it will crash if the file no longer exists by the time it will be checked. Which, I guess, is a more general problem, but also very worthy of getting fixed :-)

demanuel commented 1 year ago

So, if I get this right, the problem is that when rak makes its list of files to check, it will crash if the file no longer exists by the time it will be checked.

correct

lizmat commented 1 year ago

I have fixed this in my dev version. I hope to be able to release that sometime during the weekend.

lizmat commented 1 year ago

This should be fixed in the .97 version that was just uploaded. So closing this issue. Please re-open if it still exists! Thanks!