diff --git a/src/autodep/record.hh b/src/autodep/record.hh index e028c206..627b0218 100644 --- a/src/autodep/record.hh +++ b/src/autodep/record.hh @@ -97,7 +97,7 @@ private : else return IMsgBuf().receive(report_fd()) ; } // - void _report_access( JobExecRpcReq&& jerr ) const ; + void _report_access( JobExecRpcReq&& jerr ) const ; void _report_access( ::string&& f , FileInfo fi , Accesses a , bool write , ::string&& c={} ) const { _report_access({ Proc::Access , {{::move(f),fi}} , {.write=Maybe&write,.accesses=a} , ::move(c) }) ; } diff --git a/src/lmakeserver/codec.cc b/src/lmakeserver/codec.cc index 22144ba5..da308249 100644 --- a/src/lmakeserver/codec.cc +++ b/src/lmakeserver/codec.cc @@ -281,8 +281,10 @@ namespace Codec { case JobMngtProc::Decode : jmrr = cc.decode() ; break ; case JobMngtProc::Encode : jmrr = cc.encode() ; break ; DF} - jmrr.fd = cc.fd ; // seq_id will be filled in by send_reply - Backends::send_reply( cc.job , ::move(jmrr) ) ; + if (cc.fd) { + jmrr.fd = cc.fd ; // seq_id will be filled in by send_reply + Backends::send_reply( cc.job , ::move(jmrr) ) ; + } } } diff --git a/src/lmakeserver/job.cc b/src/lmakeserver/job.cc index abfabe53..43428b09 100644 --- a/src/lmakeserver/job.cc +++ b/src/lmakeserver/job.cc @@ -911,6 +911,10 @@ namespace Engine { } Run : trace("run",pre_reason,ri,run_status) ; + if ( ri.state.missing_dsk) { + ri.reset() ; + goto RestartAnalysis ; + } SWEAR(!ri.state.missing_dsk) ; // cant run if we are missing some deps on disk if (rule->n_submits) { if (ri.n_submits>=rule->n_submits) { diff --git a/src/lmakeserver/job.x.hh b/src/lmakeserver/job.x.hh index dee94dd4..b8d00421 100644 --- a/src/lmakeserver/job.x.hh +++ b/src/lmakeserver/job.x.hh @@ -232,7 +232,7 @@ namespace Engine { private : Step _step:3 = {} ; // 3 bits } ; - static_assert(sizeof(JobReqInfo)==48) ; // check expected size XXX : optimize size, can be 32 + static_assert(sizeof(JobReqInfo)==48) ; // check expected size, XXX : optimize size, can be 32 } diff --git a/src/lmakeserver/main.cc b/src/lmakeserver/main.cc index c030e02b..e82607d5 100644 --- a/src/lmakeserver/main.cc +++ b/src/lmakeserver/main.cc @@ -376,10 +376,12 @@ bool/*interrupted*/ engine_loop() { ::vector deps ; deps.reserve(ecjm.deps.size()) ; for( auto const& [dn,dd] : ecjm.deps ) deps.emplace_back(Node(dn),dd) ; JobMngtRpcReply jmrr = je.job_info(ecjm.proc,deps) ; - jmrr.fd = ecjm.fd ; // seq_id will be filled in by send_reply - //vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv - Backends::send_reply( +je , ::move(jmrr) ) ; - //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if (+ecjm.fd) { + jmrr.fd = ecjm.fd ; // seq_id will be filled in by send_reply + //vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv + Backends::send_reply( +je , ::move(jmrr) ) ; + //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + } } break ; DF} } break ; diff --git a/src/lmakeserver/node.x.hh b/src/lmakeserver/node.x.hh index bacf7e64..6a867ff4 100644 --- a/src/lmakeserver/node.x.hh +++ b/src/lmakeserver/node.x.hh @@ -212,7 +212,7 @@ namespace Engine { DepsIter& operator++(int) { return ++*this ; } DepsIter& operator++( ) { if (i_chunkhdr.sz) i_chunk++ ; // go to next item in chunk - else { i_chunk = 0 ; hdr = hdr->next() ; } // go to next chunk } + else { i_chunk = 0 ; hdr = hdr->next() ; } // go to next chunk return *this ; } // data diff --git a/src/rpc_job.cc b/src/rpc_job.cc index e3455d0f..f5538e9a 100644 --- a/src/rpc_job.cc +++ b/src/rpc_job.cc @@ -199,7 +199,7 @@ ::ostream& operator<<( ::ostream& os , JobMngtRpcReq const& jmrr ) { return os <<')' ; } -JobMngtRpcReq::JobMngtRpcReq( SI si , JI j , Fd fd_ , JobExecRpcReq&& jerr ) : seq_id{si} , job{j} , fd{fd_} { +JobMngtRpcReq::JobMngtRpcReq( SI si , JI j , Fd fd_ , JobExecRpcReq&& jerr ) : seq_id{si} , job{j} , fd{jerr.sync?fd_:Fd()} { switch (jerr.proc) { case JobExecProc::Decode : proc = P::Decode ; ctx = ::move(jerr.ctx) ; file = ::move(jerr.files[0].first) ; txt = ::move(jerr.txt) ; break ; case JobExecProc::Encode : proc = P::Encode ; ctx = ::move(jerr.ctx) ; file = ::move(jerr.files[0].first) ; txt = ::move(jerr.txt) ; min_len = jerr.min_len ; break ;