Skip to content

zen check doen't report missing imported plugin #2393

@jaenyf

Description

@jaenyf

Description and expected behavior
Validating the schema with zen check reports no error when trying to import a missing plugin.

For instance, if using the @zenstackhq/plugin-policy without installing it, zen check fails on "Could not resolve reference to Attribute named '@@Allow'" but not when validating the

plugin policy {
   provider = '@zenstackhq/plugin-policy'
}

section, which is not consistent.

Environment :

  • ZenStack version: 3.3.3 (@zenstackhq/orm: v3.3.3 @zenstackhq/cli: v3.3.3, @zenstackhq/plugin-policy: v3.3.3)
  • Node.js version: 20.19.2
  • Package manager: npm

Steps to reproduce

npm create zenstack@latest test-allow-attr

cd test-allow-attr

nano zenstack/schema.zmodel
# => add 
#  plugin policy {
#    provider = '@zenstackhq/plugin-policy'
# }
# => and add
# @@allow('all', id == auth().id)

npx zen check
# zenstack/schema.zmodel:18:4 - Could not resolve reference to Attribute named '@@allow'.
# ✗ Schema validation failed.
# Schema contains errors. See above for details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions