Amber 2.0.0-beta.11
Amber 2.0.0-beta.11 carries the regex-free path from a JSON API to the whole
default app. An app made with amber new -d sqlite, with a Grant model and
asset_pipeline, links no PCRE2.
What changed
- No PCRE2 in a default app. Grant 0.24.0 and asset_pipeline 0.38.0 keep
Regexoff their default require paths. The app Amber CLI 2.0.11 generates
shows nolibpcre2inotool -Lorlddand nopcre2_symbol innm,
before and afteramber generate scaffoldadds a Grant model. Amber CLI CI
runs this check on macOS and Linux, and its control program that usesRegex
must show PCRE2. respond_withtakes aNamedTuple(#1425, #1451). The documented call now
compiles. The tuple becomesHash(String, JSON::Any)through its JSON form, so
Int32, arrays and nested tuples work as values.scripts/check_linkage.sh
answers one route this way.respond_withtakes any JSON-serializableHash(#1451).
Hash(String, String),Hash(Symbol, Int32)and the like used to fail to
compile.Acceptq values count (#1451).respond_withpicks among the formats the
response schema declares and honorsq.application/cbor;q=0no longer
answers CBOR, and a JSON-only schema answers JSON when JSON is acceptable.- A starting heap for the garbage collector (#1452).
server.gc_initial_heap_mibgrows the collector's heap to that many MiB in
every server process before it takes requests, and
AMBER_SERVER_GC_INITIAL_HEAP_MIBoverrides it. The default, 0, keeps the
collector's own starting size, so existing apps see no change. Amber CLI 2.0.11
writes 16 into every generated environment file.
Keeping your app free of PCRE2
An app links PCRE2 again when it uses any of these, and it keeps working:
pattern:,filename_pattern:or a customformat:on a schema field, and
validates_patternor a customvalidates_format- a
Regexpassed toPipe::CORS,Validator::PatternorValidator::Format - Markdown,
strip_tags, and the otherStringchecks such asemail?andphone? request.cookies; readcookiesinsteadrequire "grant/regex"(forvalidates_format_of, the SQLiteREGEXP
operator and Regex entries infilter_attributes), and Grant's schema
tooling, schema tenancy and shardingRegexin your own code
Breaking changes
None in Amber. Grant 0.24.0 moves validates_format_of behind
require "grant/regex"; its release notes list the rest.
CHANGELOG.md has the complete list.
Upgrading
Use Amber CLI 2.0.11 for new apps. For an existing app, pin the release commit
in shard.yml, along with Grant v0.24.0 and asset_pipeline v0.38.0, run
minecart update amber grant asset_pipeline, and run amber setup:agent. To
start the collector's heap at the size new apps use, set
gc_initial_heap_mib: 16 under server: in each config/environments/*.yml.
Pin this release
Commit: f987f1bb19b789f8f14b000b6ee00ed496fe6cbb
Tree: fc2433e6cf3b55fc779977cc70b1270c7910c920
Tarball: amber-2.0.0-beta.11.tar.gz (git archive --format=tar.gz --prefix=amber-2.0.0-beta.11/ f987f1bb19b789f8f14b000b6ee00ed496fe6cbb)
Tarball sha256: 09fac3d5ca8832d321713e56c05d82350b087d0280f6d0d3b6644f4868889b62
shard.lock checksum (Minecart 2025.11.25.9 and newer): sha256-v2:732bd8a19fed53e2e8ef0ee768dab03466abf502324d55de5f81961ac75456fa
The tarball was built twice from the commit and gave the same sha256 both times.