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

Remove Analyzer meta-package in 5.0.0 #1509

Closed
blairconrad opened this issue Nov 29, 2018 · 12 comments
Closed

Remove Analyzer meta-package in 5.0.0 #1509

blairconrad opened this issue Nov 29, 2018 · 12 comments

Comments

@blairconrad
Copy link
Member

There's no need to subscribe to an analyzer that examines both C# and VB code.

@blairconrad
Copy link
Member Author

Anyone know what the best practice around removing a package is? Do we replace it with a README, or just leave the subscribers stuck on the old version?

@thomaslevesque
Copy link
Member

Anyone know what the best practice around removing a package is? Do we replace it with a README, or just leave the subscribers stuck on the old version?

Is it even possible to replace with a README? At some point, Json.NET showed a readme file upon install, but I think it's no longer possible.
I think we could just unlist it and stop updating it.

@thomaslevesque
Copy link
Member

Or publish an update with a fake warning that tells the user to switch to the language specific package.

@blairconrad
Copy link
Member Author

You mean a diagnostic that would fire with that message?

@thomaslevesque
Copy link
Member

It was my first thought. But now I think it could just be a MSBuild warning. The package would just contain a MSBuild file that would emit this warning.

@thomaslevesque
Copy link
Member

The only problem I see with this approach is that ideally, the package would have to be unlisted so that people don't install it by accident... but if it's unlisted, people using the previous version won't get the update.

@thomaslevesque
Copy link
Member

thomaslevesque commented Nov 29, 2018

I have a working prototype, with a target like this:

<Project>

    <Target Name="WarnAboutWrongAnalyzerPackage" AfterTargets="AfterBuild">
        <Warning Text="The FakeItEasy.Analyzer package is no longer maintained and does nothing. Use the C# specific analyzer package instead: FakeItEasy.Analyzer.CSharp."
                 Condition=" '$(Language)' == 'C#' " />
        <Warning Text="The FakeItEasy.Analyzer package is no longer maintained and does nothing. Use the VB.NET specific analyzer package instead: FakeItEasy.Analyzer.VisualBasic."
                 Condition=" '$(Language)' == 'VB' " />
    </Target>

</Project>

The package version will be fixed to 5.0.0.

However I wonder how to handle it in the build, since we only need to do it once. Deployment will work the first time, but we'll have to disable deployment of this package afterwards, since an existing package can't be redeployed with the same version.

@thomaslevesque
Copy link
Member

Maybe we should just deploy it manually and forget about it...

@blairconrad
Copy link
Member Author

I love it.
And yes, I think manually deploying once and removing the package from our repo once we hit 5.0.0 is perfect.

@thomaslevesque
Copy link
Member

This could be useful, unfortunately it's not ready yet...

https://github.com/NuGet/Home/wiki/Deprecate-packages

@thomaslevesque
Copy link
Member

The nuspec and targets for the new package (to be built and deployed manually when we release 5.0.0) can be found here: https://gist.github.com/thomaslevesque/289b9f917a129890bed04dd0320e10b1

@thomaslevesque
Copy link
Member

This change has been released in FakeItEasy 5.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants