Skip to content

Commit 151d7b8

Browse files
committed
chores: correct defines processing in build.json and update upstream to v0.1.0-70
1 parent 8e456fa commit 151d7b8

6 files changed

Lines changed: 18 additions & 13 deletions

File tree

hoshi-lang

Submodule hoshi-lang updated from 13d004b to 83f4df1

pardo-server/main.hoshi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,7 @@ func route_index_package_asset(req: kiana.request.Request, params: hashMap.HashM
12431243
func main() : int {
12441244
data_provider = dataProvider.DataProvider("blob/database.db")
12451245
pcontext = context.PardoServerContext()
1246+
[[COLUMBINA == 1]] pcontext.logger.log("pardo-server official build")
12461247
pcontext.logger.log("pardo-server started")
12471248
pcontext.logger.log("checking database status")
12481249
if (data_provider.check_if_initialized() == false) {

src/pardo/main.hoshi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use fs "fs"
77
use json "json"
88
use registry "pm/registry"
99
use vec "vec"
10+
use types "share/types"
1011

1112
func print_help(self: str.Str) : none {
1213
let help_msg = str.format("pardo package manager for hoshi-lang
@@ -95,7 +96,7 @@ func main() : int {
9596
print_help(argv[0])
9697
return 0
9798
} elif (arg == "--build-number") {
98-
console.print("1\n")
99+
console.print("{}\n", types.pardo_pm_build_number)
99100
return 0
100101
} elif (arg == "-g" || arg == "--global") {
101102
is_global = true

src/pardo/pm/package.hoshi

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,17 @@ impl BuildTarget {
306306
let key = keys[i]
307307
let val = defines_dict[key]
308308
if (val interfaceof str.Str) {
309-
target.defines.put(key, dyn_cast<str.Str>(val))
309+
target.defines.put(key, str.format("\"{}\"", str.escape(dyn_cast<str.Str>(val))))
310+
} elif (val interfaceof json.Numeric) {
311+
let num = dyn_cast<json.Numeric>(val)
312+
target.defines.put(key, num.data)
313+
} elif (val interfaceof bool) {
314+
let bool_val = dyn_cast<bool>(val)
315+
if (bool_val) {
316+
target.defines.put(key, "true")
317+
} else {
318+
target.defines.put(key, "false")
319+
}
310320
}
311321
}
312322
}

src/pardo/share/types.hoshi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ use str "str"
22
use vec "vec"
33
use json "json"
44

5+
let pardo_pm_build_number = 2 // constant for pardo package manager build number
6+
57
enum Permission {
68
Administrator = 0,
79
User = 1
@@ -240,4 +242,4 @@ impl Artifact {
240242
.put("platform", this.platform)
241243
.put("arch", this.arch)
242244
}
243-
}
245+
}

src/test_package.hoshi

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)