dotnet / TorchSharp

A .NET library that provides access to the library that powers PyTorch.
MIT License
1.37k stars 177 forks source link

Suppress the API breakchange introduced by PR 1354 and bump up minor version #1356

Open LittleLittleCloud opened 2 months ago

LittleLittleCloud commented 2 months ago

1354 introduce API break change, we need to check in a suppression file to overpass the API compatibility check and bump the version

image

NiklasGustafsson commented 2 months ago

Let's fix the API breakage instead of suppressing it. @yueyinqiu -- if you could resubmit your earlier PR, without removing the single-parameter 'Connect', that would be helpful.

yueyinqiu commented 2 months ago

Hmm... I will check that. I just considered about the compatibility of the source code and ignored the binary compatibility.

I think that pr could be modified to hold the extra overloads thus keeping binary compatibility, but I wonder what should we do if there have to be some API changes? I think in the current stage API changes are still common and welcomed.

yueyinqiu commented 2 months ago

I'm also facing some problems when checking the API compatibility locally.

I tried dotnet pack, and Microsoft.DotNet.ApiCompat.Task.ValidatePackageTask failed because of the non-existence of ...\TorchSharp\pkg\TorchAudio\torchaudio\0.102.6\torchaudio.0.102.6.nupkg.

The first problem is that actually it should be compared with v0.102.7 instead of v0.102.6, since I'm developing for the future v0.102.8. Second, what's the best to approach to get the previous version? Here are many packages and for each one we have to create a directory and paste the file. So manually downloading them from nuget.org seems to be a bit annoying... Third, we should add the check into the checks of pull requests.

Actually I still believe it's too early to check about the API compatibilities.