Git Product home page Git Product logo

gitextensions.pluginmanager's Introduction

GitExtensions.PluginManager

NuGet based plugin manager for Git Extensions

Preview

Repository with some example plugins - https://www.myget.org/F/neptuo-gitextensions/api/v2.
Nightly builds of PluginManager available at Appveyor - https://ci.appveyor.com/nuget/gitextensions-pluginmanager.

Appveyor

Build status

Browsing for packages

PluginManager integrated into Git Extensions filters packages with dependency on GitExtensions.Extensibility. This package is right now a kind of meta package and it is used to mark nuget packages intended as Git Extensions plugins.

We are heading to use the official nuget.org feed to distribute plugin packages, but there is a bug (#67) which prevents us from using it. Right now it is recommended to use https://www.myget.org/F/neptuo-gitextensions/api/v2.

Command line arguments

PluginManager is designed to be a reusable tool to manage plugins distributed as nuget packages. This repository contains an integration package for Git Extensins. As a standalone application, PluginManager supports these command line arguments:

  • --path (required) - A root path to a directory where to install packages.
  • --selfpackageid (optional) - A package id to indicate which package should be treated as a package for self update.
  • --dependencies (optional) - A comma separated list of package ids and versions that are required in package to be compatible (Eg. GitExtensions.Extensibility-v3.0,TestA,TestB-v1).
  • --monikers (optional) - A comma separated list of .NET framework monikers to filter package content during extraction (Eg. net461,netstandard2.0).
  • --processnamestokillbeforechange - A comma separated list of process names to be killed before any changes being processed (it is used to kill all instances on Git Extensions before installing/uninstalling dlls, that might be locked).

Icons

Some icons by Yusuke Kamiyamane.
Some other by Material Design.

gitextensions.pluginmanager's People

Contributors

ivangrek avatar maraf avatar mast-eu avatar oriash93 avatar pmiossec avatar russkie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitextensions.pluginmanager's Issues

Build pipeline

The project must be hooked up to a build pipeline to build execute tests for incoming PRs and merge commits.

We use Appveyor for Git Extensions, it is preferred but it is not mandated. SignPath that we use for the codesigning integrated best with AppVeyor.

Incorrect wording

I have a single instance of the app running, and with this the warning text is a bit off:
image

Perhaps we should check how many instance of the app is actually running (by interrogating running processes?), and adjust the wording appropriately.

Also instead of "these applications" we should say "the application".

Can't see installed plugin info

Current behaviour:

Searching / installing a new plugin:
image

Installed plugin:
image

Expected behaviour:

A user must be able to see the same properties of the installed plugin, e.g. see the link to the repo and be able to click on it.

multiple PluginManager windows

The PluginManager can be opened multiple times by clicking Plugins > Plugin Manager repeatedly. It should be limited to a since instance.

Add authentication for custom nuget repositories

Either I've completely missed this or this feature currently isn't available.
I wanted to add a custom nuget repository (something we use internally in the company) but I couldn't find a way to add authentication, which is required by this repository.
Please add this, it will be very useful.

Show required dependency version range

Packages have dependency on GitExtensions.Plugins version >=3.1 && < 3.2.
We should display this in UI.

Currently we are not checking required version on the dependency, as discussed in maraf/GitExtensions.PluginManager#36.
If we change our mind, may be this issue will not be needed.

'flat' structure in directory UserPlugins

Currently the PM extracts all packages (including itself) directly into the directory UserPlugins. The resulting structure is:

UserPlugins
    Package1.dll
    Package1.config
    Package2.dll
    Package2.config
    ...

This may easily lead to errors due to file name clashes.

The directory structure should be:

UserPlugins
    Package1
        Package1.dll
        Package1.config
    Package2
        Package2.dll
        Package2.config
    ...

Inconsistent naming

Different names are used for the PM in different places. Occurrences are "Plugin Manager", "PluginManager" and "Packages".

image

image

Can't see plugin manager

Fresh new installment of Git Extensions with version 3.5.4.12724, but plugin manager doesn´t show up.

Not sure if I'm missing something, but I have PackageManager.UI inside C:\Users\user\AppData\Local\GitExtensions\UserPlugins\GitExtensions.PluginManager\PackageManager and the dll at C:\Users\user\AppData\Local\GitExtensions\UserPlugins\GitExtensions.PluginManager

I've seen other tickets with similar issues, but their solutions didn´t work for me.

Modify setting to close GE

There's a setting to close GE as soon as PM is started:
image

IMHO, it is valid to have an option to avoid this popup when a user installs a plugin:
image

However, the current implementation seems a bit "exaggerated". It always shuts down GE straight away when PM is started, even if the user doesn't install any plugin. Maybe I just clicked the plugin by accident....

I propose to change this into something like "Automatically close Git Extensions when installing plugins (don't ask for confirmation)". The default value should remain false.

'Transactional' package extraction

Package extraction include write to packages.config should succeed as an unit or any partial outputs should be deleted in case of exception.

Toughts:
Use kind of a transaction log.

Installation

  • Save package id and version.
  • After each file extraction, save a path to log.
  • Write entry to packages.config and delete transaction log.

Unstallation

  • Save package id and temp directory patb.
  • Copy each file to temp directory.
  • Remove entry from packages.config.
  • Delete temp directory.

Check transaction log on PackageManager start.

Icon too small

The currently used icon is too small (16*16 px) for being properly visualized in the taskbar and in thumbnail previews.
See in comparison to GE:

image

image

Ideally, the icon should be available in 256*256 px, to support high-resolution displays.

GE.PM is not loaded when placed in \AppData\Local\GitExtensions\UserPlugins\

GE.PM runs as expected when placed in <GE_rootDir>\UserPlugins\*, which is the default location for plugins in GE portable.

However, GE.PM does not run when placed in <user_name>\AppData\Local\GitExtensions\UserPlugins\*, which is the default location for plugins in GE installed version.
I checked with the debugger that GE finds the file <user_name>\AppData\Local\GitExtensions\UserPlugins\GitExtensions.PluginManager.dll, but for some reason the plugin is not loaded correctly.

@maraf: Can you confirm this observation, or do I miss something?

Filter out unsupported packages

Git Extensions is being migrated to .NET, and many existing packages are targeting the old version of the app that runs on .NET Framework 4.6.1.
The new version of the Plugin Manager shows all known version, which is quite misleading:
image

Consider how we can filter out (or render) unsupported packages.

Few ideas but nothing concrete, e.g.:

automatic search on startup

Currently the PluginManager shows an empty browse tab after startup and (apparently) requires to enter some kind of search term:
image

This is not entirely true. Already in the current version, you can just click on Search (without any search term) and get the full list of available plugins:
image

It would be much more user friendly to automatically run this search on startup.

Notify other plugin authors about PluginManager

Support .NET

Git Extensions@master has been migrated to .NET 5.0. Once .NET 6.0 is released the app will be migrated to it.
The plugin manager is currently can't be used with the dev version of the app as it is targeting .NET Framework.

Option for check for updates on startup

Extend GitExtensions integration (maraf/GitExtensions.PluginManager#19) with option (bool) to check for package updates on startup.
There should also be some limits not to check on every run.

NuGet package is "Not compatible"

I tried to install the plugin GitExtensions.SVN via the PM. The plugin is available here: https://www.nuget.org/packages/GitExtensions.SVN/0.2.0.21

It has a dependency on GitExtensions.Extensibility, which is available on the same feed: https://www.nuget.org/packages/GitExtensions.Extensibility/0.1.0.31

Reproduction steps:

  1. download and extract the portable build from gitextensions/gitextensions#6664: https://ci.appveyor.com/api/buildjobs/d4jebf45vply353j/artifacts/Setup%2FGitExtensions-Portable-3.2.0.6454.zip
  2. open GE and start the PluginManager plugin
  3. search for GitExtensions.SVN
  4. Nothing is found
    image
  5. However, the log states that the package GitExtensions.SVN.0.2.0.21 was correctly found, but skipped for some unknown reason:
22/08/2019 22:08:24 root.Search(DEBUG)

Searching 'GitExtensions.SVN'.

22/08/2019 22:08:24 root.Search(DEBUG)

Loading page '0'.

22/08/2019 22:08:24 root.Search(DEBUG)

Searching in 'https://api.nuget.org/v3/index.json'.

22/08/2019 22:08:25 root.Search(DEBUG)

Found 'GitExtensions.SVN.0.2.0.21'.

22/08/2019 22:08:25 root.Search(DEBUG)

Package skipped.

22/08/2019 22:08:25 root.Search(DEBUG)

Loading page '1'.

22/08/2019 22:08:25 root.Search(DEBUG)

Search completed. Found '0' items.

What I found so far

I think I found a problem in

NuGetPackageFilterResult filterResult = filter.IsPassed(package);
switch (filterResult)

It seems like the package is correctly found on nuget.org, but for some reason the var filterResult is always NuGetPackageFilterResult.NotCompatible (line 131).

image

If I force the var filterResult to NuGetPackageFilterResult.Ok (line 132, added by me for testing), the PM lists my plugin as expected.
With this trick, I can install, use and uninstall it (I didn't test updating yet):
image

However, looking in the "Installed" tab, it still says in red the plugin is Not compatible:
image

PluginManager remains open when GE is closed

Steps to reproduce

  1. open PM
  2. close GE

What happens?

PM window remains open.

What should happen?

PM window gets automatically closed.

@maraf : is this needed for updates or should this be considered as an undesired behavior?

Mismatch between .Net version required by GitExt 4.0.0 & PackageManager

Environment

  • GitExtensions version: 4.0.0.15569
  • GIT version: 2.38.1.windows.1
  • OS version: Wi10 21H2
  • .NET version: 2.2.207, 5.0.408, 6.0.400-preview.22330.6, 6.0.401

Issue description

Per release notes, GitExt 4 requires .Net 6.
When starting PackageManager it crashes with no user feedback,, windows event logs show the entry

Application: PackageManager.UI.exe
Path: C:\lucru\tools\GitExtensions\UserPlugins\GitExtensions.PluginManager\PackageManager\PackageManager.UI.exe
Message: You must install or update .NET to run this application.

App: C:\lucru\tools\GitExtensions\UserPlugins\GitExtensions.PluginManager\PackageManager\PackageManager.UI.exe
Architecture: x86
Framework: 'Microsoft.WindowsDesktop.App', version '5.0.0' (x86)
.NET location: C:\Program Files (x86)\dotnet\

The following frameworks were found:
  3.1.29 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
  6.0.6 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
  6.0.9 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
  6.0.10 at [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]```

### Steps to reproduce

1. Start Git Ext
2. (try to) open Plugins -> Plugin manager


### Did this work in previous version of GitExtensions?

yes, yes, yes

### Diagnostics

_No response_

Support for versions of same package from multiple feeds

Currently, when a package is found in a feed, versions of the same package from other feeds are ignored.

It is a bit complicated. When a first feed returns enough packages, other feeds are not even searched. PM doesn't know if there are same packages with higher versions or not.

Save last position and size

Be careful with this one, this road is fraught with dangers.
In GE we have a number of issues in multi-monitor setups with dialog
windows shown outside visible area or on wrong monitor.

I thing that checking whether a loaded position and size are within boundaries of current displays could solve it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.