Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Dependency on Microsoft.Kiota.Abstractions >= v1.9.1 causes issues #264

Closed
kfcampbell opened this issue Jun 13, 2024 · 5 comments
Closed

Comments

@kfcampbell
Copy link
Member

Hi! I think this is a similar issue to #256. In src/Microsoft.Kiota.Http.HttpClientLibrary.csproj, there's a dependency on Microsoft.Kiota.Abstractions Version="[1.9.1, 2.0.0)".

However, when running the Kiota CLI (v1.15.0) kiota info -l CSharp --json, the dependency given is

{
      "name": "Microsoft.Kiota.Abstractions",
      "version": "1.9.0"
},

Since our project treats warnings as errors, this breaks us at build, but otherwise would break at runtime I believe. Example output of building a .csproj that installs recommended packages based upon that kiota info output:

/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/src/GitHub.Octokit.SDK.csproj : error NU1605: Warning As Error: Detected package downgrade: Microsoft.Kiota.Abstractions from 1.9.1 to 1.9.0. Reference the package directly from the project to select a different version.  [/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/GitHub.Octokit.sln]
/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/src/GitHub.Octokit.SDK.csproj : error NU1605:  GitHub.Octokit.SDK -> Microsoft.Kiota.Http.HttpClientLibrary 1.4.3 -> Microsoft.Kiota.Abstractions (>= 1.9.1 && < 2.0.0)  [/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/GitHub.Octokit.sln]
/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/src/GitHub.Octokit.SDK.csproj : error NU1605:  GitHub.Octokit.SDK -> Microsoft.Kiota.Abstractions (>= 1.9.0) [/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/GitHub.Octokit.sln]
/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/test/Tests.csproj : error NU1605: Warning As Error: Detected package downgrade: Microsoft.Kiota.Abstractions from 1.9.1 to 1.9.0. Reference the package directly from the project to select a different version.  [/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/GitHub.Octokit.sln]
/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/test/Tests.csproj : error NU1605:  Tests -> GitHub.Octokit.SDK -> Microsoft.Kiota.Http.HttpClientLibrary 1.4.3 -> Microsoft.Kiota.Abstractions (>= 1.9.1 && < 2.0.0)  [/home/kfcampbell/github/dev/source-generator/stage/dotnet-sdk/GitHub.Octokit.sln]

Please let me know if you'd like more information!

@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Jun 13, 2024
@andrueastman
Copy link
Member

Thanks for raising this @kfcampbell

For now, I would suggest updating abstractions to the latest version to resolve this (v1.9.6) as the Kiota info command in 1.5.0 is showing 1.9.0 due a misaligned configuration (see microsoft/kiota#4825). We've since resolved this, and future versions should show the correct version.

Please try this out and let us know if this is helpful!

@andrueastman andrueastman moved this from Needs Triage 🔍 to Todo 📃 in Kiota Jun 14, 2024
@andrueastman andrueastman added the status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close label Jun 14, 2024
@kfcampbell
Copy link
Member Author

Unfortunately this isn't easily done, as our tooling treats the kiota info command as a source of truth and parses the results of that command to install dependencies. Right now as a workaround we're pinning to Kiota v1.14.0.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jun 14, 2024
@baywet
Copy link
Member

baywet commented Jun 17, 2024

Thanks for the additional information. If you use the last preview version it should solve your issue.
Also, since this has "already been solved" and only needs to be released on a mainline release, we're unlikely to make any additional change at this point.

@baywet baywet added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs: Attention 👋 labels Jun 17, 2024
@kfcampbell
Copy link
Member Author

Okay! It sounds like the best course of action for us then is to stay pinned on v1.14.0 for now, skip v1.15.0, and go straight to v1.16.0 when it releases next month.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jun 17, 2024
@baywet
Copy link
Member

baywet commented Jun 17, 2024

I'm going to go ahead and close this issue since there's no further action on kiota's side. Let us know if you need anything else!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants