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

$ref to original location not found in new refs collection #3546

Closed
erich-wang opened this issue Apr 21, 2020 · 4 comments · Fixed by Azure/perks#131
Closed

$ref to original location not found in new refs collection #3546

erich-wang opened this issue Apr 21, 2020 · 4 comments · Fixed by Azure/perks#131
Labels
AutoRest v3 Related to AutoRest v3 Core OpenAPI 2 to 3 Converter P0 - Critical Critical Issue - blocking

Comments

@erich-wang
Copy link
Member

Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  AutoRest code generation utility [cli version: 3.0.6221; node: v13.12.0, max-memory: 8192 gb]
  (C) 2018 Microsoft Corporation.
  https://aka.ms/autorest
     Loading AutoRest core      'C:\Users\v-lipyo\.autorest\@[email protected]\node_modules\@autorest\core\dist' (3.0.6280)
     Initial configuration file 'file:///C:/AME/azure-rest-api-specs/specification/mixedreality/resource-manager/readme.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/inspect.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/directives.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/pipeline.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/loader-openapi.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/miscellaneous.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/patches.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-powershell.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-azureresourceschema.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-csharp.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-go.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-java.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-nodejs.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-php.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-python.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-ruby.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-typescript.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-validators.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-az.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/plugin-trenton.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/graphs.md'
     Including configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/core/resources/help-configuration.md'
     Loading AutoRest extension '@autorest/csharp-v3' (https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200415.7/autorest-csharp-v3-3.0.0-dev.20200415.7.tgz->3.0.0-dev.20200415.7)
     Including extension configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/csharp-v3/readme.md'
     Loading AutoRest extension '@autorest/modelerfour' (4.13.312->4.13.312)
     Including extension configuration file 'file:///C:/Users/v-lipyo/.autorest/@[email protected]/node_modules/@autorest/modelerfour/readme.md'
  VERBOSE [2.44 s]: Reading OpenAPI 2.0 file file:///C:/AME/azure-rest-api-specs/specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2019-12-02-preview/proxy.json
  VERBOSE [2.45 s]: Reading OpenAPI 2.0 file file:///C:/AME/azure-rest-api-specs/specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2019-12-02-preview/remote-rendering.json
  VERBOSE [2.47 s]: Reading OpenAPI 2.0 file file:///C:/AME/azure-rest-api-specs/specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2019-12-02-preview/spatial-anchors.json
  VERBOSE [2.51 s]: Reading $ref'd file file:///C:/AME/azure-rest-api-specs/specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2019-12-02-preview/common.json
  VERBOSE [2.52 s]: Reading $ref'd file file:///C:/AME/azure-rest-api-specs/specification/common-types/resource-management/v1/types.json
EXEC : error : $ref to original location 'file:///C:/AME/azure-rest-api-specs/specification/mixedreality/resource-manager/Microsoft.MixedReality/preview/2019-12-02-preview/common.json#/components/parameters/accountKeyRegenerateParameter' is not found in the new refs collection [D:\sdk\azure-sdk-for-net\sdk\mixedreality\Azure.Management.MixedReality\src\Azure.Management.MixedReality.csproj]
D:\sdk\azure-sdk-for-net\eng\CodeGeneration.targets(24,5): error MSB3073: The command "npx autorest@https://github.com/Azure/autorest/releases/download/autorest-3.0.6221/autorest-3.0.6221.tgz --version=3.0.6280 C:\AME\azure-rest-api-specs\specification\mixedreality\resource-manager\readme.md  --use=https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200415.7/autorest-csharp-v3-3.0.0-dev.20200415.7.tgz --output-folder=D:\sdk\azure-sdk-for-net\sdk\mixedreality\Azure.Management.MixedReality\src --title=Azure.Management.MixedReality --namespace=Azure.Management.MixedReality --shared-source-folder=D:\sdk\azure-sdk-for-net\eng\../sdk/core/Azure.Core/src/Shared/ --verbose" exited with code 1. [D:\sdk\azure-sdk-for-net\sdk\mixedreality\Azure.Management.MixedReality\src\Azure.Management.MixedReality.csproj]
@erich-wang erich-wang changed the title Failed to generate code for mixedreality [P1]Failed to generate code for mixedreality Apr 28, 2020
@pakrym pakrym transferred this issue from Azure/autorest.csharp Apr 29, 2020
@daviwil
Copy link
Contributor

daviwil commented Jun 12, 2020

Also present in Cognitive Services Common:

Error: $ref to original location 'https://github.com/Azure/azure-rest-api-specs/blob/d9cf7c7ed3d674ebd482836e82b274014245ae67/specification/cognitiveservices/data-plane/Common/Parameters.json#/components/parameters/ImageUrl' is not found in the new refs collection

@daviwil
Copy link
Contributor

daviwil commented Jun 17, 2020

Also reported by @jianghaolu in issue Azure/autorest.modelerfour#308 when generating Cognitive Services Face:

autorest --use=@autorest/[email protected] https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/Face/readme.md --java.output-folder=/Users/jianghlu/Documents/code/azure-sdk-for-java/sdk/faceapi/azure-ai-faceapi --java.namespace=com.azure.ai.faceapi

AutoRest code generation utility [cli version: 3.0.6187; node: v10.16.1, max-memory: 8192 gb]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/Users/jianghlu/.autorest/@[email protected]/node_modules/@autorest/core/dist' (3.0.6282)
   Loading local AutoRest extension '@autorest/java' (/Users/jianghlu/Documents/code/autorest.java.v3)
   Loading local AutoRest extension '@autorest/java.vanilla' (/Users/jianghlu/Documents/code/autorest.java.v3/javagen)
   Loading local AutoRest extension '@autorest/java.preprocessor' (/Users/jianghlu/Documents/code/autorest.java.v3/javagen/../preprocessor)
   Loading AutoRest extension '@autorest/modelerfour' (4.13.309->4.13.309)
  Error: $ref to original location 'file:///Users/jianghlu/Documents/code/azure-rest-api-specs/specification/cognitiveservices/data-plane/Common/Parameters.json#/components/parameters/ImageUrl' is not found in the new refs collection

https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json#L986

@daviwil daviwil changed the title [P1]Failed to generate code for mixedreality $ref to original location not found in new refs collection Jun 17, 2020
@daviwil daviwil transferred this issue from Azure/autorest.modelerfour Jul 17, 2020
@daviwil daviwil added the P0 - Critical Critical Issue - blocking label Jul 30, 2020
@daviwil daviwil added AutoRest v3 Related to AutoRest v3 Core Modeler OpenAPI 2 to 3 Converter and removed Modeler labels Oct 8, 2020
@MiYanni MiYanni mentioned this issue Nov 9, 2020
13 tasks
@daviwil
Copy link
Contributor

daviwil commented Dec 11, 2020

We'll have to ship a new version of AutoRest Core before this fix will be available, I'll try to get this done today.

@daviwil
Copy link
Contributor

daviwil commented Dec 11, 2020

Fix is out in @autorest/core 3.0.6339, you can get it by using autorest --reset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoRest v3 Related to AutoRest v3 Core OpenAPI 2 to 3 Converter P0 - Critical Critical Issue - blocking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants