Strangely, for the first time ever tonight, Rails failed to start on my windows dev machine because Barnes tries to use Process.clock_gettime with Process::CLOCK_PROCESS_CPUTIME_ID. Again, I have no clue why this is an issue all of a sudden. I haven't changed anything reasonably related since last successful start. Either way, Ruby on Windows only currently supportsCLOCK_REALTIME and CLOCK_MONOTONIC.
It's easy for me to workaround, since I don't actually need barnes in development or test, so I just add it to the :production group in my gemfile. Perhaps someone should update the docs to say it should be added in production? Or otherwise nop out the code.
The stacktrace is:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/instruments/stopwatch.rb:77:in `clock_gettime': Invalid argument - clock_gettime (Errno::EINVAL)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/instruments/stopwatch.rb:77:in `cpu'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/instruments/stopwatch.rb:64:in `current'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/instruments/stopwatch.rb:33:in `start!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/panel.rb:38:in `block in start!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/panel.rb:37:in `each'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/panel.rb:37:in `start!'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/periodic.rb:43:in `block (2 levels) in initialize'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/barnes-0.0.9/lib/barnes/periodic.rb:42:in `each'
Strangely, for the first time ever tonight, Rails failed to start on my windows dev machine because Barnes tries to use
Process.clock_gettime
withProcess::CLOCK_PROCESS_CPUTIME_ID
. Again, I have no clue why this is an issue all of a sudden. I haven't changed anything reasonably related since last successful start. Either way, Ruby on Windows only currently supportsCLOCK_REALTIME
andCLOCK_MONOTONIC
.It's easy for me to workaround, since I don't actually need barnes in development or test, so I just add it to the
:production
group in my gemfile. Perhaps someone should update the docs to say it should be added in production? Or otherwise nop out the code.The stacktrace is: