Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise does not gracefully fail #63

Open
MICHAELABICK opened this issue Jul 18, 2023 · 0 comments
Open

Revise does not gracefully fail #63

MICHAELABICK opened this issue Jul 18, 2023 · 0 comments

Comments

@MICHAELABICK
Copy link

Thank you so much for your work on this package. I'm running into the following issue in v0.1.10 where Revise does not gracefully fail. For example, when Revise runs into an issue, I get this stacktrace instead of just a logged error:

ERROR: IOError: write: broken pipe (EPIPE)
Stacktrace:
 [1] uv_write at ./stream.jl:1066
 [2] flush at ./stream.jl:1133
 [3] #handle_message#19 at /home/mbick/.julia/packages/LoggingExtras/zT9ZU/src/formatlogger.jl:59
 [4] handle_message at /home/mbick/.julia/packages/LoggingExtras/zT9ZU/src/formatlogger.jl:51
 [5] #handle_message#13 at /home/mbick/.julia/packages/LoggingExtras/zT9ZU/src/minlevelfiltered.jl:17
 [6] #invokelatest#2 at ./essentials.jl:818
 [7] invokelatest at ./essentials.jl:813
 [8] macro expansion at ./logging.jl:365
 [9] errors at /home/mbick/.julia/packages/Revise/7HQ7u/src/packagedef.jl:723
 [10] #revise#97 at /home/mbick/.julia/packages/Revise/7HQ7u/src/packagedef.jl:824
 [11] revise at /home/mbick/.julia/packages/Revise/7HQ7u/src/packagedef.jl:749
 [12] serverRun at /home/mbick/.julia/packages/DaemonMode/fAZD4/src/DaemonMode.jl:254
 [13] #21 at /home/mbick/.julia/packages/DaemonMode/fAZD4/src/DaemonMode.jl:409
 [14] cd at ./file.jl:112
 [15] serverRunFile at /home/mbick/.julia/packages/DaemonMode/fAZD4/src/DaemonMode.jl:407
 [16] async_process at /home/mbick/.julia/packages/DaemonMode/fAZD4/src/DaemonMode.jl:69
 [17] macro expansion at /home/mbick/.julia/packages/DaemonMode/fAZD4/src/DaemonMode.jl:92
 [18] #3 at ./threadingconstructs.jl:373

Interestingly enough, on subsequent runs the Revise queue seems to be empty so no errors are logged, and as such I don't see this stacktrace. I can even run Revise.retry() in a script and get an error log as I would expect, for example:

mbick@CND0458DRL:/mnt/c/Users/MBick1/Documents/ProcessCapabilityAnalysis$ julia --startup-file=no -e 'using DaemonMode; runargs()' script.jl
┌ Error: Failed to revise /mnt/c/Users/MBick1/Documents/ProcessCapabilityAnalysis/src/Queries.jl
└ @ Revise /home/mbick/.julia/packages/Revise/7HQ7u/src/packagedef.jl: 723

Thus, it appears to me (based on the information above) that the issue has something to do with DaemonMode.jl:254. I'm not quite sure exactly what is happing, but in particular it looks like things are being logged differently when reviser() (i.e. Revise.retry()) is run then when scripts are being run. I think this likely has to do with the way that the script logger is set (DaemonMode.jl:266) but am not exactly sure how all that code interacts.

At the very least it would be nice to have a flag to disable the automatically run reviser() call (at DaemonMode.jl:254). It appears that I have no issues with how logs work when running Revise.revise() or Revise.retry() from scripts, so it would be easy enough for my personal usecase to have to manually call it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant