Skip to content

fix: remove broken extern c from config-shape, add missing use types#231

Open
bradhallett wants to merge 1 commit into
vercel-labs:mainfrom
bradhallett:fix/stale-examples
Open

fix: remove broken extern c from config-shape, add missing use types#231
bradhallett wants to merge 1 commit into
vercel-labs:mainfrom
bradhallett:fix/stale-examples

Conversation

@bradhallett
Copy link
Copy Markdown

@bradhallett bradhallett commented May 23, 2026

Summary

Fix two broken examples that fail zero check on current main:

  1. examples/config-shape.0: Remove broken extern c declarations that cause CGEN004 (unsupported backend type). The extern syntax for C FFI is not supported by the direct Mach-O backend.

  2. examples/systems-package/src/helpers.0: Add missing use types import needed for Status type resolution.

Validation

# Before: both files produce diagnostics
zero check --json examples/config-shape.0        # CGEN004
zero check --json examples/systems-package/       # NAM003 (Status unknown)

# After: both clean
zero check --json examples/config-shape.0         # 0 diagnostics
zero check --json examples/systems-package/       # 0 diagnostics

Changes

  • examples/config-shape.0: Removed 6 lines (extern c, extern type)
  • examples/systems-package/src/helpers.0: Added 2 lines (use import)

…to helpers

- examples/config-shape.0: Remove 'extern c "stdint.h"' and 'extern type CConfig'
  blocks that fail with CIMP001 (header not readable). The pure-Zero Config type
  and main function remain intact and now pass 'zero check --json'.

- examples/systems-package/src/helpers.0: Add 'use types' import so the Status
  type is resolved when the file is checked in isolation. The package already
  passed at the package level; this makes the individual file check cleaner.

Note: 14 package library files (src/*.0 in multi-file packages) still report
APP001 when checked individually — this is expected since they are library
modules, not standalone programs. They all pass when checked as packages
(e.g., 'bin/zero check --json examples/resource-cli').
@bradhallett bradhallett force-pushed the fix/stale-examples branch from df801a2 to 7b89756 Compare May 23, 2026 15:31
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

@bradhallett is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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