better update output
This commit is contained in:
@@ -1021,19 +1021,41 @@ function ensure_package_dylibs(pkg) {
|
||||
var build_mod = use_cache['core/build']
|
||||
var target = null
|
||||
var c_files = null
|
||||
var _all_ok = true
|
||||
var _ri = 0
|
||||
|
||||
if (build_mod) {
|
||||
target = detect_host_target()
|
||||
if (!target) return null
|
||||
|
||||
c_files = pkg_tools.get_c_files(_pkg, target, true)
|
||||
if (!c_files || length(c_files) == 0) {
|
||||
package_dylibs[_pkg] = []
|
||||
return []
|
||||
// Fast path: if manifest exists and all dylibs are present, skip build_dynamic
|
||||
results = read_dylib_manifest(_pkg)
|
||||
if (results != null) {
|
||||
_all_ok = true
|
||||
_ri = 0
|
||||
while (_ri < length(results)) {
|
||||
if (results[_ri].dylib && !fd.is_file(results[_ri].dylib)) {
|
||||
_all_ok = false
|
||||
break
|
||||
}
|
||||
_ri = _ri + 1
|
||||
}
|
||||
if (_all_ok) {
|
||||
log.shop('manifest ok for ' + _pkg + ' (' + text(length(results)) + ' modules)')
|
||||
} else {
|
||||
results = null
|
||||
}
|
||||
}
|
||||
if (results == null) {
|
||||
target = detect_host_target()
|
||||
if (!target) return null
|
||||
|
||||
log.shop('ensuring C modules for ' + _pkg)
|
||||
results = build_mod.build_dynamic(_pkg, target, 'release', {})
|
||||
c_files = pkg_tools.get_c_files(_pkg, target, true)
|
||||
if (!c_files || length(c_files) == 0) {
|
||||
package_dylibs[_pkg] = []
|
||||
return []
|
||||
}
|
||||
|
||||
log.shop('ensuring C modules for ' + _pkg)
|
||||
results = build_mod.build_dynamic(_pkg, target, 'release', {})
|
||||
}
|
||||
} else {
|
||||
// No build module at runtime — read manifest from cell build
|
||||
results = read_dylib_manifest(_pkg)
|
||||
@@ -1622,12 +1644,16 @@ function download_zip(pkg, commit_hash) {
|
||||
return _download()
|
||||
}
|
||||
|
||||
// Get zip from cache, returns null if not cached
|
||||
// Get zip from cache, returns null if not cached or empty
|
||||
function get_cached_zip(pkg, commit_hash) {
|
||||
var cache_path = get_cache_path(pkg, commit_hash)
|
||||
if (fd.is_file(cache_path))
|
||||
return fd.slurp(cache_path)
|
||||
|
||||
var data = null
|
||||
if (fd.is_file(cache_path)) {
|
||||
data = fd.slurp(cache_path)
|
||||
stone(data)
|
||||
if (length(data) > 0) return data
|
||||
fd.remove(cache_path)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -1883,7 +1909,7 @@ Shop.sync_with_deps = function(pkg, opts) {
|
||||
if (visited[current]) continue
|
||||
visited[current] = true
|
||||
|
||||
log.console(' Fetching ' + current + '...')
|
||||
log.build(' Fetching ' + current + '...')
|
||||
Shop.sync(current, opts)
|
||||
|
||||
_read_deps = function() {
|
||||
@@ -2082,15 +2108,15 @@ Shop.build_package_scripts = function(package)
|
||||
ok = ok + 1
|
||||
} disruption {
|
||||
push(errors, script)
|
||||
log.console(" compile error: " + package + '/' + script)
|
||||
log.build(" compile error: " + package + '/' + script)
|
||||
}
|
||||
_try()
|
||||
})
|
||||
|
||||
if (length(errors) > 0) {
|
||||
log.console(' Compiling scripts (' + text(ok) + ' ok, ' + text(length(errors)) + ' errors)')
|
||||
log.build(' Compiling scripts (' + text(ok) + ' ok, ' + text(length(errors)) + ' errors)')
|
||||
} else if (ok > 0) {
|
||||
log.console(' Compiling scripts (' + text(ok) + ' ok)')
|
||||
log.build(' Compiling scripts (' + text(ok) + ' ok)')
|
||||
}
|
||||
|
||||
return {ok: ok, errors: errors, total: length(scripts)}
|
||||
|
||||
Reference in New Issue
Block a user