Skip to content

Pin the regex-free beta.11 branches and gate CI on generated-app linkage - #55

Closed
crimson-knight wants to merge 2 commits into
mainfrom
beta11-regex-free-integration
Closed

crimson-knight wants to merge 2 commits into
mainfrom
beta11-regex-free-integration

Conversation

@crimson-knight

Copy link
Copy Markdown
Member

Integration branch for Amber 2.0.0-beta.11: the app amber new generates should build and run with no libpcre2 linked.

Depends on

What changes

  • The web generator (new_command.cr, templates/app/shard.yml.ecr) and AmberRelease pin those three branch heads by commit. The Amber entry carries its tree (332d04b4) and Minecart checksum (sha256-v2:f58fc614...). Specs, check_beta_contract.sh and the smoke scripts follow the new pins.
  • These are integration pins. Before merge they become the commits of the release tags (Grant release, asset_pipeline release, Amber v2.0.0-beta.11), and AmberRelease::VERSION becomes 2.0.0-beta.11.
  • New scripts/check_generated_app_linkage.sh and the generated-app-linkage CI job (ubuntu-24.04, macos-15, sha256-verified Crystal 1.22.2). The job generates amber new linkage_probe -d sqlite, builds the app, checks that it links no libpcre2 and holds no pcre2_ symbol, and checks that GET / answers 200. It repeats the build and check after amber generate scaffold adds a Grant model, then runs the app's specs. A control program that uses Regex must show PCRE2, which proves the check can fail.

Status on macOS (crystal-alpha 1.21.0)

  • The CLI spec suite passes: 776 examples, 0 failures. Formatting and the beta contract checks pass.
  • The generated app builds, its spec passes, and GET / answers 200.
  • The linkage gate fails, as intended. The default app still links libpcre2-8.0.dylib (13 pcre2_ symbols). The only reachable Regex is Components::Cache::PageAnswer#refuses_coding? (asset_pipeline/src/components/cache/page_answer.cr:90, /(^|;)q=0(\.0*)?$/). The generated config/initializers/page_cache.cr requires asset_pipeline/components/cache/configuration, which loads it. With that one method replaced by a hand-written check (0 mismatches over 200,036 inputs), both the default app and the scaffolded app link no PCRE2, specs pass and pages answer 200. That fix belongs in Make the default require path regex-free (0.38.0) asset_pipeline#25.

This PR stays a draft until the three upstream PRs merge and are tagged.

Amber, Grant and asset_pipeline now pin the heads of amberframework/amber#1451,
crimson-knight/grant#73 and amberframework/asset_pipeline#25, with the Amber
tree and Minecart sha256-v2 checksum for that commit. These are integration
pins; they become release-tag commits before this branch merges.
scripts/check_generated_app_linkage.sh generates the default SQLite app,
builds it, and fails when its binary links libpcre2 or holds a pcre2_ symbol;
it repeats the check after a scaffold adds a Grant model, and a Regex control
program proves the check can fail. The generated-app-linkage CI job runs it on
ubuntu-24.04 and macos-15 with sha256-verified Crystal 1.22.2.
@crimson-knight

Copy link
Copy Markdown
Member Author

Replaced by #57, which pins the released Amber v2.0.0-beta.11, Grant v0.24.0 and asset_pipeline v0.38.0 and carries this branch's linkage gate.

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