Bug 243471

Summary: graphics/pinta: remove dependency on devel/mono-addins
Product: Ports & Packages Reporter: Phillip R. Jaenke <prj>
Component: Individual Port(s)Assignee: Kubilay Kocak <koobs>
Status: Closed Not Accepted    
Severity: Affects Only Me CC: emaste, mono, olivierw1+bugzilla-freebsd
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243470
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243575

Description Phillip R. Jaenke 2020-01-20 17:39:48 UTC
The mono-addins port has been deprecated upstream (and has not been maintained for over a year.) The devel/mono-addins port will be deprecated as part of Mono cleanup efforts to bring in 6.8+.

Please confirm if the port actually needs anything from devel/mono-addins. If we can just remove the dependency, that would be best. If a component from addins is still needed, we should figure out where that piece is and if it is actively maintained or an alternative way to bring it in.
Comment 1 OlivierW 2020-01-20 18:53:00 UTC
Hello,
Thanks for your report.

mono-addins seems to be used everywhere in Pinta: https://github.com/PintaProject/Pinta/search?l=C%23&q=mono.addins&type=
So, what should be done?

Who said mono-addins is deprecated? The last commits were in November 2019: https://github.com/mono/mono-addins/commits/master

PS: I am not familiar with Mono or its libraries.

