Hi guys, I am trying actually to fix this part of my code. Basically, when my program run this part, it happen sometimes randomly the playCalculationAnimation is not runned. Any idea ?
def buildTasksFile
processResult = IO::Memory.new
requestedCommands = "CRYSTAL_WORKERS=#{Ism.settings.systemMakeOptions[2..-1]} crystal build #{ISM::Default::Filename::Task}.cr -o #{@settings.rootPath}#{ISM::Default::Filename::Task} -f json"
Process.run(command: requestedCommands,
error: processResult,
shell: true,
chdir: "#{@settings.rootPath}") do |process|
loop do
Fiber.yield
playCalculationAnimation(ISM::Default::CommandLine::CompilationWaitingText)
break if process.terminated?
end
end
processResult.rewind
if processResult.to_s != ""
taskError = Array(ISM::TaskBuildingProcessError).from_json(processResult.to_s.gsub("\"size\":null","\"size\":0"))[-1]
showTaskCompilationFailedMessage
showTaskBuildingProcessErrorMessage(taskError, "#{@settings.rootPath}#{ISM::Default::Filename::Task}.cr")
exitProgram
end
rescue error
printSystemCallErrorNotification(error)
exitProgram
end