-
Notifications
You must be signed in to change notification settings - Fork 643
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
Provide a way to limit which package installation instructions to display #8532
Comments
"For example, it doesn't make sense for my package (FluentValidation), which is neither a Cake addin nor a CLI tool, but this is still shown:" Not sure if you misunderstood what Cake does here, but it doesn't have to be a Cake addin to be used from a Cake script... Your request reads to me like if I would have written: "I doesn't make sense for Spectre.Console to have the Paket tab since I'm not using it" |
Hey @JeremySkinner FluentValidation is absolutely a valid package for the Cake It seems you're not familiar with what it means to load a NuGet Package via the
Therefore, any NuGet package that contains .NET assemblies are valid Cake FluentValidation in particular can be very useful to perform validations in Cake scripts, and if you're interested I'm happy to send a PR to the FluentValidation repo with examples on how to leverage FluentValidation in Cake scripts! 🍰 |
Hi @augustoproiete thanks for the more detailed explanation. One of the packages I mentioned ( For the core library ( Edit For example, something similar is already done for .NET tools. .NET Tool packages have instructions for I think a lot of packages would fall under at least one of these scenarios, and it'd be nice to streamline/tailor the install instructions as much as possible, within reason, to reduce confusion. I hope that clarifies my thinking a bit. |
Hey @JeremySkinner, fundamentally the Cake tab contains instructions on how to consume a package in a Cake script... If you're not a Cake user, you just ... don't ... click on that tab (?) 😄 🤷. I honestly don't see what's confusing about it. By the same token, I don't use Paket, and I don't use C#/F# Interactive... So... I just don't click on any of these others tabs, ever... 😄 Are you confused by the "Script & Interactive" tab as well? If More importantly, at its core, Cake is a C# code runner, so there's nothing preventing one to spin up an ASP .NET web app from a Cake script if they wanted to, and use The point is that if someone wanted to use That said, it would be great if package authors could include more metadata in the package that could allow for more tailored install instructions. I proposed some improvements to how |
I don't really think the two are analogous. As a replacement package manager, it seems perfectly valid to have instructions for Paket available, even if you don't use it yourself.
I believe it's confusing to have instructions for Additionally, the Cake tab only shows Conversely, the CLI Global tool and CLI Local tool tabs are hidden for non-tool packages. So essentially I'd like to see an extension of this, where I can hide
Yes, I think that would probably make sense too, in the same way that the Script/Interactive tab isn't shown for .NET CLI Tools, although I'd still take being able to hide
I hadn't seen that before, but just had a read through it seems sensible - I like the idea of using |
Confusing to whom? The
Correct. And that's driven by the
It's the same purpose. The issue is that if you try to install a package that has a custom package type, it doesn't work today. You can read more about it in the links below:
I suggest you reword the issue title and description to reflect that, as it's not about Cake, but about providing more metadata in packages, to enable the NuGet Gallery to provide a more personalized experience on each package. |
Sure, I've updated the issue title/desc to make it more generic |
In light of this discussion I am wondering whether it would be prudent to halt adding new tabs to the gallery (currently only #8511 as far as I can see..) until a good solution for handling "3rd party installation instructions" is provided. |
For those participating in this issue, please feel free to provide your thoughts regarding the addition of the With respect to this current proposal, we would be more than welcoming of a proposal & community ideas/PRs/etc as to limiting package installation instructions. https://github.com/NuGet/Home/tree/dev/meta#how-do-i-create-a-proposal In the meantime, I have added a question to our upcoming NuGet.org survey to understand how people feel about the installation instructions & I can share that with everyone to provide some data. We also can help others understand what tabs are mostly used in addition here. |
@JonDouglas do you mean sharing the questions or sharing the results? In any case, I'd be interested in both :) |
@matkoch the latter. The survey is going up any day with the next deployment. Keep eyes out on NuGet.org for a banner! |
As promised, here are some preliminary results with ~300 responses. Some of the free responses were around:
For what it's worth, users also found "Instructions on installing a package in my project" (5.61 points) to be the highest satisfaction of various browsing options. Let's continue the conversation about how we can make the options more precise or context aware. But as of right now, I think we shouldn't focus the conversation on too many or too little options given most people feel like there's enough or just don't care. |
Background
When viewing a package, various installation instructions are shown under different tabs. Not all of these are relevant to the package in question, which I believe can be confusing. For example, the
Cake
tab was recently added to the installation instructions tab for all packages (#8381).This tab contains install instructions for installing the package as cake addins and cake tools, even when the package may not be compatible with these scenarios.
For example, the
FluentValidation
package is not a CLI tool, but clicking on the cake tab shows the#tool
option:I think this is confusing, as it implies you can install the package in this way when in reality this can't be done (or wouldn't be useful). Similarly, one of my other packages (
FluentValidation.AspNetCore
) is only available in web projects, so it doesn't really make sense to list cake as an installation option under this package (theScript / Interactive
tab probably isn't relevant here too).Proposal
I think it would be helpful if there was a way to limit which installation instructions are displayed based on the type of package that's being viewed. Ideally, it would be great if this could be done automatically based on context, but if that isn't possible then please consider giving package authors an opt-out feature (or maybe opt-in, with tags?), so we can choose to show/hide which install instructions are visible.
For example, this is already partially supported with .NET CLI tools - the ".NET Global Tool" and ".NET Local Tool" tabs aren't shown for regular packages, and the cake
#addin
option is hidden from within the Cake tab when viewing a .NET CLI tool.Thanks for the consideration
//cc @joelverhagen
The text was updated successfully, but these errors were encountered: