bcherny/json-schema-to-typescript

Maximum call stack size exceeded

Open

#482 ouverte le 11 août 2022

Voir sur GitHub
 (3 commentaires) (1 réaction) (0 assignés)TypeScript (449 forks)github user discovery
bughelp wanted

Métriques du dépôt

Stars
 (3 302 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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)
]

Guide contributeur