pub fn parse_schema_unvalidated(source: &str) -> Result<Schema, SchemaError>Expand description
Parse a .cstack source into a cratestack_core::Schema WITHOUT
running [validate::validate_schema].
Prefer parse_schema for any new source — this exists for two
legitimate cases where the validated pipeline understates what a
Schema value can actually be:
- A committed
migrations/*/schema.snapshot.jsoncan predate a validation rule added later.cratestack-cli’smigrate diffdeserializes that “previous” snapshot directly and never re-runsvalidate_schemaon it (only the new side, parsed fresh from the.cstacksource, goes throughparse_schema_file) — so an emitter can still legitimately be handed a shape the current validator would reject at the source level. - Tests that deliberately exercise an emitter’s rendering logic for
such an already-invalid shape, to prove the emitter itself still
behaves sanely if that shape arrives via (1) — see
cratestack-migrate’semit::postgres::tests::enumsfor an example (a list-valued enum column, rejected by cratestack#229/#236 at parse time, but still real input to the Postgres emitter via a pre-#236 snapshot).