Merge branch 'fix_compile_warnings'

This commit is contained in:
2026-02-20 15:34:50 -06:00
40 changed files with 282 additions and 312 deletions

20
link.cm
View File

@@ -53,7 +53,7 @@ Link.load = function() {
if (cfg && cfg.links) link_cache = cfg.links
else link_cache = {}
} disruption {
print("Warning: Failed to load link.toml\n")
log.build("Warning: Failed to load link.toml")
link_cache = {}
}
_load()
@@ -73,7 +73,7 @@ Link.add = function(canonical, target, shop) {
// Validate canonical package exists in shop
var lock = shop.load_lock()
if (!lock[canonical]) {
print('Package ' + canonical + ' is not installed. Install it first with: cell get ' + canonical + '\n')
log.error('Package ' + canonical + ' is not installed. Install it first with: cell get ' + canonical)
disrupt
}
@@ -81,7 +81,7 @@ Link.add = function(canonical, target, shop) {
if (starts_with(target, '/')) {
// Local path - must have cell.toml
if (!fd.is_file(target + '/cell.toml')) {
print('Target ' + target + ' is not a valid package (no cell.toml)\n')
log.error('Target ' + target + ' is not a valid package (no cell.toml)')
disrupt
}
} else {
@@ -110,7 +110,7 @@ Link.add = function(canonical, target, shop) {
var dep_locator = cfg.dependencies[alias]
// Skip local dependencies that don't exist
if (starts_with(dep_locator, '/') && !fd.is_dir(dep_locator)) {
print(" Skipping missing local dependency: " + dep_locator + "\n")
log.build(" Skipping missing local dependency: " + dep_locator)
return
}
// Install the dependency if not already in shop
@@ -118,18 +118,18 @@ Link.add = function(canonical, target, shop) {
shop.get(dep_locator)
shop.extract(dep_locator)
} disruption {
print(` Warning: Could not install dependency ${dep_locator}\n`)
log.build(` Warning: Could not install dependency ${dep_locator}`)
}
_get_dep()
})
}
} disruption {
print(` Warning: Could not read dependencies from ${toml_path}\n`)
log.build(` Warning: Could not read dependencies from ${toml_path}`)
}
_install_deps()
}
print("Linked " + canonical + " -> " + target + "\n")
log.build("Linked " + canonical + " -> " + target)
return true
}
@@ -141,12 +141,12 @@ Link.remove = function(canonical) {
var target_dir = get_package_abs_dir(canonical)
if (fd.is_link(target_dir)) {
fd.unlink(target_dir)
print("Removed symlink at " + target_dir + "\n")
log.build("Removed symlink at " + target_dir)
}
delete links[canonical]
Link.save(links)
print("Unlinked " + canonical + "\n")
log.build("Unlinked " + canonical)
return true
}
@@ -161,7 +161,7 @@ Link.clear = function() {
})
Link.save({})
print("Cleared all links\n")
log.build("Cleared all links")
return true
}