Bever is pre-alpha. The language, APIs, and packages will change in breaking ways between releases.Bever is pre-alpha. Expect breaking changes.Read more
Skip to content

Diagnostics ​

bever check, bever compile, bever dev, and the VS Code extension report problems as:

text
bev/app.bev:12:5: error BEV3032: Unknown type 'Currency'. Use Text, Boolean, Int, ...

Errors stop compilation; warnings do not. Messages below show placeholders such as {name} where the actual message names your entity, field, or value.

Syntax ​

CodeSeverityMessage
BEV0001ErrorEntity name is required.
BEV0002ErrorIndented member is not inside a declaration.
BEV0003ErrorUnknown declaration '{keyword}'. Expected Import, Entity, Identity, Role, or Action. For planned keywords: '{keyword}' is not supported yet.
BEV0004ErrorUnknown entity member '{keyword}'. Expected Field, Rule, or Present. For planned keywords such as State or Computed: '{keyword}' is not supported yet.
BEV0005ErrorField name is required.
BEV0006ErrorField '{name}' requires a type.
BEV0009ErrorUnknown action member '{keyword}'. Expected By, OrderBy, or SearchBy. For planned keywords such as Rule (rules on actions): '{keyword}' is not supported yet.
BEV0010ErrorPresent does not accept arguments.
BEV0012ErrorUse spaces, not tabs, for indentation.
BEV0013ErrorImport takes entity names and a quoted .bev path, for example 'Import Customer, Product From "sales.bev"'.
BEV0014ErrorOnly entities can be exported: 'Export Entity <Name>'.

Entities and fields ​

CodeSeverityMessage
BEV1001ErrorDuplicate entity '{entity}'.
BEV1003ErrorEntity name 'Identity' is reserved for the built-in identity target.
BEV1004ErrorEntity name '{entity}' must start with a letter and contain only letters and digits.
BEV1005ErrorEntities '{existing}' and '{entity}' would share the HTTP route '/{route}'. Rename one of them.
BEV1010ErrorField name '{field}' must start with a letter and contain only letters and digits.
BEV1011Error'{field}' is a system field that every entity already has. Choose another name.
BEV1012ErrorDuplicate field '{field}' on entity '{entity}'.

Exports and imports ​

CodeSeverityMessage
BEV1020ErrorImport path '{path}' does not name a .bev file of this model.
BEV1021Error'{path}' declares no entity '{entity}'. Or, for an entity without Export: '{entity}' is not exported. Declare it as 'Export Entity {entity}' in '{path}'.
BEV1022Error'{entity}' is already declared or imported in this file.
BEV1023ErrorEntity '{entity}' is declared in '{file}'. Export it there and add 'Import {entity} From "{path}"' to use it here.

Actions ​

CodeSeverityMessage
BEV2001ErrorAction requires a verb and entity.
BEV2002ErrorAction references unknown entity '{entity}'.
BEV2003ErrorUnsupported action verb '{verb}'.
BEV2004ErrorDuplicate action '{verb} {entity}'.
BEV2005ErrorIdentity is a reserved system target and does not support ordinary actions.
BEV2006Error'As <Name>' names a picker: it is valid only as 'Action Pick <Entity> As <Name>' with an identifier name.
BEV2007ErrorAction '{verbs} {entity}' must say who may perform it, for example 'By Authenticated'.

Types, relationships, and rules ​