Best Regards,
Olivier
Comment 2 OlivierW 2020-01-20 19:13:49 UTC
Well, I've just tried to remove the mono-addins dependency and rebuild Pinta. And, of course, it doesn't work :-(

Do the mono-addins upstream provides something else to migrate to?

Maybe I could patch Pinta's source to remove the mono-addins dependency? It seems to be used to add plugins, so it may not be needed for the main functionality.



Here is my build log:

                                Microsoft (R) Visual C# Compiler version 2.6.0.62309 (d3f6b8e7)
                                Copyright (C) Microsoft Corporation. All rights reserved.
Effects/BaseEffect.cs(32,12): error CS0246: The type or namespace name 'AddinRootAttribute' could not be found (are you missing a using directive or an assembly reference?)
Effects/BaseEffect.cs(32,12): error CS0246: The type or namespace name 'AddinRoot' could not be found (are you missing a using directive or an assembly reference?)
Classes/IExtension.cs(5,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
Effects/BaseEffect.cs(30,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
Managers/SystemManager.cs(33,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
Classes/BaseTool.cs(33,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
ImageFormats/IImageExporter.cs(28,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
ImageFormats/IImageImporter.cs(28,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
Classes/BasePaintBrush.cs(28,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
Classes/IExtension.cs(9,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
Classes/IExtension.cs(9,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
Effects/BaseEffect.cs(39,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
Effects/BaseEffect.cs(39,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
Classes/BaseTool.cs(39,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
Classes/BaseTool.cs(39,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
ImageFormats/IImageExporter.cs(32,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
ImageFormats/IImageExporter.cs(32,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
ImageFormats/IImageImporter.cs(32,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
ImageFormats/IImageImporter.cs(32,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
Classes/BasePaintBrush.cs(36,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
Classes/BasePaintBrush.cs(36,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
                        Task "Csc" execution -- FAILED
                        Done building target "CoreCompile" in project "/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5/Pinta.Core/Pinta.Core.csproj".-- FAILED
                Done building project "/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5/Pinta.Core/Pinta.Core.csproj".-- FAILED
        Task "MSBuild" execution -- FAILED
        Done building target "Build" in project "/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5/Pinta.sln".-- FAILED
Done building project "/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5/Pinta.sln".-- FAILED

Build FAILED.

Warnings:

/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5/Pinta.sln (default targets) ->
(Build target) ->
/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5/Pinta.Core/Pinta.Core.csproj (default targets) ->
/usr/local/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets (ResolveAssemblyReferences target) ->

        /usr/local/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets:  warning : Reference 'Mono.Addins, Culture=neutral, PublicKeyToken=0738eb9f132ed756' not resolved

Errors:

/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5/Pinta.sln (default targets) ->
(Build target) ->
/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5/Pinta.Core/Pinta.Core.csproj (default targets) ->
/usr/local/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

        Effects/BaseEffect.cs(32,12): error CS0246: The type or namespace name 'AddinRootAttribute' could not be found (are you missing a using directive or an assembly reference?)
        Effects/BaseEffect.cs(32,12): error CS0246: The type or namespace name 'AddinRoot' could not be found (are you missing a using directive or an assembly reference?)
        Classes/IExtension.cs(5,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
        Effects/BaseEffect.cs(30,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
        Managers/SystemManager.cs(33,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
        Classes/BaseTool.cs(33,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
        ImageFormats/IImageExporter.cs(28,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
        ImageFormats/IImageImporter.cs(28,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
        Classes/BasePaintBrush.cs(28,12): error CS0234: The type or namespace name 'Addins' does not exist in the namespace 'Mono' (are you missing an assembly reference?)
        Classes/IExtension.cs(9,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
        Classes/IExtension.cs(9,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
        Effects/BaseEffect.cs(39,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
        Effects/BaseEffect.cs(39,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
        Classes/BaseTool.cs(39,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
        Classes/BaseTool.cs(39,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
        ImageFormats/IImageExporter.cs(32,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
        ImageFormats/IImageExporter.cs(32,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
        ImageFormats/IImageImporter.cs(32,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
        ImageFormats/IImageImporter.cs(32,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)
        Classes/BasePaintBrush.cs(36,3): error CS0246: The type or namespace name 'TypeExtensionPointAttribute' could not be found (are you missing a using directive or an assembly reference?)
        Classes/BasePaintBrush.cs(36,3): error CS0246: The type or namespace name 'TypeExtensionPoint' could not be found (are you missing a using directive or an assembly reference?)

         1 Warning(s)
         21 Error(s)

Time Elapsed 00:00:02.6780060
gmake[1]: *** [Makefile:862: build] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/pinta/work/pinta-1.5'
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/pinta
Comment 3 Phillip R. Jaenke 2020-01-20 19:32:14 UTC
(In reply to OlivierW from comment #2)
I have been working pretty closely with the Mono team; the actual last commits to the mono-addins repository was actually 2018. The actual last release was 1.3.3 in 2017, and the link referenced in the port directs an 'archived' page since 2018.

A lot of this stems from Mono migrating to the dotnet/runtime repository. Given that, I checked with the Mono team, and they stated that nobody has been actively maintaining mono-addins for quite some time.

The first set of errors can be solved simply by not relying on Addins. (Well, that's easy enough, right?) The problem is, TypeExtension* are actually part of a mono-addins. And unfortunately it looks like Pinta actually hasn't been updated since 2015 itself.

It may unfortunately be time to let this one die. :(
Comment 4 OlivierW 2020-01-20 20:24:39 UTC
Well, you're right, it's probably better to let Pinta die :-(
Comment 5 OlivierW 2020-01-21 17:53:29 UTC
Well, I have a good news: I have been told mono-addins is not deprecated. I hope we will keep it together with Pinta :-)

Best Regards,
Olivier
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-22 06:13:11 UTC
Pinta is receiving commits: https://github.com/PintaProject/Pinta/commits Latest: Nov 19, 2019. 

mono-addins is receiving commits @ GitHub (Latest Nov 22, 2019): https://github.com/mono/mono-addins/commits

Conversation [1] with Marius Ungureanu (therzok, committer and Senior Software Engineer @microsoft) on Twitter:

"Hey, mono-addins is not deprecated, it's still largely used in MonoDevelop. There's no active feature development on it right now, but that's a different story"

Marius also mentioned using VS MEF as a potential alternative, but this should be coordinated upstream (@Pinta) if appropriate and suitable

[1] https://twitter.com/Therzok/status/1219439705042956288