gentoo / dotnet

[MIRROR] Newer mono, .NET languages, and libraries
https://gitweb.gentoo.org/repo/proj/dotnet.git
78 stars 56 forks source link

Monodevelop and it's addins #160

Open ArsenShnurkov opened 8 years ago

ArsenShnurkov commented 8 years ago

Monodevelop is packaged not in gentoo way

https://gist.githubusercontent.com/ArsenShnurkov/087186792d8dd155c7c3/raw/bed2360aa4c4aea0ba583440f11a93809ac871c0/stdin

Unable to find version '6.0.8' of package 'Newtonsoft.Json'.
Unable to find version '2.6.4' of package 'NUnit.Runners'.
Unable to find version '5.2.2' of package 'Microsoft.AspNet.Mvc'.
Unable to find version '3.2.2' of package 'Microsoft.AspNet.Razor'.
Unable to find version '3.2.2' of package 'Microsoft.AspNet.WebPages'.
Unable to find version '1.0.0.0' of package 'Microsoft.Web.Infrastructure'.
Unable to find version '1.0.81' of package 'LibGit2Sharp.NativeBinaries'.

1) it dependes on numerous submodules which are restored from file https://raw.githubusercontent.com/mono/monodevelop/master/.gitmodules during make dist

This causes usage of git-r3 eclass instead of downloading sources archives (i.e. doesn't use gentoo CDN for source codes. If github will be unavailable, then there will be no acccess to source codes through gentoo mirrors)

One of goals of gentoo is to be able to build everything ourself, to be independent. If we use binary packages, why not to switch to Ubuntu or Suse then?

2) it downloads untrusted binary packages in SRC_URI. For some of them there are trusted gentoo alternatives (for NUnit for example)

cnd commented 8 years ago

@ArsenShnurkov yes ideally monodevelop needs hard rework, specially newer versions support

ArsenShnurkov commented 8 years ago

I am reading "make dist" section of Makefile. It contains syntax which is unknown to me.

http://www.gnu.org/software/make/manual/make.html#Pattern-Rules
Why do one want to use rules like "%-operation: echo ..." ? "all-recursive", "clean-recursive", "install-recursive", "uninstall-recursive", "distcheck-recursive" - they all match to rule %-recursive, but i don't understood how that % rule works differently in this different cases

UPD: http://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html $* will expand to the part of the target that matched the pattern

ArsenShnurkov commented 8 years ago

We need a local copy of monodevelop-addins repository by the same reasons as we need to have a local copy of nuget repository (Gentoo is source-based distribution and should have an ability to build without a connection to internet).

ArsenShnurkov commented 8 years ago

