Skip to content

simplecadapi 2.3.0.post1

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Nov 01:37
· 1 commit to master since this release

2.3.0.post1 Update Notes

2.3.0.post1 follows 2.3.0. It is the editor fix below, plus everything merged to dev after 2.3.0 (the drawing engine rework and
the parallel wheel build); nothing in the geometry kernel changed.

The editor is found by its own answer

sca cell used os.kill(pid, 0) on the pid in .sca-editor/server.json and took "no such process" for a dead editor. A sandbox
with its own pid namespace cannot see the editor's process while the editor answers, so every editor started outside it was
"stale" and the agent lost it ("editor not reached: stale record ... (pid N is gone)").

Now /api/health is the truth, and the workspace it answers for must be the record's directory:

sca cell says it means
... does not answer no editor listens at that url; start one (a pid that is gone only sharpens this message)
answers for workspace X, not Y that port belongs to another project's editor; nothing is sent to it
N editors serve ... several are live; none is chosen for you

Several editors, side by side

  • Every editor has an instance id (in /api/health) and its own record, .sca-editor/editors/<instance>.json, written atomically
    and removed only by that editor. server.json is gone; code that read it reads this directory.
  • Pin one with --editor URL --instance ID or SCA_EDITOR_URL and SCA_EDITOR_INSTANCE (both are needed) on any sca cell,
    sca feature, sca sketch or sca new command. A pinned editor is used wherever the command runs and is checked against its
    instance id; it is never replaced by reading the file.
  • sca cell, sca feature and sca sketch reports say which editor answered: editor: {url, workspace, instance}.
  • sca snapshot and sca viewport still read per-workspace files, so two editors on one workspace overwrite each other there.

sca edit picks the port

--port now defaults to 0: the system picks a free port and the editor serves on the socket it bound, so nothing can take the
port in between. Once it listens, one line goes to stdout:

SCA_EDITOR_READY {"url": "http://127.0.0.1:41233", "instance": "3f9c2a7d41b0", "workspace": "/work/proj", "pid": 812}

--port N keeps a fixed port and fails with a message when it is taken. The default was 7180.

Also in this release (from dev)

  • The drawing engine measures the model: a dimension names what it measures (DimDecl(of=...), between=(a, b),
    extent=) and the sheet number is the measurement; one issue list; native DXF DIMENSION entities. See the changelog.
  • The release workflow builds the sixteen wheels in sixteen parallel jobs.

中文说明:docs/updates/2.3.0.post1.zh-CN.md