Skip to content

Claude/upgrade ape c library mm z gd - #720

Merged
staalmannen merged 2 commits into
mainfrom
claude/upgrade-ape-c-library-mmZGd
Nov 5, 2026
Merged

staalmannen merged 2 commits into
mainfrom
claude/upgrade-ape-c-library-mmZGd

Conversation

@staalmannen

Copy link
Copy Markdown
Owner

No description provided.

Asked directly, so written down rather than left to be re-asked.
Neither is vendored and neither ships with php: external/lua and
external/tk are the libraries, and php/ext has no lua or tk.  Both
would be PECL packages, and PECL extensions build as shared modules,
which Plan 9 cannot load -- they would have to be linked statically
and listed by hand.  That part is mechanical and the port directory
is already arranged for it; the problem is upstream.

PECL tk is 0.1.1 beta dated 2004-11-14, and its own page says the
package is unmaintained and invites a new owner.  That is the PHP 4
extension API, predating zend_string, the PHP 7 zval rework, the
arginfo requirements and the TSRMLS removal.  Not an extension to
enable: a rewrite, and a GUI binding additionally needs an event loop
married to php's request lifecycle on top of our own tk/plan9
backend.

PECL lua looks PHP 7-era; LuaSandbox is the one packaged for 8.0
through 8.5, which also means it is a different extension with a
different API.  Worth checking before any work whether it wants Lua
5.1, since it comes from MediaWiki's Scribunto and this tree ships
5.5.0.

The note also states the distinction worth keeping: the bundled
extensions this port wants all ship with 8.5, are tested by upstream
against this version, and are turned on with a --with-X against a
library we already have.  The first is a flag; the second is a port.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
mk answered `mkfile:612: syntax error; expected one of :<='.  The
OFILES list ended at the last generated entry, and the
internal_functions_cli.$O that was meant to be part of it sat
tab-indented after a blank line and five comments -- an orphan
logical line.  It and the comments above it carry continuations now,
and the comment says it is the one line in the list deliberately
without one.

mkcont-sweep reported 0 over that, before and after, because its
check only fires when a COMMENT ends the continuation and here an
ordinary entry did.  The generalisation is the one mk itself uses and
covers both: a logical line starting with a bare word is a syntax
error wherever it came from, and an indented one is a syntax error
unless it is a recipe -- which means the line above it had a `:'.

Recipes are the whole difficulty, since every recipe body line is
indented and has no `:' or `=', so a naive version reports the entire
tree.  The discriminator is what the last non-indented logical line
was, and over all 253 mkfiles the widened sweep finds 0, which is the
evidence that the discriminator is right.

--control carries one of each shape and, in the second, a real recipe
that must NOT be reported: a control without it would pass for a
version that flags every mkfile in the tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
@staalmannen
staalmannen merged commit 1d59777 into main Nov 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants