You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiles first time. Add some newlines. Save the file. Kaboom.
raceback (most recent call last):
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/eng/scripts/setup/run_tsp.py", line 41, in <module>
codegen.CodeGenerator(output_folder=args.output_folder, cadl_file=args.cadl_file, **unknown_args).process()
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/__init__.py", line 343, in process
code_model = CodeModel(yaml_data=yaml_data, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 89, in __init__
self.sort_model_types()
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 385, in sort_model_types
sorted_object_schemas.extend(self._sort_model_types_helper(schema, seen_schema_names, seen_schema_yaml_ids))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 362, in _sort_model_types_helper
raise ValueError(f"We have already generated a schema with name {current.name}")
ValueError: We have already generated a schema with name Something
Emitter "@azure-tools/typespec-python" crashed! This is a bug.
Please file an issue at https://github.com/Azure/autorest.python/issues
Error: Command failed: /Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/venv/bin/python /Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/eng/scripts/setup/run_tsp.py --package-version=1.0.0b1 --generate-packaging-files=true --flavor=azure --package-dir=azureaifoundry --package-name=azureaifoundry --models-mode=dpg --package-mode=azure-dataplane --enable-typespec-namespace=false --emit-cross-language-definition-file=true --from-typespec=true --output-folder=/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/tsp-output/@azure-tools/typ
Traceback (most recent call last):
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/eng/scripts/setup/run_tsp.py", line 41, in <module>
codegen.CodeGenerator(output_folder=args.output_folder, cadl_file=args.cadl_file, **unknown_args).process()
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/__init__.py", line 343, in process
code_model = CodeModel(yaml_data=yaml_data, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 89, in __init__
self.sort_model_types()
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 385, in sort_model_types
sorted_object_schemas.extend(self._sort_model_types_helper(schema, seen_schema_names, seen_schema_yaml_ids))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 362, in _sort_model_types_helper
raise ValueError(f"We have already generated a schema with name {current.name}")
ValueError: We have already generated a schema with name Something
Emitter "@azure-tools/typespec-python" crashed! This is a bug.
Please file an issue at https://github.com/Azure/autorest.python/issues
Error: Command failed: /Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/venv/bin/python /Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/eng/scripts/setup/run_tsp.py --package-version=1.0.0b1 --generate-packaging-files=true --flavor=azure --package-dir=azureaifoundry --package-name=azureaifoundry --models-mode=dpg --package-mode=azure-dataplane --enable-typespec-namespace=false --emit-cross-language-definition-file=true --from-typespec=true --output-folder=/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/tsp-output/@azure-tools/typespec-python --cadl-file=/var/folders/xx/z3qhdzcs091cvczt40lly1c00000gn/T/cadl-codegen/python-yaml-path773df198-c0bd-4da9-a6ab-508f8b28f29f.yaml
Traceback (most recent call last):
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/eng/scripts/setup/run_tsp.py", line 41, in <module>
codegen.CodeGenerator(output_folder=args.output_folder, cadl_file=args.cadl_file, **unknown_args).process()
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/__init__.py", line 343, in process
code_model = CodeModel(yaml_data=yaml_data, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 89, in __init__
self.sort_model_types()
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 385, in sort_model_types
sorted_object_schemas.extend(self._sort_model_types_helper(schema, seen_schema_names, seen_schema_yaml_ids))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/generator/pygen/codegen/models/code_model.py", line 362, in _sort_model_types_helper
raise ValueError(f"We have already generated a schema with name {current.name}")
ValueError: We have already generated a schema with name Something
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at $onEmit (file:///Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/http-client-python/dist/emitter/emitter.js:163:13)
at async Object.$onEmit [as emitFunction] (file:///Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@azure-tools/typespec-python/dist/src/emitter.js:7:5)
at async runEmitter (file:///Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/compiler/dist/src/core/program.js:368:13)
at async compile (file:///Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/compiler/dist/src/core/program.js:124:9)
at async run (file:///Users/johanstenberg/ongoing/uxagent/agent-first-sdk/typespec/node_modules/@typespec/compiler/dist/src/core/cli/actions/compile/compile.js:63:24)
--------------------------------------------------
Library Version 0.38.4
TypeSpec Compiler Version 0.65.3
--------------------------------------------------
Describe the bug
Looks like data is being retained across emit calls....
Reproduction
Compiles first time. Add some newlines. Save the file. Kaboom.
Checklist
The text was updated successfully, but these errors were encountered: