Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ jobs:
- name: Validate Calcit snapshot and types
run: |
calcit calcit.cirru fix --workflow strict --verify --format edn
source_blob="$(git hash-object calcit.cirru)"
calcit calcit.cirru edit format
git diff --exit-code -- calcit.cirru
test "$(git hash-object calcit.cirru)" = "$source_blob"
calcit calcit.cirru --check-only
calcit calcit.cirru --entry server --check-only
calcit --check-only --ns app.browser --ns app.client --ns app.comp.chatroom --ns app.comp.container --ns app.comp.header --ns app.comp.login --ns app.comp.profile --ns app.config --ns app.schema --ns app.style --summary-only --format json
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ https://github.com/Cumulo/calcium-workflow

### 构建与部署

本轮只将源码开发工具链和协作依赖配对到正式 0.30.1,不修改应用 Snapshot、状态模型、存档或 wire 协议。CLI 与 `@calcit/procs` 必须一起更新;这不是服务已升级或可以直接部署的声明。原 std 0.2.43/WSS 0.2.36 保持,未启动服务或操作真实账户/存档。
继续使用正式 Calcit / `@calcit/procs` 0.30.1 与原协作依赖图。本轮迁移七处公开方法调用并补充退出回调的真实类型合同,不改变状态模型、存档、wire 协议、登录 key 或页面 `hud!`。这不是服务已升级或可以直接部署的声明;原 std 0.2.43/WSS 0.2.36 保持,未启动服务或操作真实账户/存档。

三处生产计数与原登录测试的一处计数使用 `.len`,两处备份日期 Option 读取使用 `.unwrap`,退出任务列表使用 `.foldl`。正式 0.30.1 的 [fold 方法回调推断差异 #2341](https://github.com/calcit-lang/calcit/issues/2341) 尚未回移发布,因此仅为原取消回调声明 `Unit × FfiTask → Unit`:回调 body、取消顺序及 reset/persist/quit 顺序均保留,不加强转、默认值或返回值覆盖。规范格式门禁仍要求 formatter 前后源码 Git blob 一致,失败时不再输出 Snapshot 文本。临时迁移脚本、完整视图和准备工作流不进入项目,不增加 checker 或测试组。

此前具名模型迁移要求前后端一起更新并刷新旧页面。不要在后端仍运行旧版本时合并部署:须先准备新依赖、匹配的 std/WSS 原生库及 `calcit --entry server` 进程。原工作流只复制服务文件,不会替服务器安装依赖或重启进程。旧 Map 存档可经检查后读取;首次保存会写入新的具名格式,回滚旧程序前须使用升级前的独立备份。存档中的未知字段或错误类型会拒绝读取,不静默丢弃后覆盖原文件。

Expand Down
16 changes: 10 additions & 6 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@
let
credentials $ decode-map-as raw $ :: 'List 'String
if
= 2 $ count credentials
= 2 $ .len credentials
, credentials $ raise "|Expected two credential strings"
:examples $ []
:schema $ :: 'Fn $ {}
Expand Down Expand Up @@ -1151,9 +1151,9 @@
let
now $ calcit.std.date/extract-time $ get-time!
join-path calcit-dirname |backups
str $ option:unwrap $ get now :month
str $ .unwrap $ get now :month
str
option:unwrap $ get now :day
.unwrap $ get now :day
, |-snapshot.cirru
:examples $ []
:schema $ :: 'Fn $ {} (:return 'String)
Expand All @@ -1179,7 +1179,11 @@
:args $ []
'on-exit! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn on-exit! ()
foldl @*tasks &unit $ fn (acc task) (.cancel! task)
.foldl @*tasks &unit $ fn (acc task)
hint-fn $ {}
:args $ [] 'Unit 'calcit.core/FfiTask
:return 'Unit
.cancel! task
reset! *tasks $ []
persist-db!
quit! 0
Expand Down Expand Up @@ -1341,7 +1345,7 @@
= :chatroom $ :name route
:messages db
{}
schema/Store :logged-in? (.some? maybe-user) :session session :reel-length (count records) :user user-view :router route-view :count-sessions $ count $ :sessions db
schema/Store :logged-in? (.some? maybe-user) :session session :reel-length (.len records) :user user-view :router route-view :count-sessions $ .len $ :sessions db
:examples $ []
:schema $ :: 'Fn $ {} (:return 'app.schema/Store)
:args $ [] 'app.schema/Db 'app.schema/Session $ :: 'List 'Dynamic
Expand Down Expand Up @@ -1419,7 +1423,7 @@
:user-id $ .unwrap $ get (:sessions logged-out) 7
assert= (Option :none)
:user-id $ .unwrap $ get (:sessions wrong) 7
assert= 1 $ count $ :messages
assert= 1 $ .len $ :messages
.unwrap $ get (:sessions wrong) 7
assert= (Option :some |u)
:user-id $ .unwrap $ get (:sessions logged-in) 7
Expand Down
Loading