Microsoft.AspNet.Mvc from nuget repository (and it's dependencies) is under EULA. This is awful.

ArsenShnurkov commented 8 years ago

see also https://bugs.gentoo.org/show_bug.cgi?id=589554 about package LibGit2Sharp.NativeBinaries which is downloaded from https://www.nuget.org/packages/LibGit2Sharp.NativeBinaries and declared to be build with https://github.com/libgit2/libgit2sharp.nativebinaries

see also https://github.com/gentoo/dotnet/pull/207

ArsenShnurkov commented 8 years ago

Unable to find version '3.0.1' of package 'NUnit.Engine'. https://github.com/nunit/nunit/issues/1708

PR for NUnit package - https://github.com/gentoo/dotnet/pull/209

cnd commented 8 years ago

@ArsenShnurkov current version became broken?

ArsenShnurkov commented 8 years ago

no, it's work in progress - https://github.com/ArsenShnurkov/shnurise/blob/master/dev-util/monodevelop/monodevelop-6.1_p2016062206.ebuild

ArsenShnurkov commented 8 years ago

I am trying to build this: https://github.com/ArsenShnurkov/shnurise/blob/bfadda939263885a192b76c630a3f319538e902d/dev-util/monodevelop/monodevelop-6.1_p2016062206.ebuild and receive this log: http://pastehtml.com/view/gnksq7k9x.html my extraction of the error text:

Project "/var/tmp/portage/dev-util/monodevelop-6.1_p2016062206/work/monodevelop-6.1/external/fsharpbinding/.paket/paket.targets" (DownloadPaket target(s)):
                    Target DownloadPaket:
                        Executing: mono --runtime=v4.0.30319 /var/tmp/portage/dev-util/monodevelop-6.1_p2016062206/work/monodevelop-6.1/external/fsharpbinding/.paket/paket.bootstrapper.exe
                        Cannot open assembly '/var/tmp/portage/dev-util/monodevelop-6.1_p2016062206/work/monodevelop-6.1/external/fsharpbinding/.paket/paket.bootstrapper.exe': No such file or directory.
/var/tmp/portage/dev-util/monodevelop-6.1_p2016062206/work/monodevelop-6.1/external/fsharpbinding/.paket/paket.targets: error : Command 'mono --runtime=v4.0.30319 /var/tmp/portage/dev-util/monodevelop-6.1_p2016062206/work/monodevelop-6.1/external/fsharpbinding/.paket/paket.bootstrapper.exe' exited with code: 2.

since I don't have a clue what F# is, I am asking an assistance of @mpkh :)

What If I want to build monodevelop without F# support? There is no such USE-flag...

cnd commented 8 years ago

@ArsenShnurkov packet is that thing https://github.com/fsprojects/Paket we used also to have fsharpbindings as separated package in this overlay as far as I remember it's build system was not so good and stable if there is such compiling flag you can obviously try to introduce use flag for F#

in addition I guess it will be reasonable to share this with MD team

piedar commented 7 years ago

Monodevelop needs a patched libgit2sharp to build. Unfortunately, the patch doesn't apply cleanly against upstream.

ArsenShnurkov commented 7 years ago

monodevelop-6.0.0.4761 requires 2 dependencies:

cmake, git

and call to

addwrite "/usr/share/.mono/keypairs"

somewhere in the process before call to nuget restore

ArsenShnurkov commented 7 years ago

monodevelop-6.0.0.4761 is unable to open .sln file from roslyn project (says "Load failed"):

ArsenShnurkov commented 7 years ago

2 days ago monodevelop-7.1.0.1276 was released...

(but there is no new tarballs at http://download.mono-project.com/sources/monodevelop/ )

ArsenShnurkov commented 7 years ago

monodevelop 6.0.0.4761 crashes, when I attempt to "watch" a variable during debug...

piedar commented 7 years ago

@ArsenShnurkov Same here with the debugger crashes. I've almost given up on it because it's so unstable and none of the newer tagged releases have built successfully on my machine for quite some time.

EinstokFair commented 6 years ago

How monodevelop addins should be installed: https://github.com/mono/mono-addins/wiki/Addin-Discovery-Basics

Add-ins are scanned the first time the application is started, and all information about the hosts and add-ins is stored in a database (located at the registry directory). When the application is started again, all required information is gathered from the database.

This command will regenerate the add-in registry: mautil -reg <path-to-registry> -p <path-to-application> reg-build -v

An add-in package is basically a compressed archive (with .mpack extension) which contains all files of an add-in. Add-in packages can be created using the mautil command tool. For example: mautil pack SomeAddin.dll to package add-ins based on manifests: mautil pack SomeAddin.addin (i.e. there should be an eclass to facilitate the conversion from .addin to .mpack, and probably a msbuild task for doing the same)

This is how monodevelop determine the URL to download Addins to install:

internal static string GetRepoUrl (string quality)
{
    string platform;
    if (Platform.IsWindows)
        platform = "Win32";
    else if (Platform.IsMac)
        platform = "Mac";
    else
        platform = "Linux";

    return "http://addins.monodevelop.com/" + quality + "/" + platform 
        + "/" + AddinManager.CurrentAddin.Version + "/main.mrep";
}

(By the way, where .mrep is documented?)

Is it necessary to patch it to point to local disk? Or create a separate public community repository on web (monodevelop itself is open source, why not trust to existing repository)? Or write a new code which uses EAPI to search for addins locally, or in the list of overlays, or on gpo.zugaina.org?