Skip to content

Follow core's rename of format to unsafe-format - #30

Draft
hellerve wants to merge 1 commit into
masterfrom
unsafe-format
Draft

hellerve wants to merge 1 commit into
masterfrom
unsafe-format

Conversation

@hellerve

@hellerve hellerve commented Sep 5, 2026

Copy link
Copy Markdown
Member

Carp core is renaming the format interface to unsafe-format (carp-lang/Carp#1432: format is a thin single-argument printf wrapper with no check that the string carries exactly one directive). Merge after that lands; until then CI is red because unsafe-format does not exist yet.

  • the 14 (format "%0Nd" ...) calls in Datetime.strftime become unsafe-format
  • Datetime.format becomes Datetime.unsafe-format, and implements unsafe-format
  • its docstring now says that this implementation is directive-safe: it expands the first directive and copies the rest of s verbatim, so nothing reaches printf. It carries the interface's name, not its hazard
  • reflowed by carp-fmt where the longer name crossed the wrap column

340/340 green against a local core carrying the rename.

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