Skip to content

Commit

Permalink
fix duplication in classes registering; bump 0.3.22
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed May 29, 2021
1 parent c119b5d commit f0640e2
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "calcit_runner"
version = "0.3.21"
version = "0.3.22"
authors = ["jiyinyiyong <[email protected]>"]
edition = "2018"
license = "MIT"
Expand Down
24 changes: 24 additions & 0 deletions calcit/calcit.cirru

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions calcit/compact.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
|call-3 $ quote
defn call-3 (a b c) (echo "\"a is:" a) (echo "\"b is:" b) (echo "\"c is:" c)
|main! $ quote
defn main! () (demos) (fib 10)
defn main! () (demos) (; fib 10) (try-method)
|demos $ quote
defn demos () (echo "\"demo")
echo $ &+ 2 2
Expand Down Expand Up @@ -57,6 +57,9 @@
test-args
|call-many $ quote
defn call-many (x0 & xs) (echo "\"many...") (echo "\"x0" x0) (echo "\"xs" xs)
|try-method $ quote
defn try-method () $ println
.count $ range 11
|rec-sum $ quote
defn rec-sum (acc xs)
if (empty? xs) acc $ recur
Expand All @@ -77,7 +80,7 @@
|f1 $ quote
defn f1 () $ echo "\"calling f1"
|reload! $ quote
defn reload! () (println "\"reloaded 2") (fib 40)
defn reload! () (println "\"reloaded 2") (; fib 40) (try-method)
|add-more $ quote
defmacro add-more (acc x times)
if (&< times 1) acc $ recur
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calcit/procs",
"version": "0.3.21",
"version": "0.3.22",
"main": "./lib/calcit.procs.js",
"devDependencies": {
"@types/node": "^15.0.1",
Expand Down
9 changes: 4 additions & 5 deletions src/codegen/emit_js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,10 @@ pub fn emit_js(entry_ns: &str, emit_path: &str) -> Result<(), String> {
println!("[Warn] strange case for generating a definition: {}", f)
}
}

if ns == primes::CORE_NS {
// add at end of file to register builtin classes
direct_code.push_str(&snippets::tmpl_classes_registering())
}
}
if ns == primes::CORE_NS {
// add at end of file to register builtin classes
direct_code.push_str(&snippets::tmpl_classes_registering())
}

let collected_imports = file_imports.into_inner();
Expand Down

0 comments on commit f0640e2

Please sign in to comment.