Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum call stack size exceeded #2744

Open
rospe opened this issue Nov 22, 2024 · 0 comments
Open

Maximum call stack size exceeded #2744

rospe opened this issue Nov 22, 2024 · 0 comments

Comments

@rospe
Copy link

rospe commented Nov 22, 2024

Describe the bug
When running the linter with (lots) of AsyncAPI files, containing many events and schemas, the linter fails with:

...
Linting /builds/tedp/event-registry/events/events/reservation/programme-change/programme-change.yml
Error running Spectral!
Error #1: Maximum call stack size exceeded
          at isFrozen                                                                                                                                               
          at d         ../../../../snapshot/project/node_modules/immer/src/utils/plugins.ts:55   return plugin                                                      
          at P         ../../../../snapshot/project/node_modules/immer/src/core/finalize.ts:155  function maybeFreeze(scope: ImmerScope, value: any, deep = false) {
          at           ../../../../snapshot/project/node_modules/immer/src/core/finalize.ts:105  rootScope.inversePatches_!                                         
          at           ../../../../snapshot/project/node_modules/immer/src/utils/common.ts:96    obj.forEach((entry: any, index: any) => iter(index, entry, obj))

To Reproduce

  1. Given many files
  2. Run this CLI command
      shopt -s globstar
      spectral lint ./events/**/*.yml --verbose
  1. See error

Expected behavior
No error :-)

Additional context
As a workaround, we use

      shopt -s globstar
      for file in ./events/**/*.yml; do
        echo "Validating file '$file'..."
        spectral lint $file
      done
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

No branches or pull requests

1 participant