Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Fetch plugins from NuGet #348

Open
11 tasks
biohazard999 opened this issue Sep 25, 2019 · 6 comments
Open
11 tasks

Fetch plugins from NuGet #348

biohazard999 opened this issue Sep 25, 2019 · 6 comments

Comments

@biohazard999
Copy link
Contributor

biohazard999 commented Sep 25, 2019

It would be awesome if we can install pretzel plugins directly from nuget.

Proposed solution:

  • Add a new plugin commands
    • List packages
    • Any package tagged with Pretzel.Plugin.
  • Install plugin
    • Add a new file called pretzel.conf or probably use _config.yml
    • Add new entry to pretzel.conf
    • Download missing packages on startup and extract them into _plugins folder
  • Update plugin
    • Check for latest version on installed packages
  • Uninstall plugin
    • Remove Entry from pretzel.conf and delete from _plugins folder

related #226

@laedit
Copy link
Member

laedit commented Sep 28, 2019

Nice idea, that is an old dream of me 😄

But that could be dangerous, we allow anyone to download virtually any files packaged on nuget with the right tag. We need at least to display a warning.

We also need to think about a (simple) dependency system, for plugins needing ScriptCs (dotnet script in a near future).

@biohazard999
Copy link
Contributor Author

biohazard999 commented Sep 28, 2019

Nice idea, that is an old dream of me 😄

Always wanted to build something like this 😁

But that could be dangerous, we allow anyone to download virtually any files packaged on nuget with the right tag. We need at least to display a warning.

Package signing could be the solution to this. But on the other hand: we do that all the time.
But we should at least hash the packages and compare it with a base line to avoid package spoofing.

We also need to think about a (simple) dependency system, for plugins needing ScriptCs (dotnet script in a near future).

If we just follow the dependencies of the nuget packages, plugin authors could just define their dependencies in their package.

@laedit
Copy link
Member

laedit commented Sep 28, 2019

Package signing could be the solution to this. But on the other hand: we do that all the time.
But we should at least hash the packages and compare it with a base line to avoid package spoofing.

That can check integrity and identity but we should signal that we haven't validate/check these plugins and cannot guaranty that they are safe.

If we just follow the dependencies of the nuget packages, plugin authors could just define their dependencies in their package.

I haven't thought of that, that could do it but since it is runtime dependency I think we will have to treat it specifically.

@biohazard999
Copy link
Contributor Author

That can check integrity and identity but we should signal that we haven't validate/check these plugins and cannot guaranty that they are safe.

We can check how the cake guys treat this problem.

I haven't thought of that, that could do it but since it is runtime dependency I think we will have to treat it specifically.

We could advise plugin authors to use Fody.ILMerge instead of fetching dependencies or the new AssemblyLoadContext in netcore3.0 (I'm not sure about net4 support on this).

@biohazard999
Copy link
Contributor Author

But I think we should not overcomplicate, throw in a prototype, check integrity and see if plugin author's will jump on :)
I have a few new plugins in mind and would love to built this feature. Of course manual plugins should work as before.

@laedit
Copy link
Member

laedit commented Sep 28, 2019

I agree that we should not overcomplicate this, I just want to display a warning on console, nothing more :)

For runtime dependency on dotnet script I was thinking of doing that in a second part or integrate it directly in Pretzel.
Anyway, we can leave it for now :)

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

No branches or pull requests

2 participants