Handling of transitive conflicts at any depth when updating

Aperta
#673 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
18/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
devtools

Direzione di ricerca

The update logic for transitive packages lives in the dotnet-outdated tool's NuGet resolution code, which the issue does not name a file for. Start by finding where the -u update and -t/-td transitive options are handled, then reproduce with the two PackageReference entries from the issue. Done would mean the tool picks versions that resolve without conflicts, but the issue asks for a new -safe mode and has one comment and no decision, so it needs maintainer input first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Here is a situation that will lead to a failed project after "dotnet outdated -u" command

<Project Sdk="Microsoft.NET.Sdk.Web">

	<PropertyGroup>
		<TargetFramework>net8.0</TargetFramework>
	</PropertyGroup>

	<ItemGroup>
		<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.5" />
		<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />

dotnet outdated proposes Microsoft.AspNetCore.Mvc.Testing 8.0.16 (latest supported by sdk 8, higher versions require sdk 9) and Microsoft.EntityFrameworkCore.InMemory 9.0.5 (supported in sdk 8)

that leads to conflicts, one of them on Microsoft.Extensions.DependencyInjection.Abstractions

  • Microsoft.AspNetCore.Mvc.Testing 8.0.16 requires Microsoft.Extensions.DependencyInjection.Abstractions > 8.x (and so < 9.x)
  • Microsoft.EntityFrameworkCore.InMemory 9.0.5 requires Microsoft.Extensions.DependencyInjection.Abstractions > 9.x

is there a way to indicate to dotnet outdated to resolve to the latest versions without conflicts ?

I know we can use -t and -td options, but the goal here would be something like "dotnet outdated -u -safe" that will have "infinite" transitive analysis

Thanks in advance for your time

Lingua principale
C#
Stelle
1.7k
Fork
172
Merge medio
1g 19h
PR unite (30g)
39

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dotnet-outdated/dotnet-outdated

Tutte le issue di dotnet-outdated/dotnet-outdated

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.