Skip to content

Maximum call stack size exceeded #482

Open
@mattem

Description

@mattem

When running against the CircleCI configuration schema here,
https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/circleciconfig.json a max call stack size error is thrown.

This seems to be caused by the circular references on the logical definitions within the schema.

Using version 11.0.2 of json-schema-to-typescript

[
  RangeError: Maximum call stack size exceeded
      at memoized (/private/var/tmp/_bazel_matt/1074e32c37c3b3e7bc10b426cb247bb7/sandbox/darwin-sandbox/129/execroot/__main__/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/rosetta/src/types/circleci_dts__js_binary.sh.runfiles/__main__/node_modules/.aspect_rules_js/lodash@4.17.21/node_modules/lodash/lodash.js:10612:30)
      at /private/var/tmp/_bazel_matt/1074e32c37c3b3e7bc10b426cb247bb7/sandbox/darwin-sandbox/129/execroot/__main__/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/rosetta/src/types/circleci_dts__js_binary.sh.runfiles/__main__/node_modules/.aspect_rules_js/json-schema-to-typescript@11.0.2/node_modules/json-schema-to-typescript/dist/src/generator.js:260:81
      at Array.map (<anonymous>)
      at generateSetOperation (/private/var/tmp/_bazel_matt/1074e32c37c3b3e7bc10b426cb247bb7/sandbox/darwin-sandbox/129/execroot/__main__/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/rosetta/src/types/circleci_dts__js_binary.sh.runfiles/__main__/node_modules/.aspect_rules_js/json-schema-to-typescript@11.0.2/node_modules/json-schema-to-typescript/dist/src/generator.js:260:30)
      at generateRawType (/private/var/tmp/_bazel_matt/1074e32c37c3b3e7bc10b426cb247bb7/sandbox/darwin-sandbox/129/execroot/__main__/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/rosetta/src/types/circleci_dts__js_binary.sh.runfiles/__main__/node_modules/.aspect_rules_js/json-schema-to-typescript@11.0.2/node_modules/json-schema-to-typescript/dist/src/generator.js:249:20)
      at generateTypeUnmemoized (/private/var/tmp/_bazel_matt/1074e32c37c3b3e7bc10b426cb247bb7/sandbox/darwin-sandbox/129/execroot/__main__/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/rosetta/src/types/circleci_dts__js_binary.sh.runfiles/__main__/node_modules/.aspect_rules_js/json-schema-to-typescript@11.0.2/node_modules/json-schema-to-typescript/dist/src/generator.js:143:16)
      at memoized (/private/var/tmp/_bazel_matt/1074e32c37c3b3e7bc10b426cb247bb7/sandbox/darwin-sandbox/129/execroot/__main__/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/rosetta/src/types/circleci_dts__js_binary.sh.runfiles/__main__/node_modules/.aspect_rules_js/lodash@4.17.21/node_modules/lodash/lodash.js:10620:27)
      at /private/var/tmp/_bazel_matt/1074e32c37c3b3e7bc10b426cb247bb7/sandbox/darwin-sandbox/129/execroot/__main__/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/rosetta/src/types/circleci_dts__js_binary.sh.runfiles/__main__/node_modules/.aspect_rules_js/json-schema-to-typescript@11.0.2/node_modules/json-schema-to-typescript/dist/src/generator.js:271:72
      at Array.map (<anonymous>)
      at generateInterface (/private/var/tmp/_bazel_matt/1074e32c37c3b3e7bc10b426cb247bb7/sandbox/darwin-sandbox/129/execroot/__main__/bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/rosetta/src/types/circleci_dts__js_binary.sh.runfiles/__main__/node_modules/.aspect_rules_js/json-schema-to-typescript@11.0.2/node_modules/json-schema-to-typescript/dist/src/generator.js:269:14)
]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions