Skip to content

compat.quickjs-ng: no version in any path (install() moves the release directory to the install root) - #903

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/quickjs-ng-version-free-layout
Nov 25, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
fix/quickjs-ng-version-free-layout

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Problem

The bot update #668 (quickjs-ng 0.18.0) fails: fatal error: ../../quickjs.h: No such file or directory. Not an upstream layout change: the descriptor names the release directory quickjs-0.17.0/ in include_dirs and in the key of the generated forwarder. generated_files keys are literal paths (mcpp materialize_generated_files writes them verbatim; there is no glob and no placeholder), so for 0.18.0 the forwarder is written into a fresh quickjs-0.17.0/ beside the real quickjs-0.18.0/ and points at nothing. The package declares extensions.autoupdate although a release needs a recipe edit.

include_dirs_after = {"*"} would work but exposes the engine's private headers, which the member's test forbids (__has_include(<cutils.h>)).

Change

install() moves quickjs-<version>/ to be the install dir itself (the compat.expat pattern; the wrap name is derived from pkginfo.version(), not listed). Then no path holds a version: include_dirs = { "mcpp/include" }, forwarder at mcpp/include/quickjs.h with #include "../../quickjs.h", sources dtoa.c etc. The private headers stay off the include path and the test's contract check is unchanged.

Already-installed 0.17.0. mcpp's install and dependency cache are keyed by version and are not redone when a descriptor changes; a 0.17.0 installed before this keeps its quickjs-0.17.0/ directory, and a flat-only descriptor fails on it ('../../quickjs.h' file not found, reproduced locally). So the descriptor also lists the quickjs-0.17.0/ sources and the forwarder falls back to ../../quickjs-0.17.0/quickjs.h. That layer names one fixed version and is never extended: every later release is flat.

0.18.0 itself comes from the bot PR #668; this PR adds no version.

Verification

Local, mcpp 2026.11.20.1, [email protected], the member's test source unmodified (contract check intact):

Not verified locally: a fresh install of 0.17.0 through install() (the cache would not let me reinstall it), and macOS and Windows. This PR's workspace legs install 0.17.0 fresh on all three platforms.

…e directory to the install root)

The descriptor named quickjs-0.17.0/ in include_dirs, the generated forwarder's
path and nothing else could follow a new release: for 0.18.0 the forwarder
landed in a fresh quickjs-0.17.0/ beside the real quickjs-0.18.0/ and its
#include "../../quickjs.h" found nothing (bot PR #668). It was declared
extensions.autoupdate although a release needed a recipe edit.

install() now moves quickjs-<version>/ to be the install dir, so the
forwarder, sources and include dir are version-free and the engine's private
headers stay off the include path (the member's contract check is unchanged).
0.17.0 installs already on disk keep their directory; the quickjs-0.17.0/
entries and the forwarder's #else serve exactly that install.
@Sunrisepeak
Sunrisepeak merged commit b6af297 into main Nov 25, 2026
19 checks passed
Sunrisepeak added a commit that referenced this pull request Nov 27, 2026
…uild warns of a missing path (#931)

Since #903 the four engine sources were named twice, once per layout ("dtoa.c" for an install
that install() flattened, "quickjs-0.17.0/dtoa.c" for a 0.17.0 installed before it, its release
directory kept). In any one install one path of each pair names no file, and mcpp 2026.11.27.1
reports an exact source path that names no file: four warnings on every build that reaches the
package (#930), on fresh runners for the kept paths and on older installs for the flat ones.

Each source is now one brace pattern, "{quickjs-0.17.0/,}dtoa.c": mcpp expands it to the two
places (an empty alternative is the install root) and reports no pattern that matches nothing in
one of them. Only those two places are searched, as before. The LAYOUT note says why.

Checked: tests/examples/quickjs-ng on an install kept from before #903 (it compiles
.../0.17.0/quickjs-0.17.0/dtoa.c), no warning, its case passes; the descriptor lints and
`mcpp xpkg parse`. The flattened install is CI's fresh one.

Closes #930

Signed-off-by: Sunrisepeak <[email protected]>
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.

1 participant