CodeSeverityMessage
BEV3000ErrorRelationship target 'Identity' requires a top-level Identity declaration.
BEV3001ErrorRelationship target '{target}' is not a declared entity.
BEV3003ErrorUnsupported field type syntax '{text}'.
BEV3004ErrorText length must be a positive integer, for example Text(200).
BEV3005ErrorConditional rules ('By ... Where ...') are not supported yet. See https://bever.dev/roadmap.
BEV3006Error'By' needs a subject: Anyone, Authenticated, a role, or a field.
BEV3007ErrorOrderBy requires a field and an optional Asc or Desc direction, for example 'OrderBy DueDate Desc'.
BEV3008ErrorOrderBy direction must be Asc or Desc.
BEV3010ErrorField paths have no leading '/'. Write '{field}' instead of '/{field}'.
BEV3012ErrorOnDelete behavior must be Restrict, Cascade, or SetNull, not '{onDelete}'.
BEV3013ErrorOnDelete SetNull requires a nullable relationship.
BEV3014ErrorSearchBy is valid only under Action Read or Action Pick.
BEV3015ErrorSearchBy needs at least one field, for example 'SearchBy Name'.
BEV3017ErrorSearchBy references unknown field '{field}' on entity '{entity}'.
BEV3018ErrorDuplicate SearchBy declaration.
BEV3019ErrorSearchBy field '{field}' does not have a supported searchable type.
BEV3020Error'By {field}' needs '{field}' to reference Identity, for example 'Field {field} -> Identity', and a top-level Identity block.
BEV3021Error'By {text}' names no role or field. Use 'By Anyone', 'By Authenticated', 'By <Role>' with a declared 'Role {text}', or 'By <Field>' with a field that references Identity.
BEV3022ErrorRelationship target 'Identity' cannot be mixed with application targets.
BEV3024ErrorRelationship clauses are 'OnDelete <Behavior>' and 'Pick <Picker>', each at most once.
BEV3025ErrorSearchBy under 'Action Read {Entity}' is unused because 'Action Pick {Entity}' decides picking; move SearchBy there.
BEV3026Error'{entity}.{field}' targets '{target}', which declares no Pick or Read, so no one can select it. Add 'Action Pick {target}' or remove '{field}' from Creating and Editing.
BEV3027Error'{entity}' has no field that can label its records, so it cannot be a relationship target. Add a Text field or 'Present RecordLabel'.
BEV3028WarningCreators may not see what they create: 'Read {Entity}' only shows records by {owner}, but 'Create {Entity}' lets them set {owner} to someone else. Use 'Action Create {Entity} By {owner}' to only allow creating records you own.
BEV3023ErrorOrderBy is not valid under Action Pick; picker order is fixed by label.
BEV3029ErrorOrderBy is valid only under Action Read.
BEV3030ErrorDuplicate OrderBy declaration.
BEV3031ErrorType '{head}' is not supported yet. Also reported for paths through relationships such as 'Owner/Team'. See https://bever.dev/roadmap.
BEV3032ErrorUnknown type '{name}'. Use Text, Boolean, Int, Decimal, Money, Date, DateTime, Time, Email, Phone, Url, Enum(...), or '-> Entity'.
BEV3033ErrorType '{name}' does not take arguments.
BEV3034ErrorDefault value for '{field}' must be {expected}, or is longer than the field allows. Relationships cannot have defaults.
BEV3035ErrorEnum option '{option}' must be a name that starts with a letter, for example Enum(Low, Medium, High).
BEV3036Error'By {name}' is ambiguous: '{name}' is both a field of '{entity}' and a role. Rename one of them.

Presentation ​

CodeSeverityMessage
BEV4001ErrorA problem inside a Present block: an unknown member, a duplicate, an invalid value, or a field that does not belong to the entity. The message names the exact problem.

Identity ​

CodeSeverityMessage
BEV5001ErrorDuplicate Identity declaration.
BEV5002ErrorDuplicate Identity Registration declaration.
BEV5003ErrorDuplicate Identity Summary declaration.
BEV5004ErrorUnsupported Identity member '{Text}'.
BEV5005ErrorGeneric Enable syntax is not supported. Use top-level 'Identity' to enable Bever identity.
BEV5006ErrorIdentity declaration does not accept inline arguments. Use top-level 'Identity' with indented members.
BEV5007ErrorRole '{role}' requires a top-level Identity declaration.
BEV5008ErrorDuplicate role '{role}'.
BEV5009ErrorRole name '{role}' must start with a letter and contain only letters and digits. Also: Role needs a name, for example 'Role Agent'; '{role}' is reserved and cannot be a role name (Anyone, Authenticated, Administrator, Identity).
BEV5010ErrorRoles have no members: '{keyword}' is not supported yet. See https://bever.dev/roadmap for planned language features.

Validation rules ​

CodeSeverityMessage
BEV6001ErrorA problem in a Rule: a missing condition or message, an unknown field, a value that does not fit its field, a comparison the field's type does not support (such as < on text, or a relationship compared with anything but Null), fields of different types, or invalid syntax. The message names the exact problem. Field paths with a leading / or through relationships report BEV3010 and BEV3031.

Released under the Apache License 2.0. Documentation under CC BY 4.0.