From patchwork Mon Dec 16 17:26:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34944 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 03D5127BBEA; Mon, 16 Dec 2024 17:29:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6EA8B27BBE9 for ; Mon, 16 Dec 2024 17:29:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEu9-0000IM-8P; Mon, 16 Dec 2024 12:29:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEtz-0000Er-7F for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEty-0001uy-UG for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Eq6DlNTBkBeGzqhR2KEm6ybEYexjeyi/ehuvw6vVLWA=; b=k5vEA6aZkkXYs1EKQTUVToqy88RY6TFjZWcBHqtM75DptSM0ExIbir5gwvzqMbMeotbP7R2IEbRfUJXpsJV3zpWDnRX/6N6iSA8x0HK6xEG+Nx3+uyvyS3xxkm6v51FIGa7s9io8RIIbQl4qVKWeYH2hrACSwg3sUQgGq94kFrC+tOR6DdhpSqm6gR0KtBnwttmh+aZgWBjNJONyQ7J76GYayLAspGauQEF7okBZWDTsNERBHJm0wzvhS0IveRR/NtVeXGRTH1LyPhkmses/uRiKy6zl5qJYSJGZxdCFr129IKxUPKX+h5tVJqYxw3/PLxcQF4WY1yZwumyxN4yVEA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEty-0006JV-Al for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 01/21] gnu: Add treecc. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437009523954 (code B ref 74609); Mon, 16 Dec 2024 17:29:02 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:15 +0000 Received: from localhost ([127.0.0.1]:55827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtC-0006EH-Q9 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:15 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:46339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEt9-0006Dz-3t for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:13 -0500 Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3863c36a731so3156419f8f.1 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370030; x=1734974830; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=Eq6DlNTBkBeGzqhR2KEm6ybEYexjeyi/ehuvw6vVLWA=; b=DmYr8yaxp3Oii8oFjc6EQkegIedwjM+QEieC1gstsL6xXHp4s01v9KGKOUUihJI/6V Mba+8w3eVMa/AUWoef75VRL/17dFPL++5IsRdQ3AVwGKigFqEJ9hbd7jfUzk13qjmXaN 3OD6nWodZy3OAu487sVO4fLs34vqBl/ZZbNox0LzoizzT/MerPP+k9blKNUpceVpDrv6 rveUz5yOk2QarugYRFzK1O49/OBJV2EBz6w4F5W/DA7AYqNGUSxRikQAye835ypstBZ+ a3k8DDhPVCV6G2rKQr4ObH1WhlwNFXyFtk4C5BkYyEOVyrSsfziT5z2pG/e7WYnKrm8d AG5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370030; x=1734974830; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Eq6DlNTBkBeGzqhR2KEm6ybEYexjeyi/ehuvw6vVLWA=; b=iIlXZSjVpUXq08EZNb4L8YGDuolFwItp7A7KiSFP3QWLYHDC/BqkXulbYRPtU5Uwg6 Vl+bgoLOm5x16eSYmLiWss9RJ2jKYS9v8FCQuI3qG8JjRWU9Vdr7KoMxXAWbTXr5HFu9 RCEOQnzUtHjdO1wEDpUxRg3j9DfZMo/iAbktRGGqk2bTvQdHhIlwxUZUVtAVwWlgCr+A Lyc9tyAuFLDWnrWEtXNA33836PPtj4fB3aeyZh3o7w6pTbrIIiBah0ZRQElX6a/0iM/H vHr9TKCZOsCvjgVlRoWZ8K9+flwhax9gHXYf5kjxHUf8hemDBubNKxGhjIAOwAfgxuZO xdlA== X-Gm-Message-State: AOJu0YxSwTqvJ3UaSuZtdGl1/THYQeY7B7yijyjuvOmWnQz2R69kOunw Z5T1Bc/5J7Pz5cH83NYe2DgBVx/9s6jFwHJbvKtaER6NXP4wfolZSlgGjheA X-Gm-Gg: ASbGncsFmkgPbJ0t57oYm9FifI8xJ197FV9igrqYha98fln6EOFer/kcKoh3+qxjZCM 8xxM4QG0yH/AqRZa62SETrisJH1Do0B9clLx+sWbT461aofH8X3L/uwZhi6WOYoKky/r5MY9PWi mbMOa0VbgfYJWVUgc1Ad5CFXqBwBAh/IHw5PGNqXyuscQmhYzkL58N0AGkxo/tqqRvJ/OuLiBaM KkXg3suN0feTxqs/YyxnUAbxxBMnTi+tHR6ewugDZQ8lUDktjvnQDA98QqZEw== X-Google-Smtp-Source: AGHT+IFSTBNWffOrFwik/1ccYcZLU2/AM5sK5yHupcOR+lAq62+qGvyCi3prHkXCYnotiLGQh2E9bw== X-Received: by 2002:a05:6000:719:b0:386:8ff:d20b with SMTP id ffacd0b85a97d-38880ada989mr10497536f8f.27.1734370029997; Mon, 16 Dec 2024 09:27:09 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c801a87esm8635573f8f.59.2024.12.16.09.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:09 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:24 +0200 Message-ID: <75f990af622e4b5452923c0fc0d6fabf918dbb72.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm: New module. (treecc): New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Add new module. Change-Id: If3f36615774c872f3015510eb08ec53657e4edfb --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 62 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 gnu/packages/dotnet.scm diff --git a/gnu/local.mk b/gnu/local.mk index ffb8eb6d297..94331c6064b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -257,6 +257,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/docbook.scm \ %D%/packages/docker.scm \ %D%/packages/documentation.scm \ + %D%/packages/dotnet.scm \ %D%/packages/dpdk.scm \ %D%/packages/dvtm.scm \ %D%/packages/easyrpg.scm \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm new file mode 100644 index 00000000000..e085b364e29 --- /dev/null +++ b/gnu/packages/dotnet.scm @@ -0,0 +1,62 @@ +(define-module (gnu packages dotnet) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages assembly) + #:use-module (gnu packages bison) + #:use-module (gnu packages check) + #:use-module (gnu packages cmake) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages flex) + #:use-module (gnu packages gettext) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages base) + #:use-module (gnu packages autotools) + #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages glib) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages instrumentation) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libffi) + #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages perl) + #:use-module (gnu packages photo) + #:use-module (gnu packages texinfo) + #:use-module (gnu packages tls) + #:use-module (gnu packages image) + #:use-module (gnu packages gtk) + #:use-module (gnu packages python) + #:use-module (gnu packages xml) + #:use-module (gnu packages xorg) + #:use-module (gnu packages version-control) + #:use-module (gnu packages) + #:use-module (guix modules) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix gexp) + #:use-module (guix utils) + #:use-module (guix build-system gnu) + #:use-module (guix build-system python) + #:use-module (ice-9 match)) + +(define-public treecc + (package + (name "treecc") + (version "0.3.10") + (source (origin + (method url-fetch) + (uri (string-append + "https://download.savannah.gnu.org/releases/dotgnu-pnet/treecc-" + version ".tar.gz")) + (sha256 + (base32 + "1rzgnspg2xccdq3qsx0vi3j28h4qkrzbrjnhzvnny34fjfk217ay")))) + (build-system gnu-build-system) + (home-page "https://www.gnu.org/software/dotgnu") + (synopsis "Tree Compiler-Compiler") + (description "The treecc program is designed to assist in the development +of compilers and other language-based tools. It manages the generation of +code to handle abstract syntax trees and operations upon the trees.") + (license license:gpl2+))) From patchwork Mon Dec 16 17:26:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34962 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 89E8C27BBEA; Mon, 16 Dec 2024 17:31:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AD06927BBE2 for ; Mon, 16 Dec 2024 17:31:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEux-00010X-22; Mon, 16 Dec 2024 12:30:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEu1-0000FX-Qr for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:06 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu1-0001vS-Hu for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=eS0zZ/0xDh/HTVjZ2uPaL3sYw0hzqNMEw++fk6MpCxM=; b=oGBYRKhPTQzlduhz0ja0RrBazbufGnPBqlB3zwXluGgE830l7Uo30yCbg/1j8wXjAd5GBMI/Uy/9tfaeDyNJy0z0PLoWfnHLibaw1ItF2DrDy9qUSM9ixHwQw/scpA1fkfIldRznw6gTmRmUeKQZbe5pGUs8+c4H9HQ939yHm1DF6GDFUg8crHc7axA9lFHX8kWcZ92uyZhU5yOS1Kp26iA+iZszL5B6Dcn3JGhiD8TQU8HNvSmaqb2Brgp5U+IdcEA7W/YpWnsaN3c4vr0uC1kvzKhRyAr/cCbPcVdAQw13Sewm32YMKk0IQCYoKZsLuD50Ep5o4AOW1EpNcJqMiQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu1-0006Jw-6A for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 02/21] gnu: Add pnet-git. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437010624017 (code B ref 74609); Mon, 16 Dec 2024 17:29:05 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:26 +0000 Received: from localhost ([127.0.0.1]:55837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtM-0006FB-Ma for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:25 -0500 Received: from mail-wm1-f52.google.com ([209.85.128.52]:46105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtG-0006E4-Ev for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:20 -0500 Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43622267b2eso46730805e9.0 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370033; x=1734974833; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=eS0zZ/0xDh/HTVjZ2uPaL3sYw0hzqNMEw++fk6MpCxM=; b=QQYFpXufifRILzeqqwgj7j5uDuoeaenuHmZvKtmvHztzTNUYM5OTB2k+IokiZ8tYfg 7kcdiBNI0junk3svS9pXqs70veDy1s/Zm9jZV9Z7YPYOq++1ZyNFFFFxfxywPDlKg2wm ZRUHwJ/iiheunpEiUa/4/tJo8kWRC3/9Jqeb6B8cELn8DqFdyT5J9OdBlYjN8GrzY79A 1KqAbhGyd8Whpm3l+Z/IZ+RZ7vky3Z1wkhXp81kit8XExvuJYJiTfbPC33iFwhis6EkZ cDWu1WMVl8DobpSu1/WPH415Jvo9znU8lhVFXk2703tNEFZ9HqgyLLTFmnMa7BANzxkT y7XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370033; x=1734974833; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=eS0zZ/0xDh/HTVjZ2uPaL3sYw0hzqNMEw++fk6MpCxM=; b=VvqJZhhEw7lQ805VLwelBU9+GPPDwBTvUwza59aj3/wm9JFKOFxRJ4SYFTv6qfX/Vg XSBSzbvfIWZpvd5vUVx8G5XiHnZyYH8u4gXj3Kb6bZUmVcSC+UU15Snx/125jt9bEuQk bl79r1oghIdw5F/vGDj6ls1do1RBtDOwV4haIxNiFhbSncqpGi5fy0NSOosD8K/NOtzI 3m8u2uPfMACzHMVAhQ5yS6/AmJ/7kHH2HXGV9evwo0TeVj1cI15Vf0N0f9SLxVRazd9r BD+NdJ4gTp7+D8tyJlDvAOFnWoJs6ar3Rhh4F+cP17mSRivX7zUuZ9VUui5v2IXYZvFn 5OFw== X-Gm-Message-State: AOJu0Yyp0viaE0FkwIHdNnw7MRknqrHmJKcql9ugdQnUVrIvapirYqoF 5xMM2TvcEROl7IH5ffHU+4Go+6QFBhNSHaX9WZ9JqVT2GKr4PBrNzrXUfxk2 X-Gm-Gg: ASbGncvJQAhrSQ6tZvmwmfQ1CZTlrl/rqqafBMUoiVJEMjdJGFka/wDsM3BMbMfI8kO cbS94FaLjmB2HjjXcsJTPW2ZaGlwXC1HAJ3OyR6JfTNljZyDw46ulpw3iygORzQ8fhsfGucTSgS K7sXuX11KEajS1lA4IxHLIwy0xbZF+0MtH+/kCWi0qGiicvb4Pc9upNt5aTT4vyuZ4uoliCuPEH nItWSdAgz7UrJBg/mMMEwd6iEfG8hc+/sQjOCwEIzMAE4P6qS6ZjoPcjn3Ebg== X-Google-Smtp-Source: AGHT+IEmnfPmOKY+Klq5dJQEznYV0Qt9ADGM2NFw8wx6nRkj5jQo4DqPHrKxPRoq4wIbCnZhrXdvuw== X-Received: by 2002:a05:600c:350c:b0:434:f297:8e78 with SMTP id 5b1f17b1804b1-4362aa15448mr118032625e9.7.1734370032318; Mon, 16 Dec 2024 09:27:12 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43636067436sm90945525e9.23.2024.12.16.09.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:11 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:25 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (pnet-git): New variable. * gnu/packages/patches/pnet-fix-line-number-info.patch: New patch. * gnu/packages/patches/pnet-fix-off-by-one.patch: New patch. * gnu/packages/patches/pnet-newer-libgc-fix.patch: New patch. * gnu/packages/patches/pnet-newer-texinfo-fix.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patches. Change-Id: I751e97088e2b848078889b2033ebb4356d3cfe4b --- gnu/local.mk | 4 + gnu/packages/dotnet.scm | 99 +++++++++++++++++++ .../patches/pnet-fix-line-number-info.patch | 13 +++ .../patches/pnet-fix-off-by-one.patch | 13 +++ .../patches/pnet-newer-libgc-fix.patch | 45 +++++++++ .../patches/pnet-newer-texinfo-fix.patch | 13 +++ 6 files changed, 187 insertions(+) create mode 100644 gnu/packages/patches/pnet-fix-line-number-info.patch create mode 100644 gnu/packages/patches/pnet-fix-off-by-one.patch create mode 100644 gnu/packages/patches/pnet-newer-libgc-fix.patch create mode 100644 gnu/packages/patches/pnet-newer-texinfo-fix.patch diff --git a/gnu/local.mk b/gnu/local.mk index 94331c6064b..8fc98c8fd22 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1929,6 +1929,10 @@ dist_patch_DATA = \ %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \ %D%/packages/patches/plasp-fix-normalization.patch \ %D%/packages/patches/plasp-include-iostream.patch \ + %D%/packages/patches/pnet-fix-line-number-info.patch \ + %D%/packages/patches/pnet-fix-off-by-one.patch \ + %D%/packages/patches/pnet-newer-libgc-fix.patch \ + %D%/packages/patches/pnet-newer-texinfo-fix.patch \ %D%/packages/patches/pocketfft-cpp-prefer-preprocessor-if.patch \ %D%/packages/patches/pokerth-boost.patch \ %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index e085b364e29..cd8886c8398 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -60,3 +60,102 @@ (define-public treecc of compilers and other language-based tools. It manages the generation of code to handle abstract syntax trees and operations upon the trees.") (license license:gpl2+))) + +;; several improvements occurred past the 0.8.0 release that make it easier to +;; bootstrap mono +(define-public pnet-git + (let ((commit "3baf94734d8dc3fdabba68a8891e67a43ed6c4bd") + (version "0.8.0") + (revision "0")) + (package + (name "pnet-git") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/dotgnu-pnet/pnet.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0vznvrgz8l0mpib1rz5v3clr7cn570vyp80f7f1jvzivnc1imzn6")) + (modules '((guix build utils))) + (snippet + #~(begin + (for-each delete-file-recursively '("libffi" "libgc")) + (for-each delete-file (filter file-exists? + '("compile" + "configure" + "config.guess" + "config.sub" + "depcomp" + "install-sh" + "ltconfig" + "ltcf-c.sh" + "ltmain.sh"))) + (for-each delete-file (find-files "." "Makefile(\\.in)?$")) + (for-each delete-file (find-files "." "_grammar\\.(c|h)$")) + (for-each delete-file (find-files "." "_scanner\\.(c|h)$")) + ;; Fix to not require bundled dependencies + (substitute* "configure.in" + (("GCLIBS='.*libgc.a'") "GCLIBS='-lgc'") + ;; AC_SEARCH_LIBJIT checks hardcoded header locations + (("search_libjit=true") + (string-append "search_libjit=false\n" + "JIT_LIBS=-ljit"))) + (substitute* "Makefile.am" + (("OPT_SUBDIRS \\+= lib.*") "")) + (substitute* "support/hb_gc.c" + (("#include .*/libgc/include/gc.h.") + "#include ") + (("#include .*/libgc/include/gc_typed.h.") + "#include ")) + (substitute* (list "codegen/Makefile.am" + "cscc/bf/Makefile.am" + "cscc/csharp/Makefile.am" + "cscc/c/Makefile.am" + "cscc/java/Makefile.am") + ;; Generated files aren't prerequisites + (("TREECC_OUTPUT =.*") "")) + (substitute* "cscc/csharp/cs_grammar.y" + (("YYLEX") "yylex()")) + (substitute* "cscc/common/cc_main.h" + (("CCPreProc CCPreProcessorStream;" all) + (string-append "extern " all))) + (substitute* "csdoc/scanner.c" + (("int\ttoken;" all) + (string-append "extern " all))) + (substitute* "doc/cvmdoc.py" + (("python1.5") "python")))) + (patches + (search-patches "pnet-newer-libgc-fix.patch" + "pnet-newer-texinfo-fix.patch" + "pnet-fix-line-number-info.patch" + "pnet-fix-off-by-one.patch")))) + (build-system gnu-build-system) + (native-inputs + (list autoconf + automake + bison + flex + libtool + libatomic-ops + python ; for cvmdoc.py + texinfo + treecc)) + (inputs + (list libgc libjit)) + (arguments + (list #:configure-flags #~(list "--with-jit") + #:make-flags #~(list "CFLAGS+=-Wno-pointer-to-int-cast"))) + (native-search-paths + (list (search-path-specification + (variable "CSCC_LIB_PATH") + (files (list "lib/cscc/lib"))))) + (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html") + (synopsis "Compiler for the C# programming language") + (description + "The goal of this project is to build a suite of free software tools +to build and execute .NET applications, including a C# compiler, +assembler, disassembler, and runtime engine.") + (license license:gpl2+)))) diff --git a/gnu/packages/patches/pnet-fix-line-number-info.patch b/gnu/packages/patches/pnet-fix-line-number-info.patch new file mode 100644 index 00000000000..9e5af849413 --- /dev/null +++ b/gnu/packages/patches/pnet-fix-line-number-info.patch @@ -0,0 +1,13 @@ +diff --git a/codegen/cg_coerce.c b/codegen/cg_coerce.c +index 92d2f59a..c90ad5e2 100644 +--- a/codegen/cg_coerce.c ++++ b/codegen/cg_coerce.c +@@ -1203,6 +1203,8 @@ int ILCoerce(ILGenInfo *info, ILNode *node, ILNode **parent, + != ILMachineType_Void) + { + *parent = ILNode_CastSimple_create(node, constType); ++ yysetfilename(*parent, yygetfilename(node)); ++ yysetlinenum(*parent, yygetlinenum(node)); + return 1; + } + else if(indirect && GetIndirectConvertRules(info,fromType,toType,0, diff --git a/gnu/packages/patches/pnet-fix-off-by-one.patch b/gnu/packages/patches/pnet-fix-off-by-one.patch new file mode 100644 index 00000000000..858d2266976 --- /dev/null +++ b/gnu/packages/patches/pnet-fix-off-by-one.patch @@ -0,0 +1,13 @@ +diff --git a/codegen/cg_genattr.c b/codegen/cg_genattr.c +index 535852da..c3acc0dc 100644 +--- a/codegen/cg_genattr.c ++++ b/codegen/cg_genattr.c +@@ -1532,7 +1532,7 @@ static int MarshalAsAttribute(ILGenInfo *info, + else + { + sizeParamIndex = attributeInfo->namedArgs[currentNamedArg].evalValue.un.i4Value; +- if(sizeParamIndex <= 0) ++ if(sizeParamIndex < 0) + { + CGErrorForNode(info, attributeInfo->namedArgs[currentNamedArg].node, + _("The size parameter index must be >= 0")); diff --git a/gnu/packages/patches/pnet-newer-libgc-fix.patch b/gnu/packages/patches/pnet-newer-libgc-fix.patch new file mode 100644 index 00000000000..1084b5a5bec --- /dev/null +++ b/gnu/packages/patches/pnet-newer-libgc-fix.patch @@ -0,0 +1,45 @@ +diff --git a/support/hb_gc.c b/support/hb_gc.c +index a5addb2d..41126963 100644 +--- a/support/hb_gc.c ++++ b/support/hb_gc.c +@@ -104,12 +104,6 @@ static volatile int _FinalizersRunningSynchronously = 0; + #define GC_TRACE(a, b) + #endif + +-/* +- * This is a internal global variable with the number of reclaimed bytes +- * after a garbage collection. +- */ +-extern GC_signed_word GC_bytes_found; +- + /* + * Main entry point for the finalizer thread. + */ +@@ -432,6 +426,7 @@ int ILGCFullCollection(int timeout) + { + int lastFinalizingCount; + int hasThreads; ++ struct GC_prof_stats_s stats; + + hasThreads = _ILHasThreads(); + +@@ -462,7 +457,8 @@ int ILGCFullCollection(int timeout) + GC_TRACE("Last finalizingCount = %i\n", lastFinalizingCount); + + GC_gcollect(); +- bytesCollected = GC_bytes_found; ++ GC_get_prof_stats(&stats, sizeof(stats)); ++ bytesCollected = stats.bytes_reclaimed_since_gc; + + GC_TRACE("GC: bytes collected = %i\n", bytesCollected); + +@@ -516,7 +512,8 @@ int ILGCFullCollection(int timeout) + GC_TRACE("Last finalizingCount = %i\n", lastFinalizingCount); + + GC_gcollect(); +- bytesCollected = GC_bytes_found; ++ GC_get_prof_stats(&stats, sizeof(stats)); ++ bytesCollected = stats.bytes_reclaimed_since_gc; + + GC_TRACE("GC: bytes collected = %i\n", bytesCollected); + diff --git a/gnu/packages/patches/pnet-newer-texinfo-fix.patch b/gnu/packages/patches/pnet-newer-texinfo-fix.patch new file mode 100644 index 00000000000..b57052eeeaa --- /dev/null +++ b/gnu/packages/patches/pnet-newer-texinfo-fix.patch @@ -0,0 +1,13 @@ +diff --git a/doc/pnettools.texi b/doc/pnettools.texi +index 916d90bb..cdbe05cf 100644 +--- a/doc/pnettools.texi ++++ b/doc/pnettools.texi +@@ -59,7 +59,7 @@ Copyright @copyright{} 2001, 2002, 2003 Southern Storm Software, Pty Ltd + @center @titlefont{Portable.NET Development Tools} + + @vskip 0pt plus 1fill +-@center{Copyright @copyright{} 2001, 2002, 2003 Southern Storm Software, Pty Ltd} ++@center Copyright @copyright{} 2001, 2002, 2003 Southern Storm Software, Pty Ltd + @end titlepage + + @c ----------------------------------------------------------------------- From patchwork Mon Dec 16 17:26:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34946 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3646527BBEA; Mon, 16 Dec 2024 17:29:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8DCB727BBE2 for ; Mon, 16 Dec 2024 17:29:38 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuD-0000Nm-M3; Mon, 16 Dec 2024 12:29:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEu3-0000GA-SD for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:09 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu3-0001vf-2Z for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=096cJTemglKTUt+Ips/e/H9kF0RwxHB9Ttf+SXFbS4E=; b=nGe9LPLufDZwCxX+GxvoZiiXKZ6FllTxjGGr1c3VoZrWGbezeqDU+FaNzz+Cnn01i7aKTe5wuTXre88nG3i+1PLGBvHxsJx00k31Qr+o8ksBSFihiqyMTDft6nMs9zoNDoC0Guu/XmCJAtD6XPLZ/XFRnz12s2inVQGs5BlZCO29lI1GKD1plUBch4GAawC6qoomaY5AYiWTUHeJjmK8GBHROMEqhEp8L6mdNngrEILW78vuX4NoXxkLD1t8PlDMSKFVwwMGCRAcUhESxKct558v0syrY/2QO7A4Cn8xqJDDfkBD+SbEO0RJrh6YwZzw0HosBl82lJawCT5s7CTdWA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu2-0006KG-Ow for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 03/21] gnu: Add pnetlib-git. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437010624023 (code B ref 74609); Mon, 16 Dec 2024 17:29:06 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:26 +0000 Received: from localhost ([127.0.0.1]:55839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtN-0006FK-Qe for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:26 -0500 Received: from mail-wm1-f54.google.com ([209.85.128.54]:47346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtI-0006EI-9i for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:21 -0500 Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4361fe642ddso46629725e9.2 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370035; x=1734974835; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=096cJTemglKTUt+Ips/e/H9kF0RwxHB9Ttf+SXFbS4E=; b=XrjSy16TQi1u3D5KPTRotYiV18+JgoRHPYE3+fYLE/YWFn0dowALqt3yakweh6+Fkc xkwN/sssTKcRJBfCx/0BoCOo/fjREdp7Vr4oaP0DzmgKk72Lt1DY2Ga3Ry488KRSfEzf fJdlOSvFk3ot1+LiGIy2ElULxBkkZHl/HrYgDVjiaMa9yCwGnjXJnrlE4FJIxZFTeusW UugqHaw9zZlZu6eQDoRn93MJtE++7JY3wtWgcvtAzKegAtsOYPoJjgLt34ysa7vEcAmt qeb88H9vqe2rq2uqks92g3jm0ao6lYS4HnD+0j5P4LgJpCVzyd5W5J8WUmlYqj/paXwG xmqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370035; x=1734974835; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=096cJTemglKTUt+Ips/e/H9kF0RwxHB9Ttf+SXFbS4E=; b=p1a1FAdmX7P/0tWmURU7Hpo3p7JQUQ9NcZGLbcs3UlGYoHNfREy8vTsPLPjq+6peam L4pNd62uczXP6Z+wYoO+ScBlxsM3IZxtOTvLpF4HE8eqm6/lnzp4RP3tbwQbKdHLTpQK RGDeoX/L6OF47Dpz7B17Ia5w4lnW82D+vN4++HzCN8Eu99VNvBleH5wt/BmVcYAocLGu Q1ffIdFEdn9ElZaxKBjwa8CmoqbYJgcT6jthb14OVx2/8t10H8IRY4USr6tz/NhkwgHq +25BQ6EqY8T/4CYZ1wXeKQKgfD89F8N9/dCet2cRDQ5hlA6y071DV4T/ahPwL6Wbym8e D71A== X-Gm-Message-State: AOJu0YzZYIyyIgk8/hJ9kT+mgJQ02eeOFm0OfXrNbEhHnm2Y5jG4sss+ rCUMhmjvZr0kkgCMcVQGnlp1DyKb7HjkzzGacWt0CShF3n0XGJMPUjCEZJis X-Gm-Gg: ASbGncu0ITxH+4Gk7uOi0ElgUczWTEQFexLsMdaYZVV8PNIL8KnHdfsC1u3DAIa4rL0 gBFVqpQrR6bkeSyzFupGS1VLiQeABr80zlREwO5m3vxEZiw5JSa2kT9u4Yc3e0CAnw49pAcUQBm EBq19rBm/mLFpBaVRXtEIlon/+z0ZxsNaqsOUoOUroI9Vs2BM8684OsUuzb5nTF9G8Iu0Q2DLR2 7SDc4vGPXa1AtdLzxWPovwzRzJSZF2mTp730FFwdLC88ihUi/nhNurnlDr0TQ== X-Google-Smtp-Source: AGHT+IEUgNs0PXYWw1rLM2Go8LI5+lH4MYwYHFQimvGii544Uk+r44qijO6xhwA5YzpIekapulVcCw== X-Received: by 2002:a05:600c:1f1b:b0:434:fa73:a907 with SMTP id 5b1f17b1804b1-4362aa2f0abmr132247235e9.13.1734370034430; Mon, 16 Dec 2024 09:27:14 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4361ec75410sm154282465e9.1.2024.12.16.09.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:13 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:26 +0200 Message-ID: <9b24a9d4637274ec109c82eec483f56bb97a8fa9.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (pnetlib-git): New variable. Change-Id: I3a041de181d96bfe9e447d72ddd9578e12db8014 --- gnu/packages/dotnet.scm | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index cd8886c8398..1a027854ced 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -159,3 +159,60 @@ (define-public pnet-git to build and execute .NET applications, including a C# compiler, assembler, disassembler, and runtime engine.") (license license:gpl2+)))) + +(define-public pnetlib-git + (let ((version "0.8.0") + (commit "c3c12b8b0c65f5482d03d6a4865f7670e98baf4c") + (revision "0")) + (package + (name "pnetlib-git") + (version (git-version version revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url + "https://git.savannah.gnu.org/git/dotgnu-pnet/pnetlib.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "04dikki3lr3m1cacirld90rpi95656b2y2mc5rkycb7s0yfdz1nk")) + (modules '((guix build utils))) + (snippet + #~(begin + (for-each delete-file (filter file-exists? + '("configure" + "config.guess" + "config.sub" + "install-sh" + "ltmain.sh"))) + (for-each delete-file (find-files "." "Makefile(\\.in)?$")) + (substitute* (find-files "tests" "^Makefile\\.am$") + (("TESTS_ENVIRONMENT.*") + (string-append + "LOG_COMPILER = $(SHELL)\n" + "AM_LOG_FLAGS = $(top_builddir)/tools/run_test.sh" + " $(top_builddir)"))) + (substitute* "tools/run_test.sh.in" + (("en_US") "en_US.utf8")) + (substitute* "tools/wrapper.sh.in" + (("exec .LN_S clrwrap ..1." all) + (string-append + "echo '#!@SHELL@' >> $1\n" + "echo exec $CLRWRAP" + " $(dirname $(dirname $1))" + "/lib/cscc/lib/$(basename $1).exe >> $1\n" + "chmod +x $1"))))))) + (build-system gnu-build-system) + (arguments + (list #:make-flags #~(list "CFLAGS+=-Wno-pointer-to-int-cast"))) + (native-inputs + (list autoconf automake libtool treecc)) + (inputs + (list pnet-git)) + (home-page "http://www.gnu.org/software/dotgnu/html2.0/pnet.html") + (synopsis "Libraries for the C# programming language") + (description + "DotGNU Portable.NET Library contains an implementation of the C# library, +for use with .NET-capable runtime engines and applications.") + (license license:gpl2+)))) From patchwork Mon Dec 16 17:26:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34947 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 13B8527BBE2; Mon, 16 Dec 2024 17:29:43 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5CD8127BBE9 for ; Mon, 16 Dec 2024 17:29:41 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuN-0000TU-51; Mon, 16 Dec 2024 12:29:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEu5-0000IG-Fc for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:11 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu4-0001vt-LW for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=KNZ8scw786ESgmoMjsnQZxE98UPRcCPXMtTGJNsxfBY=; b=MctYPzRkyhoLmMBV+QkERwNljbbw8kwBDivM3xrfQYoJL4MFRZi7Tp0fqs7Ao8gWA08nNqmxl+v8doNZpfkBxo9K1Piz/N2sSjLjaLSywmtt39WIBVq1Q7gS19SanVhTKGOFx/9/zMHbe+M+QmumO/U1u5uYzNyDezr9NQrG2sNrJ0k12kGiwmOYL+df4RK4OxXvTV67/VJnPr87ABqPonuvhyFau6XFLfj00uvzkPp4Qvb/myHdvNv2e2RF5ButoMKsq/xJ0ngXGnzwQQeZxIwYONzBQJ8wiUYUoD+e1Se/tvqCPF5UY1kax7EjhX/UKvsIM1KIsZVqVroMaShxTQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu4-0006Kp-Bq for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 04/21] gnu: Add mono-1.2.6. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437011324065 (code B ref 74609); Mon, 16 Dec 2024 17:29:08 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:33 +0000 Received: from localhost ([127.0.0.1]:55844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtS-0006Fo-Gf for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:32 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:59519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtK-0006EU-Q0 for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:25 -0500 Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-436202dd730so31549225e9.2 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370037; x=1734974837; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=KNZ8scw786ESgmoMjsnQZxE98UPRcCPXMtTGJNsxfBY=; b=bXYxmh6gPcqsjLWScwD6XOlknDNlcSFoSvFt+4zrvbSdUcWBJPax2B9gXFOX2llF2W X1sOGneSso7UEENKyI0te51vSLLH5iPWu9bGPjrgMq9JWpsQnxocu4w3D96ECLjSNfrb 3qnbvnj1N/2FNaBOO652obfjTNtA/++h32dzykfEbQ3jniVVxvGCNsKnhXLgT70wPpJj Rxlf2N9Y8HIywNKzD7440kXJZOyL2SLxjeHZVXtn8Wssa0XGdNMTYQx2fy/xZNB25dm5 ccX8cNFJD0S9LpKyQbdkF0mHbwO3mTbY+QyCWfRE8s+l37EQ/MHGsq5wkPyakewqUjEy WSqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370037; x=1734974837; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KNZ8scw786ESgmoMjsnQZxE98UPRcCPXMtTGJNsxfBY=; b=gl1vui4067e5x/VnZStGkuT/BaRXmEupWQ1EUQvsjGSsgqza7YHNt/AQ0yFr/XO5Ol d0XzbO6hr8SNyecxv4zwGuPi1fEUoB/Yj0YciIWbnf9msY6LaSuKle8vm++oajfKH8lV x6tskcqAnJd46eYdcEhysucWfvowi6/hszEW27UHS4+n3MmNZe5YACTjdbWcVjiuCFLp fUckDF1aWB6XfdVacaSMgdPWlzm6spu3K97obfxZef0gMTKOOVL9RypU31kasy88dcNB MULnoMw+Rz3X5PgmHP8/FuyfeITlYFsmy7B34YSVtRlM44vKQ+fuy+fqAFqQZIa3XLiN J6kA== X-Gm-Message-State: AOJu0YwNNijeFqZiSs45V3jLkmZraMvqbEaO1ZF3WkIiyt66xEBdLsbM mEF5TrHUOTv9H27eLWGSgVtYzoKRyrt7iegV1fEYjYHA3ct4imwfyRSBB5ul X-Gm-Gg: ASbGncusH8NrruJj7s76rd1t2VOXPrYulI3tgi3P/m1qWnbmKWJOdqOsgxiSCtn/Da6 4uOdc5wUEbhbV5BuJhBjhd714lx9EPJ682K6MAwbkxsPvO7//pXa2LHkhsukIgS82V1W32rTLnd scSaWGQ6WRhCFw6Jnj7zUYiBXivVfC13MVkKFwvB+/QhwZC+pSBQMD+tuE69hREX6nYQmBiYqFT u5Rcy+srCvIDygjrjj0iqBjenm9rudKLihlx/0D0a61RUP8JGu/kW/rLuuM6g== X-Google-Smtp-Source: AGHT+IFOa8lTolzDX4FMS6D0Qn+z5mm2KHgykXgtG2jCz1PsnvpBgbJcKZqXQ3GkCMcyi7/Uv4Rbcg== X-Received: by 2002:a05:6000:1ac8:b0:386:3e48:f732 with SMTP id ffacd0b85a97d-38880acd52fmr11019926f8f.16.1734370036647; Mon, 16 Dec 2024 09:27:16 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8016275sm8618959f8f.24.2024.12.16.09.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:16 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:27 +0200 Message-ID: <6a867624b7826756425f2fce8b8d77628b3d9fd4.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-1.2.6): New variable. * gnu/packages/patches/mono-1.2.6-bootstrap.patch: New patch. * gnu/local.mk (dist_patch_DATA): register it. Change-Id: I73765d921c28c473271a2038dfaa53cc7fdad3c5 --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 145 +++++ .../patches/mono-1.2.6-bootstrap.patch | 585 ++++++++++++++++++ 3 files changed, 731 insertions(+) create mode 100644 gnu/packages/patches/mono-1.2.6-bootstrap.patch diff --git a/gnu/local.mk b/gnu/local.mk index 8fc98c8fd22..bd2d3e61df4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1818,6 +1818,7 @@ dist_patch_DATA = \ %D%/packages/patches/mpg321-gcc-10.patch \ %D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ + %D%/packages/patches/mono-1.2.6-bootstrap.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 1a027854ced..2f93d4bbd00 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -216,3 +216,148 @@ (define-public pnetlib-git "DotGNU Portable.NET Library contains an implementation of the C# library, for use with .NET-capable runtime engines and applications.") (license license:gpl2+)))) + +(define prepare-mono-source-0 + #~((false-if-exception + (delete-file "./configure")) + (false-if-exception + (delete-file-recursively "./libgc")) + ;; just to be sure + (for-each delete-file + (find-files "." + "\\.(dll|exe|DLL|EXE|so)$")) + ;; We deleted docs/AgilityPack.dll earlier (if it existed), and it's + ;; required for building the documentation, so skip building the + ;; documentation. According to docs/README, "the sources to this DLL + ;; live in GNOME CVS module beagle/Filters/AgilityPack". + (substitute* "./Makefile.am" + (("^(|DIST_|MOONLIGHT_|MONOTOUCH_)SUBDIRS =.*" all) + (string-replace-substring + (string-replace-substring + (string-replace-substring all " docs" "") + " $(libgc_dir)" "") + " libgc" ""))))) + +;; A lot of the fixes are shared between many versions, and it doesn't hurt to +;; apply them to versions before or after they are necessary, so just include +;; them all. +(define prepare-mono-source + #~(begin + #$@prepare-mono-source-0 + (substitute* (filter file-exists? + '("./configure.in" + "./configure.ac")) + (("int f = isinf \\(1\\);") + "int f = isinf (1.0);")) + ;; makedev is in now. Include + ;; it. + (substitute* "mono/io-layer/processes.c" + (("#ifdef HAVE_SYS_MKDEV_H") "#if 1") + (("sys/mkdev.h") "sys/sysmacros.h")) + (substitute* (filter file-exists? '("./mono/metadata/boehm-gc.c")) + (("GC_set_finalizer_notify_proc") + "GC_set_await_finalize_proc") + (("GC_toggleref_register_callback") + "GC_set_toggleref_func")) + (substitute* (filter file-exists? '("./mono/utils/mono-compiler.h")) + (("static __thread gpointer x MONO_TLS_FAST") + (string-append + "static __thread gpointer x" + " __attribute__((used))"))) + ;; Since the time the old mono versions were written at, gcc has started + ;; removing more things it thinks are unused (for example because they + ;; are only referenced in inline assembly of some sort). + (substitute* (filter file-exists? '("./mono/metadata/sgen-alloc.c")) + (("static __thread char \\*\\*tlab_next_addr") + (string-append + "static __thread char **tlab_next_addr" + " __attribute__((used))"))) + (substitute* (filter file-exists? '("mono/utils/mono-compiler.h")) + (("#define MONO_TLS_FAST ") + "#define MONO_TLS_FAST __attribute__((used)) ")))) + +(define-public mono-1.2.6 + (package + (version "1.2.6") + (name "mono") + (source (origin + (method url-fetch) + (uri (string-append + "http://download.mono-project.com/sources/mono/" + "mono" "-" version ".tar.bz2")) + (sha256 + (base32 "03sn7wyvrjkkkbrqajpmqifxfn83p30qprizpb3m6c5cdhwlzk14")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$prepare-mono-source + (delete-file + "./mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs") + ;; Can't patch a file with different line endings, + ;; so the patch creates a new one, and we overwrite + ;; the old one here. + (rename-file + "./mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs-2" + "./mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs"))) + (patches + (search-patches "mono-1.2.6-bootstrap.patch")))) + (build-system gnu-build-system) + (native-inputs + (list autoconf + automake + bison + libtool + pnet-git + pnetlib-git + pkg-config)) + (inputs + (list glib + libgc + libx11 + zlib)) + (arguments + (list + #:configure-flags #~(list "--with-gc=boehm") + #:make-flags #~(list (string-append "EXTERNAL_MCS=" + #+(this-package-native-input "pnet-git") + "/bin/cscc") + (string-append "EXTERNAL_RUNTIME=" + #+(this-package-native-input "pnet-git") + "/bin/ilrun") + "CFLAGS+=-DARG_MAX=500" + "CC=gcc" + "V=1") + ;; build fails nondeterministically without this + #:parallel-build? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-env + (lambda _ ;;* (#:key inputs #:allow-other-keys) + ;; all tests under mcs/class fail trying to access $HOME + (setenv "HOME" "/tmp") + ;; ZIP files have "DOS time" which starts in Jan 1980. + (setenv "SOURCE_DATE_EPOCH" "315532800")))) + ;; System.Object isn't marked as serializable because it causes issues + ;; with compiling with pnet (circular class reference between Object and + ;; SerializableAttribute), and this causes tests to fail + #:tests? #f)) + (native-search-paths + (list (search-path-specification + (variable "MONO_PATH") + (files (list "lib/mono"))))) + (synopsis "Compiler and libraries for the C# programming language") + (description "Mono is a compiler, vm, debugger and set of libraries for +C#, a C-style programming language from Microsoft that is very similar to +Java.") + (home-page "https://www.mono-project.com/") + ;; See ./LICENSE + (license (list + ;; most of mcs/tools, mono/man, most of mcs/class, tests by + ;; default, mono/eglib + license:x11 + ;; mcs/mcs, mcs/gmcs, some of mcs/tools + license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version + ;; mono/mono (the mono VM, I think they meant mono/mini) + license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version + ;; mcs/jay + license:bsd-4)))) diff --git a/gnu/packages/patches/mono-1.2.6-bootstrap.patch b/gnu/packages/patches/mono-1.2.6-bootstrap.patch new file mode 100644 index 00000000000..0f6efd4a034 --- /dev/null +++ b/gnu/packages/patches/mono-1.2.6-bootstrap.patch @@ -0,0 +1,585 @@ +diff --git a/mcs/class/System/System.Diagnostics/ICollectData.cs b/mcs/class/System/System.Diagnostics/ICollectData.cs +index c52f9871589..c66c1936d3d 100644 +--- a/mcs/class/System/System.Diagnostics/ICollectData.cs ++++ b/mcs/class/System/System.Diagnostics/ICollectData.cs +@@ -41,7 +41,7 @@ namespace System.Diagnostics + #endif + public interface ICollectData { + void CloseData (); +- [return: MarshalAs(UnmanagedType.I4)] ++ //[return: MarshalAs(UnmanagedType.I4)] + void CollectData ( + [In] [MarshalAs(UnmanagedType.I4)] int id, + [In] [MarshalAs(UnmanagedType.SysInt)] IntPtr valueName, +diff --git a/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs b/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs +index 280e6a97227..c41816dca24 100644 +--- a/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs ++++ b/mcs/class/System/System.Diagnostics/LocalFileEventLog.cs +@@ -140,6 +140,30 @@ namespace System.Diagnostics + file_watcher.EnableRaisingEvents = false; + } + ++ void FileCreationWatcher(object o, FileSystemEventArgs e) ++ { ++ lock (this) { ++ if (_notifying) ++ return; ++ _notifying = true; ++ } ++ ++ // Process every new entry in one notification event. ++ try { ++ while (GetLatestIndex () > last_notification_index) { ++ try { ++ CoreEventLog.OnEntryWritten (GetEntry (last_notification_index++)); ++ } catch (Exception ex) { ++ // FIXME: find some proper way to output this error ++ Debug.WriteLine (ex); ++ } ++ } ++ } finally { ++ lock (this) ++ _notifying = false; ++ } ++ } ++ + public override void EnableNotification () + { + if (file_watcher == null) { +@@ -149,28 +173,7 @@ namespace System.Diagnostics + + file_watcher = new FileSystemWatcher (); + file_watcher.Path = logDir; +- file_watcher.Created += delegate (object o, FileSystemEventArgs e) { +- lock (this) { +- if (_notifying) +- return; +- _notifying = true; +- } +- +- // Process every new entry in one notification event. +- try { +- while (GetLatestIndex () > last_notification_index) { +- try { +- CoreEventLog.OnEntryWritten (GetEntry (last_notification_index++)); +- } catch (Exception ex) { +- // FIXME: find some proper way to output this error +- Debug.WriteLine (ex); +- } +- } +- } finally { +- lock (this) +- _notifying = false; +- } +- }; ++ file_watcher.Created += new FileSystemEventHandler(FileCreationWatcher); + } + last_notification_index = GetLatestIndex (); + file_watcher.EnableRaisingEvents = true; +diff --git a/mcs/class/System/System.IO/InotifyWatcher.cs b/mcs/class/System/System.IO/InotifyWatcher.cs +index d8e7acce3a7..7b0907eebc1 100644 +--- a/mcs/class/System/System.IO/InotifyWatcher.cs ++++ b/mcs/class/System/System.IO/InotifyWatcher.cs +@@ -423,19 +423,36 @@ namespace System.IO { + return 16 + len; + } + ++ class ThingEnumerator : IEnumerator, IEnumerable ++ { ++ object thing; ++ int j; ++ public ThingEnumerator(object thing) ++ { this.thing = thing; j = -1; } ++ ++ public IEnumerator GetEnumerator() { return this; } ++ public bool MoveNext() ++ { ++ if(thing == null) { return false; } ++ if(thing is ArrayList) ++ { ++ ArrayList list = (ArrayList) thing; ++ if(j+1 >= list.Count) { return false; } ++ j++; ++ return true; ++ } ++ if(j == -1) { j = 0; return true; } ++ return false; ++ } ++ public void Reset() { j = -1; } ++ public object Current ++ { get { if(thing is ArrayList) return ((ArrayList)thing)[j]; ++ return thing; }} ++ } ++ + static IEnumerable GetEnumerator (object source) + { +- if (source == null) +- yield break; +- +- if (source is InotifyData) +- yield return source; +- +- if (source is ArrayList) { +- ArrayList list = (ArrayList) source; +- for (int i = 0; i < list.Count; i++) +- yield return list [i]; +- } ++ return new ThingEnumerator(source); + } + + /* Interesting events: +diff --git a/mcs/class/System/System.Net/ServicePoint.cs b/mcs/class/System/System.Net/ServicePoint.cs +index a884d90f507..e1c73b098c2 100644 +--- a/mcs/class/System/System.Net/ServicePoint.cs ++++ b/mcs/class/System/System.Net/ServicePoint.cs +@@ -137,7 +137,7 @@ namespace System.Net + get { + return idleSince; + } +- internal set { ++ set { + lock (locker) + idleSince = value; + } +diff --git a/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs-2 b/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs-2 +new file mode 100644 +index 00000000000..a685e2679b7 +--- /dev/null ++++ b/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs-2 +@@ -0,0 +1,168 @@ ++// ++// BaseMachine.jvm.cs ++// ++// Author: ++// author: Dan Lewis (dlewis@gmx.co.uk) ++// (c) 2002 ++// Copyright (C) 2005 Novell, Inc (http://www.novell.com) ++// ++ ++// ++// Permission is hereby granted, free of charge, to any person obtaining ++// a copy of this software and associated documentation files (the ++// "Software"), to deal in the Software without restriction, including ++// without limitation the rights to use, copy, modify, merge, publish, ++// distribute, sublicense, and/or sell copies of the Software, and to ++// permit persons to whom the Software is furnished to do so, subject to ++// the following conditions: ++// ++// The above copyright notice and this permission notice shall be ++// included in all copies or substantial portions of the Software. ++// ++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++// ++ ++using System; ++using System.Collections; ++using System.Collections.Specialized; ++ ++namespace System.Text.RegularExpressions ++{ ++ abstract class BaseMachine : IMachine ++ { ++ internal delegate void MatchAppendEvaluator (Match match, StringBuilder sb); ++ ++ public virtual string Replace (Regex regex, string input, string replacement, int count, int startat) ++ { ++ ReplacementEvaluator ev = new ReplacementEvaluator (regex, replacement); ++ if (regex.RightToLeft) ++ return RTLReplace (regex, input, new MatchEvaluator (ev.Evaluate), count, startat); ++ else ++ return LTRReplace (regex, input, new MatchAppendEvaluator (ev.EvaluateAppend), count, startat); ++ } ++ ++ virtual public string [] Split (Regex regex, string input, int count, int startat) ++ { ++ ArrayList splits = new ArrayList (); ++ if (count == 0) ++ count = Int32.MaxValue; ++ ++ int ptr = startat; ++ Match m = null; ++ while (--count > 0) { ++ if (m != null) ++ m = m.NextMatch (); ++ else ++ m = regex.Match (input, ptr); ++ ++ if (!m.Success) ++ break; ++ ++ if (regex.RightToLeft) ++ splits.Add (input.Substring (m.Index + m.Length, ptr - m.Index - m.Length)); ++ else ++ splits.Add (input.Substring (ptr, m.Index - ptr)); ++ ++ int gcount = m.Groups.Count; ++ for (int gindex = 1; gindex < gcount; gindex++) { ++ Group grp = m.Groups [gindex]; ++ splits.Add (input.Substring (grp.Index, grp.Length)); ++ } ++ ++ if (regex.RightToLeft) ++ ptr = m.Index; ++ else ++ ptr = m.Index + m.Length; ++ ++ } ++ ++ if (regex.RightToLeft && ptr >= 0) ++ splits.Add (input.Substring (0, ptr)); ++ if (!regex.RightToLeft && ptr <= input.Length) ++ splits.Add (input.Substring (ptr)); ++ ++ return (string []) splits.ToArray (typeof (string)); ++ } ++ ++ virtual public Match Scan (Regex regex, string text, int start, int end) ++ { ++ throw new NotImplementedException ("Scan method must be implemented in derived classes"); ++ } ++ ++ virtual public string Result (string replacement, Match match) ++ { ++ return ReplacementEvaluator.Evaluate (replacement, match); ++ } ++ ++ internal static string LTRReplace (Regex regex, string input, MatchAppendEvaluator evaluator, int count, int startat) ++ { ++ Match m = regex.Match (input, startat); ++ if (!m.Success) ++ return input; ++ ++ StringBuilder result = new StringBuilder (); ++ int ptr = startat; ++ int counter = count; ++ ++ result.Append (input, 0, ptr); ++ ++ do { ++ if (count != -1) ++ if (counter-- <= 0) ++ break; ++ if (m.Index < ptr) ++ throw new SystemException ("how"); ++ result.Append (input, ptr, m.Index - ptr); ++ evaluator (m, result); ++ ++ ptr = m.Index + m.Length; ++ m = m.NextMatch (); ++ } while (m.Success); ++ ++ result.Append (input, ptr, input.Length - ptr); ++ ++ return result.ToString (); ++ } ++ ++ internal static string RTLReplace (Regex regex, string input, MatchEvaluator evaluator, int count, int startat) ++ { ++ Match m = regex.Match (input, startat); ++ if (!m.Success) ++ return input; ++ ++ int ptr = startat; ++ int counter = count; ++ StringCollection pieces = new StringCollection (); ++ pieces.Add (input.Substring (ptr)); ++ ++ do { ++ if (count != -1) ++ if (counter-- <= 0) ++ break; ++ if (m.Index + m.Length > ptr) ++ throw new SystemException ("how"); ++ pieces.Add (input.Substring (m.Index + m.Length, ptr - m.Index - m.Length)); ++ pieces.Add (evaluator (m)); ++ ++ ptr = m.Index; ++ m = m.NextMatch (); ++ } while (m.Success); ++ ++ StringBuilder result = new StringBuilder (); ++ ++ result.Append (input, 0, ptr); ++ for (int i = pieces.Count; i > 0; ) ++ result.Append (pieces [--i]); ++ ++ pieces.Clear (); ++ ++ return result.ToString (); ++ } ++ } ++} +diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs +index 94069d1727e..042574178fa 100644 +--- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs ++++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs +@@ -272,6 +272,10 @@ namespace System.Runtime.Remoting.Messaging { + set { _uri = value; } + } + ++ string IMethodMessage.Uri { ++ get { return Uri; } ++ } ++ + string IInternalMessage.Uri { + get { return Uri; } + set { Uri = value; } +diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodResponse.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodResponse.cs +index 1b1eab014b3..575e7e37dee 100644 +--- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodResponse.cs ++++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodResponse.cs +@@ -272,6 +272,10 @@ namespace System.Runtime.Remoting.Messaging { + } + } + ++ string IMethodMessage.Uri { ++ get { return Uri; } ++ } ++ + string IInternalMessage.Uri { + get { return Uri; } + set { Uri = value; } +diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs +index aee39f5bb81..ec09b73c15d 100644 +--- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs ++++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs +@@ -166,6 +166,10 @@ namespace System.Runtime.Remoting.Messaging + } + } + ++ string IMethodMessage.Uri { ++ get { return Uri; } ++ } ++ + string IInternalMessage.Uri { + get { return Uri; } + set { Uri = value; } +diff --git a/mcs/class/corlib/System/MulticastDelegate.cs b/mcs/class/corlib/System/MulticastDelegate.cs +index b36aff33492..cf9134a33b3 100644 +--- a/mcs/class/corlib/System/MulticastDelegate.cs ++++ b/mcs/class/corlib/System/MulticastDelegate.cs +@@ -262,16 +262,16 @@ namespace System + + public static bool operator == (MulticastDelegate a, MulticastDelegate b) + { +- if (a == null) +- return b == null; ++ if ((object)a == null) ++ return (object)b == null; + + return a.Equals (b); + } + + public static bool operator != (MulticastDelegate a, MulticastDelegate b) + { +- if (a == null) +- return b != null; ++ if ((object)a == null) ++ return (object)b != null; + + return !a.Equals (b); + } +diff --git a/mcs/class/corlib/System/Object.cs b/mcs/class/corlib/System/Object.cs +index 6b0a03d2a31..694cbd454e1 100644 +--- a/mcs/class/corlib/System/Object.cs ++++ b/mcs/class/corlib/System/Object.cs +@@ -40,7 +40,7 @@ using System.Runtime.ConstrainedExecution; + + namespace System { + +- [Serializable] ++ //[Serializable] + [ClassInterface (ClassInterfaceType.AutoDual)] + #if NET_2_0 + [ComVisible (true)] +@@ -47,6 +47,12 @@ + #endif + public class Object { + ++ // Default definition of the object finalizer. ++ #if NET_2_0 ++ [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)] ++ #endif ++ protected virtual void Finalize() {} ++ + // + // Compares this object to the specified object. + // Returns true if they are equal, false otherwise. +@@ -80,16 +86,6 @@ namespace System { + { + } + +- // +- // Object destructor. +- // +-#if NET_2_0 +- [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)] +-#endif +- ~Object () +- { +- } +- + // + // Returns a hashcode for this object. Each derived + // class should return a hash code that makes sense +diff --git a/mcs/mcs/codegen.cs b/mcs/mcs/codegen.cs +index c94a61772f4..8546d671ec6 100644 +--- a/mcs/mcs/codegen.cs ++++ b/mcs/mcs/codegen.cs +@@ -498,7 +498,7 @@ namespace Mono.CSharp { + + // utility helper for CheckExpr, UnCheckExpr, Checked and Unchecked statements + // it's public so that we can use a struct at the callsite +- public struct FlagsHandle : IDisposable ++ public class FlagsHandle : IDisposable + { + EmitContext ec; + readonly Flags invmask, oldval; +diff --git a/mcs/mcs/typemanager.cs b/mcs/mcs/typemanager.cs +index 1e173de89d2..58477af41a3 100644 +--- a/mcs/mcs/typemanager.cs ++++ b/mcs/mcs/typemanager.cs +@@ -629,18 +629,42 @@ namespace Mono.CSharp { + return CSharpName (GetFullName (t)); + } + ++ static bool StartsWithWord(string haystack, string check) ++ { ++ if(String.Compare(haystack, 0, check, 0, check.Length, false) != 0) ++ { return false; } ++ if(check.Length == haystack.Length) { return true; } ++ char c = haystack[check.Length]; ++ return !(Char.IsLetter(c) || Char.IsDigit(c)); ++ } ++ + public static string CSharpName (string name) + { + if (name.StartsWith (AnonymousTypeClass.ClassNamePrefix)) + return AnonymousTypeClass.SignatureForError; +- +- return Regex.Replace (name, +- @"^System\." + +- @"(Int32|UInt32|Int16|UInt16|Int64|UInt64|" + +- @"Single|Double|Char|Decimal|Byte|SByte|Object|" + +- @"Boolean|String|Void|Null)" + +- @"(\W+|\b)", +- new MatchEvaluator (CSharpNameMatch)).Replace ('+', '.'); ++ ++ int l = "System.".Length; ++ if(name.StartsWith("System.") && name.Length > l) ++ { ++ string s2 = name.Substring(l).ToLower(); ++ if(StartsWithWord(s2, "int32")) ++ return "int"; ++ if(StartsWithWord(s2, "uint32")) ++ return "uint"; ++ if(StartsWithWord(s2, "int16")) ++ return "short"; ++ if(StartsWithWord(s2, "uint16")) ++ return "ushort"; ++ if(StartsWithWord(s2, "int64")) ++ return "long"; ++ if(StartsWithWord(s2, "uint64")) ++ return "ulong"; ++ if(StartsWithWord(s2, "single")) ++ return "float"; ++ if(StartsWithWord(s2, "boolean")) ++ return "bool"; ++ } ++ return name; + } + + static public string CSharpName (Type[] types) +@@ -654,21 +678,6 @@ namespace Mono.CSharp { + return sb.ToString (); + } + +- static String CSharpNameMatch (Match match) +- { +- string s = match.Groups [1].Captures [0].Value; +- return s.ToLower (). +- Replace ("int32", "int"). +- Replace ("uint32", "uint"). +- Replace ("int16", "short"). +- Replace ("uint16", "ushort"). +- Replace ("int64", "long"). +- Replace ("uint64", "ulong"). +- Replace ("single", "float"). +- Replace ("boolean", "bool") +- + match.Groups [2].Captures [0].Value; +- } +- + // Used for error reporting to show symbolic name instead of underlying value + public static string CSharpEnumValue (Type t, object value) + { +diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c +index cd6176cdda2..486087d3a1b 100644 +--- a/mono/io-layer/processes.c ++++ b/mono/io-layer/processes.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am +index 6ff2368895b..b8ba66e8756 100644 +--- a/mono/metadata/Makefile.am ++++ b/mono/metadata/Makefile.am +@@ -154,7 +154,6 @@ libmonoruntimeinclude_HEADERS = \ + object.h \ + exception.h \ + profiler.h \ +- appdomain.h \ + mono-config.h \ + debug-helpers.h \ + mempool.h +diff --git a/mono/metadata/class.c b/mono/metadata/class.c +index f13f37632fe..128710337f4 100644 +--- a/mono/metadata/class.c ++++ b/mono/metadata/class.c +@@ -2695,10 +2695,10 @@ initialize_object_slots (MonoClass *class) + finalize_slot = i; + } + +- g_assert (ghc_slot > 0); ++ g_assert (ghc_slot >= 0); + default_ghc = class->vtable [ghc_slot]; + +- g_assert (finalize_slot > 0); ++ g_assert (finalize_slot >= 0); + default_finalize = class->vtable [finalize_slot]; + } + } +diff --git a/mono/metadata/object.c b/mono/metadata/object.c +index 2b6f4909b34..ef4c8fd8b44 100644 +--- a/mono/metadata/object.c ++++ b/mono/metadata/object.c +@@ -861,7 +861,7 @@ mono_class_compute_gc_descriptor (MonoClass *class) + mono_register_jit_icall (GC_local_gcj_fast_malloc, "GC_local_gcj_fast_malloc", mono_create_icall_signature ("object int ptr"), FALSE); + #endif + mono_register_jit_icall (GC_gcj_malloc, "GC_gcj_malloc", mono_create_icall_signature ("object int ptr"), FALSE); +- mono_register_jit_icall (GC_gcj_fast_malloc, "GC_gcj_fast_malloc", mono_create_icall_signature ("object int ptr"), FALSE); ++ mono_register_jit_icall (GC_gcj_malloc, "GC_gcj_fast_malloc", mono_create_icall_signature ("object int ptr"), FALSE); + #endif + gcj_inited = TRUE; + mono_loader_unlock (); +diff --git a/runtime/Makefile.am b/runtime/Makefile.am +index 779787b3ce3..b67957dcf16 100644 +--- a/runtime/Makefile.am ++++ b/runtime/Makefile.am +@@ -1,6 +1,3 @@ +-# hack to prevent 'check' from depending on 'all' +-AUTOMAKE_OPTIONS = cygnus +- + tmpinst = _tmpinst + + noinst_SCRIPTS = mono-wrapper monodis-wrapper semdel-wrapper From patchwork Mon Dec 16 17:26:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34961 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 92CB227BBE2; Mon, 16 Dec 2024 17:31:07 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6DB6027BBEA for ; Mon, 16 Dec 2024 17:31:06 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEvp-0001dK-0p; Mon, 16 Dec 2024 12:30:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEu0-0000FQ-Pa for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:06 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu0-0001vM-EP for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=xzD+IGCEA04X9RKqAXpz/JIXIML6PGBckSTMc+6eg08=; b=ixN66V8TOF11jP86djG1D/liiMuZ9OzKnp1RvQ4n2Vd2N/5+KT9HmgMTg52FVzm/Ijvwfnhnch7fjP/X5nUIk7XFmv0gLg+n16e1Q96AuzG3iCUshPyQS+lcLymkL/jnjew4bHGiyzeGUK5/bLC2MIye18Y8qYRCkxonIpqahULu3UjmZC6FSNClvq2vqvSkkhPbIGmTkxYPnPF53NDHiT4asGbnF69CJNRjSC+4ZzJa0Fr/lqSVrl9RbB66xxxNQatWxDtNY2KrLMdKPArSLzzT/p1r3wq5jY1MhFj7TuXOQD5vFt1sfJymwtW8zghsqueSz5lwcYSOzvDHXC5x1g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu0-0006Jn-7j for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 05/21] gnu: Add mono-1.9.1. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437010223999 (code B ref 74609); Mon, 16 Dec 2024 17:29:04 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:22 +0000 Received: from localhost ([127.0.0.1]:55834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtK-0006F0-06 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:22 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:57823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtH-0006Ee-Eb for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:20 -0500 Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-385df53e559so3655484f8f.3 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370039; x=1734974839; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=xzD+IGCEA04X9RKqAXpz/JIXIML6PGBckSTMc+6eg08=; b=U0mRZQ912FMhEyH4Oh3WzOrq/y7rwFTZONBVZBT8kn4nF57W/MRZSxGZJb+x6Fbae7 SDIYYYujHLbGBOJ2Jd1dUAWgV+gGzSskUSiRaPM+lJXFgYdrlR7i7/agxVEhIEDxmW3v 5vcaDfNjavE9cPtZgiPgF9Nh11FNBuP6iA/msHqTB+rfLCWpMgon4hs5UXmvWFi7cNJF ZiMb04WJFQHRXyzZ6qubXmGie/y3wiPYSRf7fhC6XHHeAXO44R89toecB5CtiEyLndTW kkxC3auUlycKTqyzFLsdcm3geq4yJlh+0+4SNstrhUHNQoqTw2RVqCdw0EDzXG83hJ1C 1vgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370039; x=1734974839; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xzD+IGCEA04X9RKqAXpz/JIXIML6PGBckSTMc+6eg08=; b=LT/ckD8NGIaYubHMXzz4SxqO3Ky4cTmXD4Z8wBXODuGSciWwp7A5T658Ao500nVnjM z31i2fZIOPHBPntERAdO7ILn4OYFLGi8rY+7hUC+PFyY2YCTCVVHxzqXuyi1SOuWyFuK ozoa1sleh41ZwoHyKtN2tB6rcXpmnP2bKB7vpIBX08UfWRcu4zfgNBH9WviT6LvvUrR2 FmdWvXD60esm8eK9XZYqJAvHj0vSDqBh7wQRClxBSVa7vo+GlaZ+O4mBnJn3zpryi0Ci aMTn8M9lUQUemMIMnJ7oSWLuAFiiAY15hkNDCV7AeqtlxN1sWeqQ8g2n92mCGoP5OMKg 77fA== X-Gm-Message-State: AOJu0YxsC9af9/9AuXYU+16u8/Vt0HdP1e2JhqlKVqC5hf+clgDg8d4+ TEaZnpiQW0+Rov13RoF9VinLXM7GjcSnJ1JL+du8Rd9i3ODrNjdn8xAnVFI6 X-Gm-Gg: ASbGncvEww1nd6iAa3Q/f00kcxGX4/Jhhz3YiKJURO8mLhKxkbpVUdJvMjreMcm5lMW cfRfdMI9IwUUAxD670XZAGhYpwVTOokmWsRxCuELvgdhMqJdX7Usu+HWRYgI0TNo4qaMML4dDhe mLzj+ZwevOWiDPAvwqCWOTnsFlmHfC/EJQqnt43XJObK8WfMxRbKs13MREVWu2w1eRJ58B7KggR oQTGWj9VwqRxwdh8XDtO5ScA/ZUxCcowWJWP6sIc3cN7gYsDxwJ+Y+9DUo7tQ== X-Google-Smtp-Source: AGHT+IH0GUWfkOpv774hkZ1HqL5ebiSNH9p89TVWi8FmPjcsAdHdctAkmnj8zP+ooF66y3y/03Umaw== X-Received: by 2002:a05:6000:1f85:b0:385:f7d9:99f5 with SMTP id ffacd0b85a97d-3889ad354a0mr9687246f8f.51.1734370038724; Mon, 16 Dec 2024 09:27:18 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c801acaesm8687386f8f.54.2024.12.16.09.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:18 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:28 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-1.9.1): New variable. * gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch: New patch. * gnu/packages/patches/mono-1.9.1-fixes.patch: New patch. * gnu/local.mk (dist_patch_DATA): register new patches. Change-Id: I19c16041fa4419a7c31ca510da6f33a03785f584 --- gnu/local.mk | 2 + gnu/packages/dotnet.scm | 60 +++++++++++++++++++ ...-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch | 14 +++++ gnu/packages/patches/mono-1.9.1-fixes.patch | 59 ++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch create mode 100644 gnu/packages/patches/mono-1.9.1-fixes.patch diff --git a/gnu/local.mk b/gnu/local.mk index bd2d3e61df4..38e98386d20 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1819,6 +1819,8 @@ dist_patch_DATA = \ %D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ %D%/packages/patches/mono-1.2.6-bootstrap.patch \ + %D%/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch \ + %D%/packages/patches/mono-1.9.1-fixes.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 2f93d4bbd00..3a3bcb3c940 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -361,3 +361,63 @@ (define-public mono-1.2.6 license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version ;; mcs/jay license:bsd-4)))) + +(define-public mono-1.9.1 + (package + (inherit mono-1.2.6) + (version "1.9.1") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit (string-append "mono-" "1.9.1.1")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0s1n3zdhc2alk9smxfdl1kjz7lz2p19gs0ks4hgr864jlmf13bws")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet prepare-mono-source) + (patches + (search-patches + "mono-1.9.1-fixes.patch" + "mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch")))) + (native-inputs + (modify-inputs (package-native-inputs mono-1.2.6) + (delete "pnet-git") + (delete "pnetlib-git") + (prepend mono-1.2.6) + (append which) + ;; needed for tests + (append perl))) + (arguments + (substitute-keyword-arguments (package-arguments mono-1.2.6) + ((#:make-flags _ #f) + #~(list "CC=gcc" "V=1")) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-before 'configure 'set-cflags + (lambda _ + ;; apparently can't be set via make flags in this version + (let ((original (getenv "CFLAGS"))) + (setenv "CFLAGS" (string-append (or original "") + (if original " " "") + "-DARG_MAX=500"))))) + (add-before 'configure 'set-create-image-version + (lambda _ + ;; pnet produces v2.x assemblies. Mono does this weird thing + ;; where it always produces assemblies of the same version as + ;; the runtime that is running it, which is based on the + ;; version of the assembly that it loaded, which is based on + ;; what it decided for the previous compiler... on and on all + ;; the way back to pnet. This breaks that chain, because + ;; otherwise it ends up compiling the initial mcs against .NET + ;; 2.0 libraries and then running with .NET 1.0 libraries. + (setenv "MONO_CREATE_IMAGE_VERSION" "v1.1.4322"))) + (add-after 'unpack 'patch-test-driver-shebang + (lambda _ + (patch-shebang "mono/tests/test-driver"))))) + ((#:tests? _ #f) #f) + ((#:parallel-tests? _ #f) #f))))) diff --git a/gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch b/gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch new file mode 100644 index 00000000000..1eef0548ca1 --- /dev/null +++ b/gnu/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch @@ -0,0 +1,14 @@ +diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c +index ce053b0ef49..7c51f20c4cf 100644 +--- a/mono/metadata/reflection.c ++++ b/mono/metadata/reflection.c +@@ -4336,6 +4336,9 @@ create_dynamic_mono_image (MonoDynamicAssembly *assembly, char *assembly_name, c + + const char *version = mono_get_runtime_info ()->runtime_version; + ++ char *env_ver = getenv("MONO_CREATE_IMAGE_VERSION"); ++ if (env_ver) version = env_ver; ++ + #if HAVE_BOEHM_GC + image = GC_MALLOC (sizeof (MonoDynamicImage)); + #else diff --git a/gnu/packages/patches/mono-1.9.1-fixes.patch b/gnu/packages/patches/mono-1.9.1-fixes.patch new file mode 100644 index 00000000000..16353ea741e --- /dev/null +++ b/gnu/packages/patches/mono-1.9.1-fixes.patch @@ -0,0 +1,59 @@ +diff --git a/data/mono.pc.in b/data/mono.pc.in +index 6da0960db2d..d43bb187218 100644 +--- a/data/mono.pc.in ++++ b/data/mono.pc.in +@@ -7,6 +7,6 @@ sysconfdir=@sysconfdir@ + Name: Mono + Description: Mono Runtime + Version: @VERSION@ +-Requires: glib-2.0 gthread-2.0 ++Requires: glib-2.0 gthread-2.0 bdw-gc + Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@ + Cflags: -I${includedir} @libmono_cflags@ +diff --git a/mono-uninstalled.pc.in b/mono-uninstalled.pc.in +index 7fa3f12dc91..2a0734362fd 100644 +--- a/mono-uninstalled.pc.in ++++ b/mono-uninstalled.pc.in +@@ -1,6 +1,6 @@ + Name: Mono + Description: Mono Runtime + Version: @VERSION@ +-Requires: glib-2.0 gthread-2.0 ++Requires: glib-2.0 gthread-2.0 bdw-gc + Libs: -L@mono_build_root@/mono/mini/.libs @export_ldflags@ -lmono @libmono_ldflags@ + Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/mono @libmono_cflags@ +diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am +index 2e480190c8c..90d0f619959 100644 +--- a/mono/metadata/Makefile.am ++++ b/mono/metadata/Makefile.am +@@ -157,7 +157,6 @@ libmonoruntimeinclude_HEADERS = \ + object.h \ + exception.h \ + profiler.h \ +- appdomain.h \ + mono-config.h \ + debug-helpers.h \ + mempool.h +diff --git a/mono/mini/driver.c b/mono/mini/driver.c +index ffa4b5e5e69..85a954960eb 100644 +--- a/mono/mini/driver.c ++++ b/mono/mini/driver.c +@@ -1033,6 +1033,7 @@ mono_main (int argc, char* argv[]) + #endif + if (!g_thread_supported ()) + g_thread_init (NULL); ++ GC_allow_register_threads(); + + if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) { + GMemVTable mem_vtable; +diff --git a/runtime/Makefile.am b/runtime/Makefile.am +index e3a8a21e9e2..587b9f4aa79 100644 +--- a/runtime/Makefile.am ++++ b/runtime/Makefile.am +@@ -1,6 +1,3 @@ +-# hack to prevent 'check' from depending on 'all' +-AUTOMAKE_OPTIONS = cygnus +- + tmpinst = _tmpinst + + noinst_SCRIPTS = mono-wrapper monodis-wrapper semdel-wrapper From patchwork Mon Dec 16 17:26:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34960 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C076B27BBEA; Mon, 16 Dec 2024 17:31:05 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ECB1727BBE2 for ; Mon, 16 Dec 2024 17:31:04 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEvs-000204-2A; Mon, 16 Dec 2024 12:31:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEu5-0000IH-Hy for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:11 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu5-0001vv-9b for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=1LRTpsnEjbxWhJgkweUq9QRwqVNZe2/R3tW0YJ0mmO4=; b=FqRoENfucgnrhig/QCNi1VSFowh8sqde2sAWiE7/+9PnjEYwuKnrjAS/SsPPGIK/7dAlvJEMj6sC5N55VkbowsHwERAHYoDxl8KHoyZCsB68PaT5weq/WxOPbZ5Wwkjkt9aY7UPqVXOIqmSQrPtF/XS/oF1N6AtT+YkGE2zs2x7KC5Vh37WreZIIg2we8dWmYxXsBJo0UkGWLr6AtsPKHq6dUgWkCyMyUvdqlQBRQ58KFjPXc3I+wjkqTNtcllhuKyXrOqVx0KhJa/gz876UeOXosVYIJ/K6TtZ2RUTQsLAwyJcna54OwK6XtNBmMyYVpr+1aB3W0mP2LCLyovGBzA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu5-0006L3-4f for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 06/21] gnu: Add mono-2.4.2. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437011424084 (code B ref 74609); Mon, 16 Dec 2024 17:29:09 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:34 +0000 Received: from localhost ([127.0.0.1]:55848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtU-0006G7-Rt for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:34 -0500 Received: from mail-wm1-f41.google.com ([209.85.128.41]:45187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtO-0006Eu-Ig for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:27 -0500 Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-435f8f29f8aso31616595e9.2 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370041; x=1734974841; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=1LRTpsnEjbxWhJgkweUq9QRwqVNZe2/R3tW0YJ0mmO4=; b=gp9i0OJVNq8FCAeKyGOjUAEI67q+Ca3u/p8AwXUUJ4Enz8cAtYN3F5iJ9sr0Idzvi8 KFRarM1qLvWf32vEhy2NJ180Q/4SIL5C/74E/ZZ9MHHdKuQMmeb7gkX1MvRYizoYmvTS LLqQBwWSMX/P5Ix9+ewkEQFMzGRBzMMkpg6wg8CSAllWCGGa3DnwtwmkjXrIKCcFfn9t NFM73TjHDfwNk0AmQJ7+cSRJUJAlUVpvvGMMaVxZIEJ25HRhX0FOb4snwWU5VJ6I/q2A SxQwTlH0Cl1+LHX7K4qcUXb4USII/BHHNUebaRuTAg7xGOPFZRT6harkwfretOFW7r5w +VQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370041; x=1734974841; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=1LRTpsnEjbxWhJgkweUq9QRwqVNZe2/R3tW0YJ0mmO4=; b=VAadv56EuhhIY9eGeGn37gDX8sZrBbyhyshE6bqvKeTNJwVpzPUuE9O3OoqszrS2iD r97MwB+OD3FMXHdhhqR131+uSdVuEWMJcQfNrzQiu8In6U/5+sglfJLfk6Qc5zhdBoHe MjezZHxlftaDtrAr5VcHIi/uSB0+o1owgMFOmOez0jQcxPOUdOZxXreFBQ5kD+shd1tv Q7JVzdoDyYb01/K1TXeBkUTfHwCnbgumPrgnJ0MH2OpvROxXlUaRmNItxaiNElrKVIBn CSl7KRXOuFAIQftweq6c/lGYPIqyTrpe99NkYY6dcLTkw9Hajv26ZKyjoUzaVehIXYZf LqpQ== X-Gm-Message-State: AOJu0YwLg2J14niyTi6peNKF8/MrUxP0fagCJ92/bKicO9LEv5Fu3Q3N /kv+zFg20uggkBNMvQWtv07Br1XglnGRslDd0J0Lu513er8wQEAO4JZ+SMUt X-Gm-Gg: ASbGncuTBd332ao418WMEA+LoZJ16grdyRFFs8Y1CDTYyM+ljQwIYCJfUXi234GacHP KxBARO4Jbalub6v8pb1AFWzPmZ6+cMsgwhXaVTOCLt5cLRtz31AiR0i6hXX1784N0z3Byg3YDAZ hOGRhXAi+eVQVaP7kzOL1gFi0+C91dLN7KHPycEt08cHZz4sw7m85hIerOGx8fXYvmCSvYxjZFY x5iWUNMuWyqLqcHJ3nRRX6kpHPdgC1Y27ctCy4p5aDLVzpahvPv8SG8X+g7oQ== X-Google-Smtp-Source: AGHT+IHAaMAQhy3SKnojaO49AiHPmR6xjl5peHuP2fdKPeL573/Nt/bIYUudywSCwxwyKP50QOqCsg== X-Received: by 2002:a5d:598c:0:b0:386:4a60:6650 with SMTP id ffacd0b85a97d-388da5add16mr311167f8f.42.1734370040724; Mon, 16 Dec 2024 09:27:20 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8012081sm8678600f8f.19.2024.12.16.09.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:20 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:29 +0200 Message-ID: <8a4501f8b0ab760662cac843d78c9975b8040b82.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-2.4.2): New variable. * gnu/packages/patches/mono-2.4.2.3-fixes.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I14ff01d5fb3c3f23c83f8518990a79329490d3b9 --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 53 +++++++++++++++++ gnu/packages/patches/mono-2.4.2.3-fixes.patch | 59 +++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 gnu/packages/patches/mono-2.4.2.3-fixes.patch diff --git a/gnu/local.mk b/gnu/local.mk index 38e98386d20..a46dd1d1999 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1821,6 +1821,7 @@ dist_patch_DATA = \ %D%/packages/patches/mono-1.2.6-bootstrap.patch \ %D%/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch \ %D%/packages/patches/mono-1.9.1-fixes.patch \ + %D%/packages/patches/mono-2.4.2.3-fixes.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 3a3bcb3c940..ab91f590992 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -421,3 +421,56 @@ (define-public mono-1.9.1 (patch-shebang "mono/tests/test-driver"))))) ((#:tests? _ #f) #f) ((#:parallel-tests? _ #f) #f))))) + +(define-public mono-2.4.2 + (package + (inherit mono-1.9.1) + (version "2.4.2.3") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit (string-append "mono-" "2-4-2-3")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0mnrk17rd9c5rh30dh82a39c9ak1ns998b41ivprvy7m068skpda")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet prepare-mono-source) + (patches + (search-patches "mono-2.4.2.3-fixes.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-1.9.1) + (replace "mono" mono-1.9.1))) + (inputs (modify-inputs (package-inputs mono-1.9.1) + (append gettext-minimal))) + (arguments + (substitute-keyword-arguments (package-arguments mono-1.9.1) + ((#:tests? _ #f) + ;; When it tries building iltests.il in mono/mini, it gets: error + ;; CS0006: cannot find metadata file `TestDriver.dll'. It builds fine + ;; outside of the build environment, but later tests fail, and I can't + ;; be bothered to figure out what's causing ilasm to not find + ;; TestDriver.dll. + #f) + ((#:parallel-build? _) #t) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-before 'bootstrap 'patch-sub-autogen.sh-shebang + (lambda _ + (patch-shebang "./eglib/autogen.sh"))))))) + (license (list + ;; most of mcs/tools, mono/man, most of mcs/class, tests by + ;; default, mono/eglib + ;; mcs/mcs, mcs/gmcs (dual-licensed GPL) + ;; samples + license:x11 + ;; mcs/mcs, mcs/gmcs (dual-licensed X11) + ;; some of mcs/tools + license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version + ;; mono/mono (the mono VM, I think they meant mono/mini) + license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version + ;; mcs/jay + license:bsd-4)))) diff --git a/gnu/packages/patches/mono-2.4.2.3-fixes.patch b/gnu/packages/patches/mono-2.4.2.3-fixes.patch new file mode 100644 index 00000000000..13cff774506 --- /dev/null +++ b/gnu/packages/patches/mono-2.4.2.3-fixes.patch @@ -0,0 +1,59 @@ +diff --git a/data/mono.pc.in b/data/mono.pc.in +index 6da0960db2d..d43bb187218 100644 +--- a/data/mono.pc.in ++++ b/data/mono.pc.in +@@ -7,6 +7,6 @@ sysconfdir=@sysconfdir@ + Name: Mono + Description: Mono Runtime + Version: @VERSION@ +-Requires: glib-2.0 gthread-2.0 ++Requires: glib-2.0 gthread-2.0 bdw-gc + Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@ + Cflags: -I${includedir} @libmono_cflags@ +diff --git a/mono-uninstalled.pc.in b/mono-uninstalled.pc.in +index 7fa3f12dc91..2a0734362fd 100644 +--- a/mono-uninstalled.pc.in ++++ b/mono-uninstalled.pc.in +@@ -1,6 +1,6 @@ + Name: Mono + Description: Mono Runtime + Version: @VERSION@ +-Requires: glib-2.0 gthread-2.0 ++Requires: glib-2.0 gthread-2.0 bdw-gc + Libs: -L@mono_build_root@/mono/mini/.libs @export_ldflags@ -lmono @libmono_ldflags@ + Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/mono @libmono_cflags@ +diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am +index 83f8532369b..3fca7fc13b9 100644 +--- a/mono/metadata/Makefile.am ++++ b/mono/metadata/Makefile.am +@@ -171,7 +171,6 @@ libmonoruntimeinclude_HEADERS = \ + object.h \ + exception.h \ + profiler.h \ +- appdomain.h \ + mono-config.h \ + debug-helpers.h \ + mempool.h +diff --git a/mono/mini/driver.c b/mono/mini/driver.c +index 48ca2d96899..9fb3512200b 100644 +--- a/mono/mini/driver.c ++++ b/mono/mini/driver.c +@@ -1236,6 +1236,7 @@ mono_main (int argc, char* argv[]) + #endif + if (!g_thread_supported ()) + g_thread_init (NULL); ++ GC_allow_register_threads(); + + if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) { + GMemVTable mem_vtable; +diff --git a/runtime/Makefile.am b/runtime/Makefile.am +index 0e876e2a491..b9cd0a99d9e 100644 +--- a/runtime/Makefile.am ++++ b/runtime/Makefile.am +@@ -1,6 +1,3 @@ +-# hack to prevent 'check' from depending on 'all' +-AUTOMAKE_OPTIONS = cygnus +- + tmpinst = _tmpinst + + noinst_SCRIPTS = mono-wrapper monodis-wrapper From patchwork Mon Dec 16 17:26:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34948 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6023827BBEA; Mon, 16 Dec 2024 17:29:58 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B5A9327BBE2 for ; Mon, 16 Dec 2024 17:29:57 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuO-0000Uu-Qh; Mon, 16 Dec 2024 12:29:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEu6-0000IN-7Y for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:12 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu5-0001wD-OX for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=Lyj804Kumg89zKoNnoPL6M7hyzm3jGfIRXvwYAekaKY=; b=VGToU0O7mzvsivXvGAMJ2e0zK0a312t8JtcWY0uV/UEMTeLwFCfH3QM2xQ94gTj4FLPdAtikwhf/yPSOh8WXTF0HVqKGe2QZnPUZ/w/BMkBGhiDmWCOYSKvTAhLIfgw2//1wVbQb28CGJdIE4XmfFa8GRNE5in7abEAgD+DklP8D1oZbLT/k3IctSJYdVy/fABXfbLWJx6dZCRJ2bIGAKTsvdi9SjV2zKZt4ib9IQ5kBwQsaxkH33TRC2bC6NJY7X0/xr2X50GohE9JIlqhFPDGAYB7kCESxgUBa6Bof9sAG6WjQZfYOwV7KvGWARuD0i2gVBdXR18tAqIBYbtPTuw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu5-0006LB-Jz for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 07/21] gnu: Add mono-2.6.4. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437011524097 (code B ref 74609); Mon, 16 Dec 2024 17:29:09 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:35 +0000 Received: from localhost ([127.0.0.1]:55852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtW-0006GU-Ih for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:35 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:53331) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtQ-0006F9-Jl for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:29 -0500 Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-38633b5dbcfso4816346f8f.2 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370043; x=1734974843; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=Lyj804Kumg89zKoNnoPL6M7hyzm3jGfIRXvwYAekaKY=; b=bwZlvPLNa7iWew2OHmI1hqthue1ZrB6VxgXdAWTEntGCP2Kzf+HA1qt3wnsNHtdkIM X4rAO2iYSyrvfJZeQpNK31QNTVQLEXEDdr1RcVlIrsTMrlYNX6OylJA+4RtcK2VHJ57b Q7KZzCrfb5SMp8W8aHDsNcSkyWTbsLTkHsJvZvyFhdCm+AyQiffpqG4BGcJ/0berZrCy +yN2GZ9a9fU6/fOufJSfvtlf1aWaYEUYqdioYBRBnlkRv/fVH76/Ig7tg4iHW8rR6AOv AfYnwj+jgUVJTQcaGgtXF/jXwXIyn+BHtJjtQR5SrWzKRN2lGlb3rqInv15tNA1LwDw+ VauA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370043; x=1734974843; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Lyj804Kumg89zKoNnoPL6M7hyzm3jGfIRXvwYAekaKY=; b=L7Stn8wdsvKehINWIy7vZxcLju9uyt1RkfEb2SqjvBU60uyYE4uwD7kCdfpLGJNZZ+ vE8Ivn3iWWiLNMG7u4e7vLs4PYH4dy9zy0Ux57aUUyHCO1vmqc0HJhICN4i/7k0vajBK Wes2iv0xWmc81DyEFFXc7B330VApuok4Mp1v2x6Djd3GwFGMR6LwZTEuy6xCUyARvYBF d+PVEv6e4NVj/AlwTX83EoKr28hrhrrmO0yc3UX7YsEeeQvlPqzhs1fnyJBaYdFRV+yD opnwx+9uaDGt8FYKuUIzNvBYKSvNkNU1ALym4UrXdONuzTS4oauXN2y3K+5rd3Wb5LeI geRQ== X-Gm-Message-State: AOJu0YxrL5yK/Acm97Su+gSrovGjLIJpFbypLf/uWB4nj7HnRUPjQ0+L TNI0bus+PBKlCTHbhXoWXg1qQc5nsqQDxLbMRDjay35LQ1tmd4XRsirZRbNa X-Gm-Gg: ASbGnctT2qXF56szPrqqg7C2zYucYGMV34mhgNiYxn4QLOrPnRSy5VAvdAyJTDgAHnv WCBghwlVSwxi/xNIcubYWzPQ7MEvt2bykOOeGZuZf9iV/QCsZ0PgO00q+5WqaRJ0iUCX1V2FxHH fIGIjmorZ46KrPaQE5Zf1AucI2aKnVu2Gzifn2bM+HNaECyTjW7LYctImf6MF9YOd0qOJB0LZPA ir3arCELU79nUba73HfND2RzdtaA6xdZOlw5JHg9TLLj6g3o5b1ZkanB6cVZw== X-Google-Smtp-Source: AGHT+IEvmxmHcbSmXAX4nzZRq0zWqp8G8cABgBTvzoKp3EPZUV4coBfIaLtPbCwzcNChacixJ8Kuwg== X-Received: by 2002:a5d:5f50:0:b0:382:3959:f429 with SMTP id ffacd0b85a97d-38880ac5f31mr12786548f8f.5.1734370042867; Mon, 16 Dec 2024 09:27:22 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c805d489sm8791902f8f.88.2024.12.16.09.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:22 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:30 +0200 Message-ID: <1c712f7b2f262a06526dedffec28dbb2362c31de.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/dotnet.scm (mono-2.6.4): New variable. * gnu/packages/patches/mono-2.6.4-fixes.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I66e9bb2e12ca6f47b4cd827822db5bee93b64dfe --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 23 ++++++++++ gnu/packages/patches/mono-2.6.4-fixes.patch | 49 +++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 gnu/packages/patches/mono-2.6.4-fixes.patch diff --git a/gnu/local.mk b/gnu/local.mk index a46dd1d1999..43ccab199dc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1822,6 +1822,7 @@ dist_patch_DATA = \ %D%/packages/patches/mono-1.9.1-add-MONO_CREATE_IMAGE_VERSION.patch \ %D%/packages/patches/mono-1.9.1-fixes.patch \ %D%/packages/patches/mono-2.4.2.3-fixes.patch \ + %D%/packages/patches/mono-2.6.4-fixes.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index ab91f590992..6304a38bb74 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -474,3 +474,26 @@ (define-public mono-2.4.2 license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version ;; mcs/jay license:bsd-4)))) + +(define-public mono-2.6.4 + (package + (inherit mono-2.4.2) + (version "2.6.4") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit (string-append "mono-" "2.6.4")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "17977w45qh8jmfsl4bhi83si4fxd8s3x8b0pxnwdzjv3bqr54c85")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet prepare-mono-source) + (patches + (search-patches "mono-2.6.4-fixes.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-2.4.2) + (replace "mono" mono-2.4.2))))) diff --git a/gnu/packages/patches/mono-2.6.4-fixes.patch b/gnu/packages/patches/mono-2.6.4-fixes.patch new file mode 100644 index 00000000000..e802c8bb7e4 --- /dev/null +++ b/gnu/packages/patches/mono-2.6.4-fixes.patch @@ -0,0 +1,49 @@ +diff --git a/data/mono.pc.in b/data/mono.pc.in +index 01e0a9e5d41..d43bb187218 100644 +--- a/data/mono.pc.in ++++ b/data/mono.pc.in +@@ -7,8 +7,6 @@ sysconfdir=@sysconfdir@ + Name: Mono + Description: Mono Runtime + Version: @VERSION@ +-## Commented out because SLE hides devel files in the SLE SDK, +-## which not all customers will have. +-#Requires: glib-2.0 gthread-2.0 ++Requires: glib-2.0 gthread-2.0 bdw-gc + Libs: -L${libdir} @export_ldflags@ -lmono @libmono_ldflags@ + Cflags: -I${includedir} @libmono_cflags@ +diff --git a/mono-uninstalled.pc.in b/mono-uninstalled.pc.in +index 7fa3f12dc91..2a0734362fd 100644 +--- a/mono-uninstalled.pc.in ++++ b/mono-uninstalled.pc.in +@@ -1,6 +1,6 @@ + Name: Mono + Description: Mono Runtime + Version: @VERSION@ +-Requires: glib-2.0 gthread-2.0 ++Requires: glib-2.0 gthread-2.0 bdw-gc + Libs: -L@mono_build_root@/mono/mini/.libs @export_ldflags@ -lmono @libmono_ldflags@ + Cflags: -I@abs_top_srcdir@ -I@abs_top_srcdir@/mono @libmono_cflags@ +diff --git a/mono/mini/driver.c b/mono/mini/driver.c +index c4e7f4ccdb3..bb705c0d1fc 100644 +--- a/mono/mini/driver.c ++++ b/mono/mini/driver.c +@@ -1302,6 +1302,7 @@ mono_main (int argc, char* argv[]) + #endif + if (!g_thread_supported ()) + g_thread_init (NULL); ++ GC_allow_register_threads(); + + if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) { + GMemVTable mem_vtable; +diff --git a/runtime/Makefile.am b/runtime/Makefile.am +index da0c0e8671d..9d0deaf182f 100644 +--- a/runtime/Makefile.am ++++ b/runtime/Makefile.am +@@ -1,6 +1,3 @@ +-# hack to prevent 'check' from depending on 'all' +-AUTOMAKE_OPTIONS = cygnus +- + tmpinst = _tmpinst + + noinst_SCRIPTS = mono-wrapper monodis-wrapper From patchwork Mon Dec 16 17:26:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34952 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2941927BBEA; Mon, 16 Dec 2024 17:30:32 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6F7EE27BBE2 for ; Mon, 16 Dec 2024 17:30:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuT-0000Vn-7C; Mon, 16 Dec 2024 12:29:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEu7-0000Ia-5x for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:13 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu6-0001wX-RK for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=cm6aI9utkAyZOfPTZ/tCyh4LO6jyZLCG9w0GxUCiN+k=; b=Lkt2CAvUdrscEh7DA6w+5g8HEDglA88ATtX1I8juvYLS5I2FLykdN9PYPQetrWPXUACYE7m0IExENsqFg7wcbMqxP/e+dzkJQqUkkuwTrqZdeLS3etaM41HwyBD3QCVoUQGNm8cyzAd3f26hMLQMHRAsQ7a687zfTO4wsPP5KzP8ThowHCIAT5eSUdTUQH2W+pcuZXw0GWxWIPzmK060fm6zWysA3e7fW0OgIA8n5WFQKfDo0VWvQzf1CxM9GFrEjZW8CjYoOmrIp2oPG8FKOlO+jTFpxJaAf49ytTCPfd57qS6JXXOXP0OmcBwsSe162ygJkFE2IfW7W1D2+4IgyQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu6-0006LR-Jd for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:10 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 08/21] gnu: Add mono-2.11.4. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437012124120 (code B ref 74609); Mon, 16 Dec 2024 17:29:10 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:41 +0000 Received: from localhost ([127.0.0.1]:55856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtc-0006Gq-CC for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:41 -0500 Received: from mail-wr1-f41.google.com ([209.85.221.41]:44492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtS-0006FH-M4 for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:32 -0500 Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-385d7f19f20so2223409f8f.1 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370045; x=1734974845; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=cm6aI9utkAyZOfPTZ/tCyh4LO6jyZLCG9w0GxUCiN+k=; b=eHL91NMAMUpXmrUh+qFTam1G4f8gXOrqbk8fSkvloHIDV/3nMr3cUgfnSW8ajCrkgq qxDOlBMwuu6mdC/WgD1+xRrC/04Cnj3pXddIBrKOxhCT5fZfZZV3VDaEMAHdSwrWC+RD 74Dv/PRIlyBR0CJCpUJ3jvP63oyd1XqcZds689UfLH6ZIxHUUe8p/yzTQyBSJ5a1SnSs GWADxoy67FpBztJMxZyT/dVmxWdgZ6USBHwf5m8dihQRsEb569D5ZCifPsE/9rzl2g3F VYygw2ambkiNw46oDbYQu7PNpoBbei4MmES+ItTAfyMxsJu5NSLQBH7t7AvWZi6qvFTP 6VWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370045; x=1734974845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cm6aI9utkAyZOfPTZ/tCyh4LO6jyZLCG9w0GxUCiN+k=; b=FuR2T67JRY4nIPskMnQ+26JrKfJbpEqmL4mk0zMDD1MWUx2arynbvueZ/v3hq19k+j hqlZBPzDHvFNbSwvswTB6X86QuA9sqOK8CEwuTAKSTMvIgNj7p/KsjmMaHW1iS8vsmN9 oxhjlUfgW3UzAU5YIhd6+yLK2Pa0AUKz70OkplRKP9vZZljmCSSJu0Ke2rVD3EFKnAFf f/+RfAk5T+1Wx0MQZEOw0yotxXzJxB6JPg2FjspNGplK8Jm06eXhjJXCvVvx2SgqlvCb ReBaKOtgIC8dFuGwfwG3ewWaSmqN1Gliyod+/CQoQ3VsZaKfY2XQSOIcYu/2epg8zhlN aRgQ== X-Gm-Message-State: AOJu0YwxrnVPgwRBiTJZgPGXVU6KSb5z95HijKim5nZGhGI2MLhvxxDf OynAxHu6ezS75iH7/8WxCA5gOUOadNBPdPRm3+p4hZRN0BJPPBk5VmHU9jK+ X-Gm-Gg: ASbGncv6dX5cygDeQW+dkC5zdlbUgT6iBPfb8g0S/ZnHquXwC37oOonbFWiXtHNbQxo mrdztnCs8YMhgXLZLSioRHAKvqL7HQEZ4XBZ2+ofq2lkcYbjMezzWuYGwS70xp2bL0TxiHKz9Al Mld5soosWU0J144MGFJRDBAwgsloa5IvkIgQKDsm+KA5EcRvTEhhdrZTLK5sQ9HJcBpXMxgRvns eT10XPbCzjCE6QaFymZlTFza9i0W7RR0kBDRhmg+/ZFoouzVPIpyKqkdJsC+A== X-Google-Smtp-Source: AGHT+IFGrgEMoJOmTPBO4AQWxDL6cT2CedCN/lQta45CSSmYEnTL/LGVtdVQiVqlC/n+HN5eOwVjQQ== X-Received: by 2002:a5d:64ac:0:b0:388:c61d:4400 with SMTP id ffacd0b85a97d-388da3a1314mr386620f8f.26.1734370044920; Mon, 16 Dec 2024 09:27:24 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8016bdfsm8794685f8f.43.2024.12.16.09.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:24 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:31 +0200 Message-ID: <1ef3a73521e6f4b2eb400d6f5a4801cde1e203c9.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-2.11.4-external-repo-specs, mono-2.11.4): New variables. (add-external-repos): New procedure. * gnu/packages/patches/mono-2.11.4-fixes.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I7cb96af8b05a625cfe9ca9ab0f1132608c02ed31 --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 95 ++++++++++++++++++++ gnu/packages/patches/mono-2.11.4-fixes.patch | 36 ++++++++ 3 files changed, 132 insertions(+) create mode 100644 gnu/packages/patches/mono-2.11.4-fixes.patch diff --git a/gnu/local.mk b/gnu/local.mk index 43ccab199dc..8007ff19a7e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1823,6 +1823,7 @@ dist_patch_DATA = \ %D%/packages/patches/mono-1.9.1-fixes.patch \ %D%/packages/patches/mono-2.4.2.3-fixes.patch \ %D%/packages/patches/mono-2.6.4-fixes.patch \ + %D%/packages/patches/mono-2.11.4-fixes.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 6304a38bb74..b7940d24706 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -497,3 +497,98 @@ (define-public mono-2.6.4 (search-patches "mono-2.6.4-fixes.patch")))) (native-inputs (modify-inputs (package-native-inputs mono-2.4.2) (replace "mono" mono-2.4.2))))) + +;; submodule checkouts use git://, which isn't supported by github anymore, so +;; we need to manually provide them instead of being able to use (recursive? +;; #t). Also try not to think too hard about the fact that some of these +;; submodules in later versions contain binary compiler blobs which mono +;; maintainers presumably used when creating the bootstrap binaries they +;; published. All fetched and updated over unauthenticated git://. + +(define mono-2.11.4-external-repo-specs + ;; format: ({reponame OR (reponame dir-name)} commit-hash origin-sha256) ... + ;; if reponame starts with https:// it is treated as the repository url, + ;; otherwise the name of a repository under https://github.com/mono/ + '(("aspnetwebstack" "1836deff6a2683b8a5b7dd78f2b591a10b47573e" + "0vqq45i8k6jylljarr09hqqiwjs8wn0lgjrl6bz72vxqpp0j344k") + ("cecil" "54e0a50464edbc254b39ea3c885ee91ada730705" + "007szbf5a14q838695lwdp7ap6rwzz3kzllgjfnibzlqipw3x2yk") + ("entityframework" "9baca562ee3a747a41870f45e749e4436b6aca26" + "0l8k04bykbrbk5q2pz8hzh8xy8y4ayz7j97fw0kyk3lrai89v5da") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s"))) + +(define (add-external-repos specs) + (define (reponame->url reponame) + (if (string-prefix? "https://" reponame) + reponame + (string-append "https://github.com/mono/" reponame))) + + (define* (external-repo-gexp reponame commit hash + #:key recursive? (patches '())) + (let ((short-commit (string-take commit 6)) + (reponame (if (pair? reponame) (car reponame) + reponame)) + (dir-name (if (pair? reponame) (cadr reponame) + reponame))) + #~(copy-recursively #+(origin + (method git-fetch) + (uri (git-reference + (url (reponame->url reponame)) + (commit commit) + (recursive? recursive?))) + (file-name + (git-file-name dir-name + short-commit)) + (sha256 (base32 hash)) + (patches (map search-patch patches))) + #$(string-append "./external/" dir-name)))) + + (define (spec->gexp spec) + (apply external-repo-gexp spec)) + + #~(begin + #+@(map spec->gexp specs))) + +(define-public mono-2.11.4 + (package + (inherit mono-2.6.4) + (version "2.11.4") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit (string-append "mono-" "2.11.4")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0y2bifi2avbjmfp80hjga2dyqip4b46zkvx6yfr9pa2hhm940rpx")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-2.11.4-external-repo-specs) + #$prepare-mono-source)) + (patches + (search-patches "mono-2.11.4-fixes.patch")))) + (build-system gnu-build-system) + (native-inputs (modify-inputs (package-native-inputs mono-2.6.4) + (replace "mono" mono-2.6.4))) + (license (list + ;; most of mcs/tools, mono/man, most of mcs/class, tests by + ;; default, mono/eglib, mono/metadata/sgen*, + ;; mono/arch/*/XXX-codegen.h + ;; mcs/mcs, mcs/gmcs (dual-licensed GPL) + ;; samples + license:x11 + ;; mcs/mcs, mcs/gmcs (dual-licensed X11) + ;; some of mcs/tools + license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version + ;; mono/mono (the mono VM, I think they meant mono/mini) + license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version + ;; mcs/jay + license:bsd-4 + ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs + license:asl2.0)))) diff --git a/gnu/packages/patches/mono-2.11.4-fixes.patch b/gnu/packages/patches/mono-2.11.4-fixes.patch new file mode 100644 index 00000000000..02a05f7977a --- /dev/null +++ b/gnu/packages/patches/mono-2.11.4-fixes.patch @@ -0,0 +1,36 @@ +diff --git a/configure.in b/configure.in +index 38cc6dc2925..4c608eb150f 100644 +--- a/configure.in ++++ b/configure.in +@@ -470,7 +470,7 @@ AC_CHECK_HEADERS(wchar.h) + AC_CHECK_HEADERS(ieeefp.h) + AC_MSG_CHECKING(for isinf) + AC_TRY_LINK([#include ], [ +- int f = isinf (1); ++ int f = isinf (1.0); + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ISINF, 1, [isinf available]) +diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c +index 586b54715db..d27857aa092 100644 +--- a/mono/io-layer/processes.c ++++ b/mono/io-layer/processes.c +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/runtime/Makefile.am b/runtime/Makefile.am +index 6957a287d38..2d071230a84 100644 +--- a/runtime/Makefile.am ++++ b/runtime/Makefile.am +@@ -1,6 +1,3 @@ +-# hack to prevent 'check' from depending on 'all' +-AUTOMAKE_OPTIONS = cygnus +- + tmpinst = _tmpinst + + noinst_SCRIPTS = mono-wrapper monodis-wrapper From patchwork Mon Dec 16 17:26:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34949 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0BF7227BBE2; Mon, 16 Dec 2024 17:30:03 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 73B6227BBE9 for ; Mon, 16 Dec 2024 17:30:02 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuq-0000p2-SA; Mon, 16 Dec 2024 12:29:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuD-0000OQ-Sy for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu8-0001wj-3j for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=sd4Vc0+M7dIM4S7B2Eakx19YbBKpt8dPWsCkRu7hLYY=; b=JL5gCTo4hSsHBIeUiZTBwOHIWGBa7CT/DGWpXcIy5BLpWO3gajenNLk9oj7e5gdGBwon+pE+45Im7fSDvDaN5s8RVu0jJcXTLNqsDVTYwF2RJSDr6Ke4uWT105RZVQGb33l4cKxHIreU9gNwfpf8fhef5191WQwKK/JDq4jl5ykzZJiq23GGK7WcCnwCntH+LY6wcVvUQ36Y5Sc9+EKrMPHPjaq9gSuBDV/YvARcN6pQzafVwfPSpmYHflr4Rh2aVVA42mIMskln6Uh9xuiocxfF8/MUrPXbXG6yYuVxwfTRZKysZuXR1CHKD19jIvjb1lgElIIt/9H3YyP1yNrOhQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu7-0006Lj-RY for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:11 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 09/21] gnu: Add mono-3.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437012324146 (code B ref 74609); Mon, 16 Dec 2024 17:29:11 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:43 +0000 Received: from localhost ([127.0.0.1]:55861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEte-0006HE-K9 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:43 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:59527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtV-0006Fe-4s for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:34 -0500 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-436202dd730so31550305e9.2 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370047; x=1734974847; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=sd4Vc0+M7dIM4S7B2Eakx19YbBKpt8dPWsCkRu7hLYY=; b=h/6LU2VS04u8YGq6h+kgtnDkdTBmXseZZ+DN0Lz7TTr7IsuDVnRGGz6nCt92JC+1I0 03YCq01H2sxhVyIbsnG36XJhqd3TpaOaRYKHD80TRWc6lvZs1CeUHfLjex5SUMGmB4/5 tbER7tURConpMbR0YDaoE3kVEekyDn+aDItaLRAGA+QuIA+z31FyUuE0oo9kZIM1txRS dZFxQhA2uQFAH+YUedlvizMCR4aUA+vGIFzdb3EhkZwaEkp4EYQNFefq8QXjFP7ZY1Ok mQE/+J1JBkpdeyD3s+CqLqlY+g3a7cmBn8VghNG80H7m0H4d2I3EQ+GYE4oz3DjZXN8P Wj1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370047; x=1734974847; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=sd4Vc0+M7dIM4S7B2Eakx19YbBKpt8dPWsCkRu7hLYY=; b=rWY1nwpHI1m/AmivV4S4gA8hmhj08Wu2BU4yIx8Xq+pMSXnvY29g2WaUa1zVpPTI5b LRFi4pCslUjdx3HA53AHgGs0bsxeQmIxRvwg9diGEOk7f04lRRt3TTAAh+4Iu/eXGIMv iOMnazgExzGVnu2Ot8AgYZp6tUKE4zNtNAzb/Cj/aDkqaFP0moapSrtTZroCrHoH6vjf EmMrqVYrx7ZN+lJ3eZDknEKCMxtkgbYaiCAUnTyRUm+l0LD8+mIIXWdMwBGVIQ9KY384 3ZnluDZOn+V7VtpdsAXdoeUDr8xXSIQR7PTB1B+7i4VbdaLPGugByedX+1bQhp214Oyb K3vQ== X-Gm-Message-State: AOJu0YzhlnkW8EWdP7f8bnGLgDi/AKLvkTps8g8w4sK8Xaqmd0ytFZb0 wmYoG1lDQPNUwV2HWQVOlOkFtpGqt+zMPS9nnoGIiLti8ra6p14ECnraxCtM X-Gm-Gg: ASbGncvRScT5FnMWWH56g2tqaWZBpGF4Bv1V4iBVH6qTnNOMLc+p77lSrTenaslb3xl MiLfRqzEff4yQEeJrfLTyfqpNvSlYXT3SH/YaTQiYnAcQMA6HuMOLW0oONneb0+ivZn2oB4GMdt NnGE2NaidCprXjvEDJbVdKva+VfiZESry+lqBIxPARmQ1L69J3mO9NOERnaj03lf3mfl5OzmUv1 wjCKslpHU0/vC7qfq+hZBnODOUb1l+cqi2ttw2Tla4xorPNNG4p181SoMHU9A== X-Google-Smtp-Source: AGHT+IFjCPzfid862+7iQ0/w/1g3O96z2Pvul2OxVMxMmzXJe0bVh2S29qxyEEzeQj5RygViWQceQg== X-Received: by 2002:a05:6000:4610:b0:386:2ebe:7ae2 with SMTP id ffacd0b85a97d-3888e0b8d2bmr8730365f8f.45.1734370046974; Mon, 16 Dec 2024 09:27:26 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c801626asm8742944f8f.29.2024.12.16.09.27.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:26 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:32 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-3.0.12-external-repo-specs, mono-3.0): New variables. Change-Id: I1f30041187c7d0cf6e45d56f6da9bb4a705202cf --- gnu/packages/dotnet.scm | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index b7940d24706..df40169dd37 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -592,3 +592,66 @@ (define-public mono-2.11.4 license:bsd-4 ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs license:asl2.0)))) + +(define mono-3.0.12-external-repo-specs + ;; format: ({reponame OR (reponame dir-name)} commit sha256) ... + ;; if reponame starts with https:// it is treated as the repository url, + ;; otherwise the name of a repository under https://github.com/mono/ + '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + ("cecil" "54e0a50464edbc254b39ea3c885ee91ada730705" + "007szbf5a14q838695lwdp7ap6rwzz3kzllgjfnibzlqipw3x2yk") + ("entityframework" "a5faddeca2bee08636f1b7b3af8389bd4119f4cd" + "0b05pzf6qwdd92pbzym32nfmw8rq36820vdzakq1kykfmddjr9a7") + (("ikvm-fork" "ikvm") "10b8312c8024111780ee382688cd4c8754b1f1ac" + "025wf9gjgfvrq42vgw91ahy3cmzcw094vx783dsp7gjdyd8q09nm") + ("Lucene.Net" "88fb67b07621dfed054d8d75fd50672fb26349df" + "1rfxqfz7hkp9rg5anvxlv6fna0xi0bnv1y8qbhf8x48l08yjb38k") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + ("rx" "17e8477b2cb8dd018d49a567526fe99fd2897857" + "0fyyy4jf0mma6kff6fvbvdcs5ra1bz4s063nvjjva9xlnv7sjvh4"))) + +(define-public mono-3.0 + (package + (inherit mono-2.11.4) + (version "3.0.12") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit (string-append "mono-" "3.0.12")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "110f3hcfikk6bxbrgjas5dqldci9f24gvm3vdgn4j9j7xhlcx1lj")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-3.0.12-external-repo-specs) + #$prepare-mono-source)))) + (native-inputs (modify-inputs (package-native-inputs mono-2.11.4) + (replace "mono" mono-2.11.4))) + (license (list + ;; most of mcs/tools, mono/man, most of mcs/class, tests by + ;; default, mono/eglib, mono/metadata/sgen*, + ;; mono/arch/*/XXX-codegen.h + ;; mcs/mcs, mcs/gmcs (dual-licensed GPL) + ;; samples + license:x11 + ;; mcs/mcs, mcs/gmcs (dual-licensed X11) + ;; some of mcs/tools + license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version + ;; mono/mono (the mono VM, I think they meant mono/mini) + ;; mono/support (note: directory doesn't exist, probably meant + ;; ./support, but that contains a copy of zlib?) + license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version + ;; mcs/jay + license:bsd-4 + ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs + license:asl2.0 + ;; ./support, contains a copy of zlib + license:zlib)))) From patchwork Mon Dec 16 17:26:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34945 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2396927BBE9; Mon, 16 Dec 2024 17:29:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7422C27BBEB for ; Mon, 16 Dec 2024 17:29:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuJ-0000Rh-3t; Mon, 16 Dec 2024 12:29:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEu6-0000IT-RQ for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:12 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu6-0001wL-7m for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=zLzB4uRydg78P7hSMrvzg4yjOrco2IFX7wtM+0Vm7p8=; b=k00gk44ySO0psMk2uzQ7T5EmcTRPTOR4u9ofUZRIbExA75u2b5bN+suvcrV0aeF5F1N+1bQXNuqPbm6EyKxT/RyzTkYftCWtNQou5Whh3LxOxz1jL1l26e4AGz142A70M8Rsky5aSiNPyi+A/3ogBOSI20eMlkYkBvBLQzM9b2PnUs2B4WROl8t2yit/cH5Pf1t23sBRqwpU8jOzZLcufYzQs/eAf/P+3APwMJvNFzTmwEdfR4Ly7kN3JUTnRIy8NgYoj2mUgSMvgtDFmrQstkZFWRvm+pJzyhgxqGxSzIdWjU1EX0ropEBnhmRNLf5TFrM0BvWMEy5jyUK8pfsMZA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu6-0006LI-2v for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:10 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 10/21] gnu: Add mono-3.12.1. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437012024111 (code B ref 74609); Mon, 16 Dec 2024 17:29:10 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:40 +0000 Received: from localhost ([127.0.0.1]:55854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtb-0006Gn-Oq for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:40 -0500 Received: from mail-wr1-f45.google.com ([209.85.221.45]:58721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtS-0006Fl-6p for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:31 -0500 Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-385e3621518so2177848f8f.1 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370049; x=1734974849; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=zLzB4uRydg78P7hSMrvzg4yjOrco2IFX7wtM+0Vm7p8=; b=nlWMMp5Hr5Q4lX99EpmVmu47QZEBCYkU+eG+94FPTSNCUtsvOt6CFpvZdmcepjfG6m W7kcwIrodNYnIMXBhb0OPKcOFBe7lefmyI/pQCY7w31S2wD/mg8vf/pzQE7bI+beBLpt xrhUgz8vqiyju5MA1+QBf585m/wHNanalVBnZEPgrMF3ucY4FCNY9x31AaC/rxsX+12O /5Pb8+pfO7HCSOHwucx7jKjJFlLWmOmQe/2A9rh4dZDBh4ldiKnAkafkbPYYX0TXrVYt D5UNDat+PFqdYTpFE0DpyK+fb4Ghfzn3cTPS2J6bpMJZWJ31DosmJdlAFaDN1yGb3yqN r/tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370049; x=1734974849; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zLzB4uRydg78P7hSMrvzg4yjOrco2IFX7wtM+0Vm7p8=; b=VhUjF2nobFCyl66rsSd7mW9HgrtYOO9l8qiKhI0spCAYtzXUBl4o/j3K6RGMowuS4l T7SIYW6kZ959NCIu5wJGUrW8iMQyEetIIDByVh+mKNINayCAnNwmxA5c5MEY9GwyjKZJ SfTIYu/zH0LMrRhtsm+SR3Fpy2SCNET2QTsvdjOdPQ58RQt6uGJo9KkYGBBngiaI0iiw Tg82DJPi4k/Ka6BvBouASFJg2GEBWN5mvgEM3dT+Ww8lugPQAYHhAMmylx3ZTUPcxksA MKTiMyPzW4QH7UCiQTTHsMsttYK5RpuikwlWjwPoBVWdHyAqznUh5YNXxF5F4VmjqCOM gZfA== X-Gm-Message-State: AOJu0Yx+JAidX8afffN/Ioe0hOK3uOWBQviNEyavYMZ7nmDBGr/xM1oP vHcPH8KyumMmuBaX7jsKG+iEGGDwW2p5ief0V60hkt1eQ8diS2ermsJnBf3z X-Gm-Gg: ASbGncsJdxoaouj5FmCqMdi6wR00cppUz0HPx7/xHaMhhI6kMrH2bI6nc9Mhv4mh4Aa OITAFdR4O8NlHP91ULeRLtgdk9VoJfoeeXCcWuI6bfy8aVypY5A7a4GnoNKya8xokYvNJFAocTc keJCivSv2q4GOxgX5kr75BA6VCpojFnIwaspopiKgLwF30BwSZGF999J0TxZkgTp2auLGs/XNk2 e/ntPKnX7jsbHsg0OCIE4L7kOe7mNONrwmYjPOHbYcDpldP2bgl4licnSNAow== X-Google-Smtp-Source: AGHT+IH5pvWD2ZKEKlcVOsQGLOwY0oi3rnDLgVMTthJD/fiV58Muhu4m5/IoIK7yLmtQNFpTmOXsRw== X-Received: by 2002:a5d:64a1:0:b0:385:f092:e16 with SMTP id ffacd0b85a97d-3888e0c07aemr9719604f8f.55.1734370049281; Mon, 16 Dec 2024 09:27:29 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c80613a9sm8669773f8f.101.2024.12.16.09.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:28 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:33 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-3.12.1-external-repo-specs, mono-3.12.1): New variables. Change-Id: Id5d13492163aabb845c47609f52287c5565497a4 --- gnu/packages/dotnet.scm | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index df40169dd37..4d79740d7bd 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -655,3 +655,55 @@ (define-public mono-3.0 license:asl2.0 ;; ./support, contains a copy of zlib license:zlib)))) + +(define mono-3.12.1-external-repo-specs + ;; format: ({reponame OR (reponame dir-name)} commit sha256) ... + '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + ("cecil" "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("entityframework" "a5faddeca2bee08636f1b7b3af8389bd4119f4cd" + "0b05pzf6qwdd92pbzym32nfmw8rq36820vdzakq1kykfmddjr9a7") + ("ikdasm" "7ded4decb9c39446be634d42a575fda9bc3d945c" + "0f3mbfizxmvr5njj123w0wn7sz85v5q2mzwijjql8w1095i0916l") + (("ikvm-fork" "ikvm") "22534de2098acbcf208f6b06836d122dab799e4b" + "1ivywy5sc594sl3bs9xrkna1dbhkp7v1mv79n96ydgq6zcs0698l") + ("Lucene.Net" "88fb67b07621dfed054d8d75fd50672fb26349df" + "1rfxqfz7hkp9rg5anvxlv6fna0xi0bnv1y8qbhf8x48l08yjb38k") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + ("rx" "00c1aadf149334c694d2a5096983a84cf46221b8" + "0ndam0qrnkb4gj21lapqgcy0mqw7s18viswsjyjyaaa4fgqw8kmq"))) + +(define-public mono-3.12.1 + (package + (inherit mono-3.0) + (version "3.12.1") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit (string-append "mono-" "3.12.1")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "01sxrnfch61k8v7av7ccbmy3v37ky8yp8460j6ycnbyfa3305y0f")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-3.12.1-external-repo-specs) + #$prepare-mono-source)))) + (native-inputs (modify-inputs (package-native-inputs mono-3.0) + (replace "mono" mono-3.0))) + (arguments + (substitute-keyword-arguments (package-arguments mono-3.0) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'set-TZ + (lambda _ + ;; for some reason a default is only used if this is empty, not + ;; if it is unset. + (setenv "TZ" ""))))))))) From patchwork Mon Dec 16 17:26:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34959 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6977D27BBE2; Mon, 16 Dec 2024 17:31:01 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 251FC27BBEC for ; Mon, 16 Dec 2024 17:30:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEvi-0001Wz-Rb; Mon, 16 Dec 2024 12:30:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuC-0000NJ-OW for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu7-0001wd-E8 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=px4FouiHmCPlh0JIuRG9HkIN10PLKWAx/9Yn4KzTksY=; b=jybPISkL0xdNsQV7NWCuOgtDrP3j/A8SKtJUOh6vnQ2BDRqXaEVpR/dub0e6WaN3XQ5Xomalyp1KVMY2gtaO5sBCQOQQF3b7SEQqReVwa12pOTvHPmFvhJTRrN19bUPmO0RIhxFHrluxa8UPABM7fw7jGXv1eSs/IAEVGWDqcnED4kJafOiOQuoA3KU0m5sBAy+4Hi6ukf2x1hwQmWtwLMHjgJ+u6DECngaJbkWixpCfEJ2kA8wwMPnlb19F43WsjHBgXCh2qIAwOcwbSihHuZ7VVbGXsJDpCs1blUVIZzgVtq4o9fnpHQLOmgqcaisfL7HZPWolMqM23bwIws5vqQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu7-0006LZ-83 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:11 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 11/21] gnu: Add mono-4.9.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437012224137 (code B ref 74609); Mon, 16 Dec 2024 17:29:11 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:42 +0000 Received: from localhost ([127.0.0.1]:55858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtd-0006Gz-EG for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:42 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:53719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtU-0006Fy-Db for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:33 -0500 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4361f796586so49556135e9.3 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370052; x=1734974852; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=px4FouiHmCPlh0JIuRG9HkIN10PLKWAx/9Yn4KzTksY=; b=DDWkJlE5ZsVdjKeUTDJbJnnhusDp0Q9CP1M58ibf9qEL/8x8teI+L9Tg8dykCQzc9V U9cNv6BJKuFLME+qsT0J22KzV2oPbLdfB1F2E1Y0Y95aXq6lbszTRkseC71Mov0Jcy0s TYf+M0lRmrppwi37e/yX8UeFb2EL2dBWpoU49WtImI9+9OGjP8TfLAi5og8hdLaFLcg4 fAKNjQAWbAorQV0XOvbrQNF2LugUG14lL93+tZ5ETWiTiTyN35v8rHA7ev1g066qEvsf O0eh7daJu7jgm3+n2fN/JeJdQPwWHhV/IMmgseWO5SSZMNiSj/7wo6V1Q1g8iWTHz+7s aJLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370052; x=1734974852; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=px4FouiHmCPlh0JIuRG9HkIN10PLKWAx/9Yn4KzTksY=; b=jPTVBNzfsMzwOe4G7mIDO4o6/88ASeNWhn7/KkidGxWcLY0d2sDUd+CUMyjRae6aAx i3ps1n1V8emvZzsc+P+jdvKXWptjXrcFbIE+dyk+yHVUzRirP5a4cKSYo+ETiz9NoJZU /K7CP0e5qUkkGCVjEPe0NdSXcI9dQZFq4F2QgDoxRGqdwQxx6ZRoJG0ZKe+3UfyOFx9l cYUsEVF/e+/wUNgHzZEA1BuiCtzY6Dww0pAfMen9jroES4qdruCeQMkrRXb7UighHuei zT7gbNXvmEgBnmfxInHSTnddQqlU4l1TaevH+L7UoetfRhWDEU1Ho89iTc0HCXRJvnVC S6lw== X-Gm-Message-State: AOJu0Yw+7SuBdFIuFYoB1gvVZO88edgQK132/T8BRhfwedN5x+DnU48x NHTXzWWeS6JkX6hSnfD0Le3Heu58Qdo5KzTOTO5Xa7LAL9twWjdWIJR7s4oq X-Gm-Gg: ASbGnctSWqw0ZEq6zsCDORSK12GFC5cw1CzWrzDZaZghaQL8Bs98hmnCE9QhMHO6RBM zszl3DsN586adkcXSf2Id+X+jCr2yZNXEbxb8ysg+A4otO5D5gQt9i9P9nc2dAU6D/wMZWew+go jucn5GbpGxn0Xw6J7pBzsxPk1X0/wGPUf6UkIF67gyOUzwiadMX+20zVDUbFBZbNJAwFCnQw8ol mx7lyIOYpGoSg6XT8nUepG14a7OqXuVyPMVXWrf+kqSXXWVHrv7TpLNMZggUQ== X-Google-Smtp-Source: AGHT+IFOlYS5IJFfDTfQMJ2ex3xt8ohD9O16krRkuTqFlHkwHeRZ6RuAcaKS4wXNfQglA1oGIL0uhA== X-Received: by 2002:a05:600c:4511:b0:431:54f3:11ab with SMTP id 5b1f17b1804b1-4362aaa5d27mr119039275e9.33.1734370051423; Mon, 16 Dec 2024 09:27:31 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4363602b1a1sm91920655e9.10.2024.12.16.09.27.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:30 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:34 +0200 Message-ID: <25a65ced1e0ff59aeb0b6a9db06cfc4e527f19d6.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-4.9.0): New variable. * gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch: New patch. * gnu/local.mk (dist_patch_DATA): register it. Change-Id: Iea5926e79f7877aca718c1312c89bcc715b64d21 --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 129 ++++++++++++++++++ ...ono-4.9.0-fix-runtimemetadataversion.patch | 13 ++ 3 files changed, 143 insertions(+) create mode 100644 gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch diff --git a/gnu/local.mk b/gnu/local.mk index 8007ff19a7e..5facc66932b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1824,6 +1824,7 @@ dist_patch_DATA = \ %D%/packages/patches/mono-2.4.2.3-fixes.patch \ %D%/packages/patches/mono-2.6.4-fixes.patch \ %D%/packages/patches/mono-2.11.4-fixes.patch \ + %D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 4d79740d7bd..e658edf8649 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -707,3 +707,132 @@ (define-public mono-3.12.1 ;; for some reason a default is only used if this is empty, not ;; if it is unset. (setenv "TZ" ""))))))))) + +(define mono-4.9.0-external-repo-specs + ;; format: ({reponame OR (reponame dir-name)} commit sha256) ... + '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + ;; (("reference-assemblies" "binary-reference-assemblies") + ;; "6c77197318fe85dfddf75a1b344b9bf8d0007b0b" + ;; "11hbs952srjlsiyin76y2llm5rfjkwjc67ya1i3p0pw193zw14jk") + ;; According to github description this is a "custom" fork of boringssl + ("boringssl" "c06ac6b33d3e7442ad878488b9d1100127eff998" + "187zpi1rvh9i6jfccwzqq337rxxi1rgny6mjq79r08dlrh0lydzc") + ("buildtools" "9b6ee8686be55a983d886938165b6206cda50772" + "0sjw3swavcmijynmaxh647qpkjsbgihdr8lhkyzf8dsprhlq4fxd") + ("cecil" "2b39856e80d8513f70bc3241ed05325b0de679ae" + "0vvax32r6bnhvrcvis83gdrdqcgyxb704hz28g9q0wnay4knqxdm") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ;; ("debian-snapshot" "9342f8f052f81deaba789f030db23a88b4369724" + ;; "") + ("ikdasm" "e4deabf61c11999f200dcea6f6d6b42474cc2131" + "1frbf70y7n7l72j393avdiwk6153cvfwwpighkf2m46clqmq4han") + (("ikvm-fork" "ikvm") "367864ef810859ae3ce652864233b35f2dd5fdbe" + "0ig99kbma4s0mzb13nzsk1vm200ygfr11q6mzgh6jj46s2fc35px") + ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284" + "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + ("nuget-buildtasks" "04bdab55d8de9edcf628694cfd2001561e8f8e60" + "1nklxayxkdskg5wlfl44cndzqkl18v561rz03hwx7wbn5w89q775") + ("nunit-lite" "4bc79a6da1f0ee538560b7e4d0caff46d3c86e4f" + "085fpabjw47rn8hb5zw6wizsg2jrgdbj9rnlar9lrls40wig272q") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv"))) + +(define-public mono-4.9.0 + (package + (inherit mono-3.12.1) + (version "4.9.0") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + ;; some commit chosen after configure.ac was updated to make + ;; the version >= 4.9.0 + (commit "5a3736606e6243d2c84d4df2cf35c284214b8cc4"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0vqkkqkaqwbii4hdzg0vffyy31fz1kmmsa67jyqwxdsvgpjszih3")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-4.9.0-external-repo-specs) + #$prepare-mono-source)) + (patches (search-patches + ;; Saves us an extra intermediate step + "mono-4.9.0-fix-runtimemetadataversion.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-3.12.1) + (replace "mono" mono-3.12.1) + (append tzdata-for-tests))) + (arguments + (substitute-keyword-arguments (package-arguments mono-3.12.1) + ((#:configure-flags _ #f) + ;; "External Boehm is no longer supported" - I VILL NOT use the + ;; bundled software! + #~(list "--with-sgen=yes" + "--disable-boehm" + "--with-csc=mcs")) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-before 'configure 'set-TZDIR + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (search-input-directory (or native-inputs inputs) + "share/zoneinfo"))) + (add-after 'unpack 'use-old-mono-libraries + ;; At this point in history mono had not, to my knowledge, + ;; deigned to grace us with the actual sources to the binaries + ;; shipped in external/binary-reference-assemblies, so just copy + ;; the libraries from an older mono for now I guess. + (lambda _ + (substitute* "./mcs/class/reference-assemblies/Makefile" + (("\\.\\./\\.\\./\\.\\./external/binary-reference-assemblies/v") + (string-append #$(this-package-native-input "mono") + "/lib/mono/"))))) + (add-after 'unpack 'disable-Microsoft.Build.Tasks-tests + (lambda _ + ;; These fail for unknown reasons + (substitute* "mcs/class/Microsoft.Build.Tasks/Makefile" + (("^include ../../build/library.make" all) + (string-append + all + "\nrun-test-recursive:\n\t@echo skipping tests\n"))))))))) + (license (list + ;; most of mcs/tools, mono/man, most of mcs/class, tests by + ;; default, mono/eglib, mono/metadata/sgen*, + ;; mono/arch/*/XXX-codegen.h + ;; mcs/mcs, mcs/gmcs (dual-licensed GPL) + ;; samples + license:x11 + ;; mcs/mcs, mcs/gmcs (dual-licensed X11) + ;; some of mcs/tools + license:gpl1+ ;; note: ./mcs/LICENSE.GPL specifies no version + ;; mono/mono (the mono VM, I think they meant mono/mini) + ;; mono/support (note: directory doesn't exist, probably meant + ;; ./support, but that contains a copy of zlib?) + license:lgpl2.0+ ;; note: ./mcs/LICENSE.LGPL specifies no version + ;; mcs/jay, mono/utils/memcheck.h + license:bsd-4 + ;; mono/utils/bsearch.c, mono/io-layer/wapi_glob.{h,c} + license:bsd-3 + ;; mono/utils/freebsd-{dwarf,elf_common,elf64,elf32}.h + license:bsd-2 + ;; mcs/class/System.Core/System/TimeZoneInfo.Android.cs + ;; mcs/class/RabbitMQ.Client (dual licensed mpl1.1) + license:asl2.0 + ;; ./support, contains a copy of zlib, incl. ./support/minizip + license:zlib + ;; mono/docs/HtmlAgilityPack, mcs/unit24 + license:ms-pl + ;; mcs/class/I18N/mklist.sh, mono/benchmark/{zipmark,logic}.cs + ;; mcs/class/{,Compat.}ICSharpCode.SharpZipLib + license:gpl2+ + ;; mcs/class/RabbitMQ.Client (dual licensed asl2.0) + license:mpl1.1 + ;; API Documentation + license:cc-by4.0)))) diff --git a/gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch b/gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch new file mode 100644 index 00000000000..ec5bad9ae12 --- /dev/null +++ b/gnu/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch @@ -0,0 +1,13 @@ +diff --git a/mcs/mcs/settings.cs b/mcs/mcs/settings.cs +index 1393bcd58f3..af5febe7cf6 100644 +--- a/mcs/mcs/settings.cs ++++ b/mcs/mcs/settings.cs +@@ -1197,7 +1197,7 @@ namespace Mono.CSharp { + } + return ParseResult.Success; + +- case "runtimemetadataversion": ++ case "/runtimemetadataversion": + if (value.Length == 0) { + Error_RequiresArgument (option); + return ParseResult.Error; From patchwork Mon Dec 16 17:26:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34954 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B792227BBE2; Mon, 16 Dec 2024 17:30:47 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 71C4127BBEA for ; Mon, 16 Dec 2024 17:30:46 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEue-0000cR-0N; Mon, 16 Dec 2024 12:29:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuD-0000OO-Sl for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu8-0001wk-JL for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=hXN8vUIttydVUEhWxnQM0yas68bOVM4N1jvu4vu6uFU=; b=jnJIfCODviuCxKDUsHO1cj1az9qDC/0dq2enjqdHM0oHESH4zstNVkLVd2+09acmKsVEZOjJdnZrLTXrHQkQ+ulR8Z1BEDLwClGkJorkSjfAGbRlRIML5I4qnEjCzsLBCLM6LhlXTr+fIaLHJXntanqn/VDawkH60AYty1YMAP+grEaDM2wMpkubKBJPgP3M5oz6UXTWe2IwXlhHZwAWL1cUOffer7iNhl7zZgrOtZQY5zQWWHtdN6fF2uiphLKKcvhii7H0XXN5KwQJVegF6yjreJvRX6PSZelV/02xGz8JOBAmOCuOThdI+K2dOkDC/Kh+0e1vgwaeveoVGOndLQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu8-0006Lq-E9 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:12 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 12/21] gnu: Add mono-5.0.1. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:12 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437012424161 (code B ref 74609); Mon, 16 Dec 2024 17:29:12 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:44 +0000 Received: from localhost ([127.0.0.1]:55863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtf-0006HP-H2 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:44 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:57454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtW-0006GN-DZ for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:35 -0500 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4362f61757fso31859405e9.2 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370054; x=1734974854; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=hXN8vUIttydVUEhWxnQM0yas68bOVM4N1jvu4vu6uFU=; b=cdKxciKr6bSQNuV+SnCjjpcOPwNN6VO2+LNxkT8JZRnS85WgyksNOutxVikq9Erdh3 RCvaqPc9d5dPlnNqTe6PNo6c+lLx2BTfC6+FakJxiScJ31USrL32i3TSPwSXQKNKKcBJ I6zxuBJQ+2U2U8mRZdzLVXxYrSyQqtg0rLEKNfvQ3Euv5CxMDtRxo8Lfr4Y86dNSAXLa WNnL7SZY5Jb66HGwDApIF+Wi1DD295viCDYwLyxCZLJELqJK7kxOZSY1xLxw/MJpK1SX 8iVBRA99g6Mxyf2SVchLRxAyeHMJPbj0K8g600z6FqwO0c/C712eMzfQhQfJ3hDXGfou MQnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370054; x=1734974854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hXN8vUIttydVUEhWxnQM0yas68bOVM4N1jvu4vu6uFU=; b=iaeMC142w9FImaSXfLwegGyePKPZ007kdB4KpDo4iQdJ3l9nOso7d2tFUPyYyKjUdk A3smqSFTiQBmXy1DlFNIKK19jijSWeqRDoPY5kpv+EGk5iaVR12K7rCAU88cOCNgNgWr 1y8o1RPJDCzVz5aWb8DGzue4+OKYOC0WI/DLIt7pr2QcI8HV1VuQxSwVbi6/I6F6cUxY hjgFn9/23mwpdL1NU357PKXTu+gDWkbHrKMcZv5Vosa80zVnLMxD3mUB7jWRHOrA/L9Q Ow63H8cmdn54xrSLBR//fEx8/YCDv6XCJu1U4I87U4zCaaYAoKrW1IPM/iCNKwKnwG0o ZJ0A== X-Gm-Message-State: AOJu0Yw3xqW+N++OUwRQSUw6/hxk2mGDqSJUXcBiDra+BQs/COtZFfYW Kr1FqthlPszYEaCdY6gSxVsfjrjhvD5tAbEf6fRCmn9MLQYZlNdhO8k/Xn5l X-Gm-Gg: ASbGncta/dhxCT8FeNd5zFPZ7+CN1jujT9R/fJ+pP+HFBAkQz+oQxrg1MGBzTjBfCo4 1aNClhvvpNP3JXESVQR7FMrkCR0NuMGhFdD5ScvwtYo7Le93LrnSCCiEbBjs5GTey6NfQireCxC /gzWh7cbCe452hZOi6+l+uFjvtBbjRg9pe4f73sS/ZXIzdWHpNx51Dit/hKeX5LjzgLGGSIXicm MIBEcUaFLEIZYg1QOwYqskng+8784vJJEseg0xVZZpcShKj8/mRk879SumloA== X-Google-Smtp-Source: AGHT+IE3bz1lEfcuITEZcUa9QfT2QHt37Px3W0QqlkVUpmg8GPxXcBTQo/HNpNAw5Cyqd2uwOdxwGA== X-Received: by 2002:a05:600c:a4f:b0:435:21a1:b109 with SMTP id 5b1f17b1804b1-4362aa26d8dmr136979485e9.2.1734370053496; Mon, 16 Dec 2024 09:27:33 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436255531b1sm149541765e9.2.2024.12.16.09.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:33 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:35 +0200 Message-ID: <3196ffc09aa6c8debefd48dbfbb7dde61518a39c.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-5.0.1-external-repo-specs, mono-5.0.1): New variables. Change-Id: I165ef8238c4adddcf92667c34dbb366f98d288bd --- gnu/packages/dotnet.scm | 133 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index e658edf8649..5bebb3929c7 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -836,3 +836,136 @@ (define-public mono-4.9.0 license:mpl1.1 ;; API Documentation license:cc-by4.0)))) + +(define mono-5.0.1-external-repo-specs + '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + ;; snippet in the actual package will delete all dlls and exes, so this + ;; should be rebuilt from scratch. + (("reference-assemblies" "binary-reference-assemblies") + "febc100f0313f0dc9d75dd1bcea45e87134b5b55" + "0lpj911m2lq23r22dpy4i02fy4ykf27dx8fvqpxsxknysj2jl6y4") + ("bockbuild" "512ba41a94bec35ff0c395eb71a180fda23da95c" + "16m00la8svx8v07sxy4zxbpq0cbq7d3nzy53w8kqml8b18h5dabg") + ("boringssl" "c06ac6b33d3e7442ad878488b9d1100127eff998" + "187zpi1rvh9i6jfccwzqq337rxxi1rgny6mjq79r08dlrh0lydzc") + ("buildtools" "9b6ee8686be55a983d886938165b6206cda50772" + "0sjw3swavcmijynmaxh647qpkjsbgihdr8lhkyzf8dsprhlq4fxd") + ("cecil" "7801534de1bfed97c844821c3244e05fc7ffcfb8" + "0dmfyzkm57n3lbgllx6ffz4g84x1slkib9hb4cfp3nhz852qim7b") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "bd96ae5f1485ae8541fe476dfd944efde76bcd9c" + "0j51lc54dmwa4fzna2vjfj4pcd1lk1s5bp5dfix1aqcncyzivazi") + ("corert" "d87c966d80c1274373ddafe3375bf1730cd430ed" + "078v5ks7inm2g1hf96x19k42jnv1qhhh7r8jxrfc7jk4v4lgmqyf") + ("ikdasm" "e4deabf61c11999f200dcea6f6d6b42474cc2131" + "1frbf70y7n7l72j393avdiwk6153cvfwwpighkf2m46clqmq4han") + (("ikvm-fork" "ikvm") "367864ef810859ae3ce652864233b35f2dd5fdbe" + "0ig99kbma4s0mzb13nzsk1vm200ygfr11q6mzgh6jj46s2fc35px") + ("linker" "e4d9784ac37b9ebf4757175c92bc7a3ec9fd867a" + "0ga7br9lqdsycz22dndkbiwbd0c60ml6nl22xlsnjr7lwdccfjvl") + ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284" + "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "8d307472ea214f2b59636431f771894dbcba7258" + "1h1frnj0x8k7b29ic4jisch0vlpmsmghjw554pz277f2nxaidljj") + (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee" + "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc") + ;; ("roslyn-binaries" "0d4198b1299bcb019973749da4d47e90f15a1e46" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv"))) + +(define-public mono-5.0.1 + (package + (inherit mono-4.9.0) + (version "5.0.1") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit "mono-5.0.1.1"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "05z9bddljp8xwsw7qw3f7bic8i202wrc60pjb9fn4igwfz9278n5")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-5.0.1-external-repo-specs) + #$@prepare-mono-source-0)))) + (native-inputs (modify-inputs (package-native-inputs mono-4.9.0) + (replace "mono" mono-4.9.0) + (append cmake-minimal))) + (arguments + (substitute-keyword-arguments (package-arguments mono-4.9.0) + ((#:make-flags _ #f) + ;; Build system is buggy here, it does some weird wildcard expansion + ;; that assumes there's only at most one file in a directory + #~(list "V=1" "SKIP_AOT=1")) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'disable-roslyn-install + ;; For some reason there is no predefined way to persuade mono to + ;; not install the binary blobs it assumes are there. + (lambda _ + (substitute* "mcs/packages/Makefile" + (("^install-local:") + (string-append "install-local: + echo \"Skipping blob install\" + +unused0:"))))) + (delete 'use-old-mono-libraries) + (add-after 'build 'build-reference-assemblies + (lambda* (#:key make-flags #:allow-other-keys) + (let ((top (getcwd))) + (with-directory-excursion "external/binary-reference-assemblies" + ;; No clue why all these references are missing, just + ;; power through I guess. + (substitute* (find-files "." "^Makefile$") + (("CSC_COMMON_ARGS := " all) + (string-append all "-delaysign+ ")) + (("IBM\\.Data\\.DB2_REFS := " all) + (string-append all "System.Xml ")) + (("Mono\\.Data\\.Sqlite_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Data\\.DataSetExtensions_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Data\\.OracleClient_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.IdentityModel_REFS := " all) + (string-append all "System.Configuration ")) + (("System\\.Design_REFS := " all) + (string-append all "Accessibility ")) + (("System\\.Web\\.Extensions\\.Design_REFS := " all) + (string-append all "System.Windows.Forms System.Web ")) + (("System\\.ServiceModel\\.Routing_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Web\\.Abstractions_REFS := " all) + (string-append all "System ")) + (("System\\.Reactive\\.Windows\\.Forms_REFS := " all) + (string-append all "System ")) + (("System\\.Windows\\.Forms\\.DataVisualization_REFS := " all) + (string-append all "Accessibility ")) + (("Facades/System\\.ServiceModel\\.Primitives_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Dynamic\\.Runtime_REFS := " all) + (string-append all "System ")) + (("Facades/System\\.Xml\\.XDocument_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Runtime\\.Serialization.Xml_REFS := " all) + (string-append all "System.Xml "))) + (apply invoke "make" + (string-append "CSC=MONO_PATH=" + top "/mcs/class/lib/build" + " " + top "/runtime/mono-wrapper" + " " + top "/mcs/class/lib/build/mcs.exe") + make-flags))))))))))) From patchwork Mon Dec 16 17:26:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34958 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2F89127BBE2; Mon, 16 Dec 2024 17:31:01 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 55D4F27BBE9 for ; Mon, 16 Dec 2024 17:30:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuc-0000bX-AR; Mon, 16 Dec 2024 12:29:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuE-0000QP-Ff for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu9-0001wm-Aa for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=uuz9IMvRuMnT8TPajDl1d+2VQVw/RJsXSjHUW6mSYGQ=; b=s7PuxzADU120QFSGPYSP7milb1H0qeUDZF3NaW9ARmc4VSnoS/3YT8EP5uDSSvdDTNXGBRw9kUWm3R/QaYDM51Zep2WM0GwhK21nXdOH9hYVToB4IZd6aMq25c20E34vtiXTvTTP9hS0m2bjkkeaKiHPvccP/B2rJARHNZEgWtrzI8Gu6hkKiiIIJyFZvMZCXLNDFgIHIn3qnvzYLJT3xV3jV458yz5HrC7YYZHnvxmfwrKdFAl2VU+4fVgNUliuqnbS5DQDddLK+m1aBeLhtpBGWyB9eXnhgJDWFwcgtTP/qwYrG1TVhecWII877hzQ76HWEusNuyanl8vPbDgu9Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu9-0006M0-3P for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:13 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 13/21] gnu: Add mono-5.1.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:13 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437013324197 (code B ref 74609); Mon, 16 Dec 2024 17:29:13 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:53 +0000 Received: from localhost ([127.0.0.1]:55869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEto-0006IC-JC for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:53 -0500 Received: from mail-wm1-f51.google.com ([209.85.128.51]:61718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtd-0006Gi-E6 for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:42 -0500 Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4361d5dcf5bso48110595e9.3 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370056; x=1734974856; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=uuz9IMvRuMnT8TPajDl1d+2VQVw/RJsXSjHUW6mSYGQ=; b=kcxEQSUpx7Jb0KcHa/3uxsBSA9fEj1SrlhF03iW4iWlsuPCHWOWhz5xCODCri2ihMK GseePgKOCajoa0WKQd85wh+P4sJlyZ6ar80Ip3nsdOJiPptV1L3Orh900nAzlTXS/Le6 +/02ttNAV23bnu1rS33xJ8IckPNdpxkQHbk+c654SKcJicHJDspLUeDWipRKcy6GMteF 4aC5nFpDBQ/0odTcFy38so9Q4JUl0m7p1Qw/qgmuULgzeno2MKR/uSOR+ntKpOaGkY8j 1HlQwiiGCfem5MfCUc7/KkZ6OC+xY4Bat91MXzZ85oQY2Vkr2mmRIB0RR6Q5vvjJyvDf w1bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370056; x=1734974856; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=uuz9IMvRuMnT8TPajDl1d+2VQVw/RJsXSjHUW6mSYGQ=; b=FNh9z/4Z7d4tndxT8o1loyKE8G3z+74GwEj6nuT+7CYxgkBhbOXNgSA18Bzk8DyB1j xkVPIQ9jRr3okiHHf4vrYgOPkgtFlCUvOB5jkbOAEWcc1ZM7fbkioz65xOYKFsZZmA61 2v0RvkCg4FkvazN+5moArrCocMil2HRyu1Zk+asHvHVklWeTX4v9z2hgsSTlszw2piLL QBvVDcZp2VNDVqdoDzz6QQr4cyClSyS+B+CRN4KxhQEShBf2PQpHE3h6hTHlwPDE6wvm VgJPb3vlT7WLtmnuRg12O4BUYPWBDX4MLDc+UPX55UPO0ZQkE69UKvFY2JZb3Kw2+sDz 6B0w== X-Gm-Message-State: AOJu0Yw75m7oQo9Dki6je8CYqccODtXDtoKeMMnuz0HAkSmdM1BD+Je8 bzF4me/GZfpDUr9C1Q4nOr5VoU6hgXMfvqF9XcNjnb1fs2veWVwA791gF357 X-Gm-Gg: ASbGncshdIeZj3OoQOG84bEzdtd50jvdOLZkHaGHdEMvd5eE2uMtLu1iXjQoDJ5TXEV v/b2da5drbtnuzYrFEdMiD4QrbeXSM770eDGpVNIg0l0hNoaPcwtCfO10ND5BDEG/gR2yoXMVMv +vJdZiR7VNLJYh5MTUHJdj5XClAaBwgDZLWvkQNHGJs3HWQ1kf/tg8d/CGXGP6e84qoSWzBf28Z /vrQqqMWpcdyy85FBwOP2GDfrB/EwGqo/m6D2PCmNFJhgMv5mVQyQgUCOjj3A== X-Google-Smtp-Source: AGHT+IH1BbEP38eKSsImH148S66Xq/0PfrASIqOuJDUh9oF6claRtaBD0z9XXq96dEurC/VgkTk7rA== X-Received: by 2002:a5d:64e9:0:b0:385:e1a8:e28e with SMTP id ffacd0b85a97d-38880ac2197mr11441379f8f.10.1734370055587; Mon, 16 Dec 2024 09:27:35 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8046c05sm8870321f8f.73.2024.12.16.09.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:35 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:36 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-5.1.0-external-repo-specs, mono-5.1.0): New variables. Change-Id: Ie58e20f75920ee0492e977c82a2e302311793946 --- gnu/packages/dotnet.scm | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 5bebb3929c7..50961ee483a 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -969,3 +969,71 @@ (define-public mono-5.0.1 " " top "/mcs/class/lib/build/mcs.exe") make-flags))))))))))) + +(define mono-5.1.0-external-repo-specs + '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + (("reference-assemblies" "binary-reference-assemblies") + "febc100f0313f0dc9d75dd1bcea45e87134b5b55" + "0lpj911m2lq23r22dpy4i02fy4ykf27dx8fvqpxsxknysj2jl6y4") + ("bockbuild" "fd1d6c404d763c98b6f0e64e98ab65f92e808245" + "0l2n9863j5y20lp3fjcpbb0a9jcfk0kqmnzlsw20qchd05rjgyb0") + ("boringssl" "c06ac6b33d3e7442ad878488b9d1100127eff998" + "187zpi1rvh9i6jfccwzqq337rxxi1rgny6mjq79r08dlrh0lydzc") + ("buildtools" "b5cc6e6ab5f71f6c0be7b730058b426e92528479" + "0ldj5l4p4q8j9dhk0nifr3m0i64csvb56wlc2xd4zy80sfgmjn06") + ("cecil" "44bc86223530a07fa74ab87007cf264e53d63400" + "0smsa8i4709y1nky3hshj7ayxhjcc17wlnfdvhfay7ly5dxml84g") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "63c51e726292149b4868db71baa883e5ad173766" + "1406rbra83k6gw2dnnsfqcfwiy1h89y6lq64ma5rckmb5drb0ng9") + ("corert" "31eda261991f9f6c1add1686b6d3799f835b2978" + "0s0pd4m9070xlx238fdhqf2b3iyd2vzff3f0sxlyi8s0lhsrl8zv") + ("ikdasm" "88b67c42ca8b7d58141c176b46749819bfcef166" + "0b0b1dhg80r640n81iqawwkxi1k289n4zxjfj0ldd9rkvfxvlwaw") + (("ikvm-fork" "ikvm") "7c1e61bec8c069b2cc9e214c3094b147d76bbf82" + "0vmc5r4j76hkd4zis1769ppdl1h1l7z8cld0y4p1m64n86ghkzfn") + ("linker" "1bdcf6b7bfbe3b03fdaa76f6124d0d7374f08615" + "1xx6s8dcgcz803yvqgzhcgmj16c9s8vrvvl8k4y0xma5w51kn23k") + ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284" + "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "04bdab55d8de9edcf628694cfd2001561e8f8e60" + "1nklxayxkdskg5wlfl44cndzqkl18v561rz03hwx7wbn5w89q775") + (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee" + "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc") + ;; ("roslyn-binaries" "0d4198b1299bcb019973749da4d47e90f15a1e46" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv") + ;; ("xunit-binaries" "b8e20d265b368dd6252703d5afd038d0b028e388" + ;; "") + )) + +(define-public mono-5.1.0 + (package + (inherit mono-5.0.1) + (version "5.1.0") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit + "6fafd08b507c56f11a2eb6570703a39e5bdc0a81"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1sxq40nay5ghhmfbdln98iri19y0h7q36r3pqnxmxnm94livx2k5")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-5.1.0-external-repo-specs) + #$@prepare-mono-source-0)))) + (native-inputs (modify-inputs (package-native-inputs mono-5.0.1) + (replace "mono" mono-5.0.1))))) From patchwork Mon Dec 16 17:26:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34957 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EE12F27BBE2; Mon, 16 Dec 2024 17:30:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B71C627BBEA for ; Mon, 16 Dec 2024 17:30:57 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEv8-0001Bb-LP; Mon, 16 Dec 2024 12:30:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuE-0000QR-Gm for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEu9-0001wo-QZ for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=YVfD4rUSJVTsimqNalaAXoDf/N5cbdB8ABLEhNTtL8c=; b=TjmffB+QPomWszeV3MikWtinoKzio4imfOfQdgCDy0QBloZCEbF3+Dpv4dry55gaWhI5bai08iEE1KvWr8jRRr4CMUjpuSPbixAca2onj+MUu3SVTxyZ+nQyCqsSrJ5CNgVWCeDMsMshKquhhLSUg/XNEoitjhJr5UtAm/F7st/INXeAGm4xohlSEQeM0qszQ4A1DNFY68TWH0qIW+HD+jzgitXlV0VRv3pgPsNwx2v4thwrVUKIXeBlqYlgmDKzZFVYXXRoguq5xFtRBCJacBDK3rm0xXxO/58g9D8FueKSinD5nj2EQXGCus4WNQXXwlg9HLZCzYV2OhcG/CRZTA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEu9-0006M9-L0 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:13 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 14/21] gnu: Add mono-5.2.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:13 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437013324206 (code B ref 74609); Mon, 16 Dec 2024 17:29:13 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:53 +0000 Received: from localhost ([127.0.0.1]:55871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtp-0006IE-47 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:53 -0500 Received: from mail-wm1-f52.google.com ([209.85.128.52]:43298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtf-0006Gl-Ib for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:44 -0500 Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43626213fffso25516395e9.1 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370058; x=1734974858; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=YVfD4rUSJVTsimqNalaAXoDf/N5cbdB8ABLEhNTtL8c=; b=F1shbdTTFVCL6MS3PRaBTFSp+WhScORF6OhzdlOcGu/2KwYhey0uTGGJkubXkJnGfR TystDi+G8mFHmK2YEW/u2+pRSCTRqin9YNvVRPY7aqVMKKJ0lw3SKCLnucf1BhOJcE1c gvkRqhlXBwMWbKbYSaEERz95IkWXjMVPEm52WP5ac12lrff7N8yrVEtylTBmob/+mE1q osNehPNyK1xw4c1zgVvb+p7tKT6JUqLr2PaOamcozeeTaqXy3u7hXaMPDv/8/inXeO2a kThdl6zzNr11GsSuzL+X/Vb/DFFkU2I9dphlBJckNp52dFc45ORNzLN8nE1f0NBEjEKS 5Q/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370058; x=1734974858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YVfD4rUSJVTsimqNalaAXoDf/N5cbdB8ABLEhNTtL8c=; b=wJDeB+yjYMWAbJFAmSQL/hzo2MZB1JOfO8h6EM9AjRcSfev1c7YfaiIhS8Q5ifZIAP Fz4I2XQJfH0wHk6Y73ixgl5e7AG4oz39ouXiqmnrGreOrxDWa05uT9purDPm778Tq4lI gmEdlkfqHhY4plf0FGHxLoodInamFALpdfzRQvxyi0N/LUem3jPlS5TR+nUu7quDaCuf /FReC9PrdwQTkwGUeqKijzARi9u8x4N71oVFBFbx2SUm3QGoHtU+CHDw0YgFd3klBPDr RC/Od6yT52Sm648qBUiojLUTVh2YUHgEDVpi9v/nnGNKHqET287ERSkuNTh8IiqTNaWv xpLQ== X-Gm-Message-State: AOJu0YyUBeLe5AUBuU2dp00LX4X7o5EGqWKWYVE3gVB8LpB79/a0T3z1 vgz5RmQfGv6m8+Gf3BxSFST8/L3MkrW+6QsM5JOpSSCpbMEZ9fh5JKg9Md8/ X-Gm-Gg: ASbGnctuYl9gdzo3zL0/nzjtOPPXQ3Ich27hJA04Z/+s4F8yM3hchUKS7hfcSJox9wj g05sraEVtNIrZVHMHyZcgaUuLlx+9J1D5Ov/5gNjjZwB1v6fR5y/hCu/NdZEBA7krTydZNazRgQ pqPJcfmx6P5hUKN0N7+r26Pq19dQAd96awAzSwfPOXEKCpGCckS4edIXZLOEm8OF7mHOfx4f5F4 FCg3KgWtFRXzwL8Q/OrW7QCzM46jGYhQXtN5xOEK6S0oE8uvb1mqtp/c3EN3w== X-Google-Smtp-Source: AGHT+IHQfBNz2EudcW510AcPRT0YD8teoE9V8W3uGxEtKbNeSdcUITtlhCT7VOEvxlyAzIySB8vA1w== X-Received: by 2002:a05:600c:4709:b0:435:1a2:262a with SMTP id 5b1f17b1804b1-43648131464mr1682615e9.3.1734370057845; Mon, 16 Dec 2024 09:27:37 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43625706c5fsm145839665e9.31.2024.12.16.09.27.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:37 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:37 +0200 Message-ID: <7ead09b1f644a0eceb3b7a7d68a5211d13309698.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-5.2.0-external-repo-specs, mono-5.2.0): New variables. Change-Id: I089850bfd50f229af5a236bbc39ee9ae4787ef9f --- gnu/packages/dotnet.scm | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 50961ee483a..cf391ed9200 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1037,3 +1037,70 @@ (define-public mono-5.1.0 #$@prepare-mono-source-0)))) (native-inputs (modify-inputs (package-native-inputs mono-5.0.1) (replace "mono" mono-5.0.1))))) + +(define mono-5.2.0-external-repo-specs + '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + (("reference-assemblies" "binary-reference-assemblies") + "142cbeb62ffabf1dd9c1414d8dd76f93bcbed0c2" + "1wkd589hgb16m5zvmp9yb57agyyryaa1jj8vhl4w20i2hp22wad9") + ("bockbuild" "45aa142fa322f5b41051e7f40008f03346a1e119" + "1sjlgzh3hq251k729a1px707c1q2gnfayghgx1z5qyddnyaxna20") + ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff" + "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y") + ("buildtools" "b5cc6e6ab5f71f6c0be7b730058b426e92528479" + "0ldj5l4p4q8j9dhk0nifr3m0i64csvb56wlc2xd4zy80sfgmjn06") + ("cecil" "362e2bb00fa693d04c2d140a4cd313eb82c78d95" + "0bvaavlnldrja8ixb66bg33kz05950vm5sk4pz0k0zjgspfgpcvd") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "78360b22e71b70de1d8cc9588cb4ef0040449c31" + "1wrszafyar7q1cdfba68xd6b4d54p3iim2czmxblms1yw19ycqm7") + ("corert" "ed6296dfbb88d66f08601c013caee30c88c41afa" + "179q1aiq44bzdckg1xqm6iwyx835cp6161w5vgsfrgbw0p3kidxr") + ("ikdasm" "88b67c42ca8b7d58141c176b46749819bfcef166" + "0b0b1dhg80r640n81iqawwkxi1k289n4zxjfj0ldd9rkvfxvlwaw") + (("ikvm-fork" "ikvm") "7c1e61bec8c069b2cc9e214c3094b147d76bbf82" + "0vmc5r4j76hkd4zis1769ppdl1h1l7z8cld0y4p1m64n86ghkzfn") + ("linker" "c7450ca2669becddffdea7dcdcc06692e57989e1" + "0vd1vw6hqm1p127m6079p9n4xrckrf4iakvj41hnqfwws94w5mv1") + ("Lucene.Net.Light" "85978b7eb94738f516824341213d5e94060f5284" + "0d118i52m3a0vfjhfci81a2kc4qvnj23gs02hrvdrfpd1q92fyii") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "8d307472ea214f2b59636431f771894dbcba7258" + "1h1frnj0x8k7b29ic4jisch0vlpmsmghjw554pz277f2nxaidljj") + (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee" + "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc") + ;; ("roslyn-binaries" "dcb0a0534d5104eaf945d3d1f319dc33044b7bbe" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv") + ;; ("xunit-binaries" "b8e20d265b368dd6252703d5afd038d0b028e388" + ;; "") + )) + +(define-public mono-5.2.0 + (package + (inherit mono-5.1.0) + (version "5.2.0.224") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit "mono-5.2.0.224"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0zsgfqyjkpix05gvgvhqyyqcwcjp5xlvcyv471q32qf307dccbfa")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-5.2.0-external-repo-specs) + #$@prepare-mono-source-0)))) + (native-inputs (modify-inputs (package-native-inputs mono-5.1.0) + (replace "mono" mono-5.1.0))))) From patchwork Mon Dec 16 17:26:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34951 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A95EF27BBEA; Mon, 16 Dec 2024 17:30:28 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7235B27BBE2 for ; Mon, 16 Dec 2024 17:30:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEui-0000g2-Dc; Mon, 16 Dec 2024 12:29:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuE-0000QU-Hk for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEuB-0001wq-8V for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=kRg6cW6spJeAIRtdLIwCOJj9QI7t0vE4Cxb0gRNL3Pg=; b=Ed05oVGOr2Z9ZS0afV6anfIzcmsUS85xoLFhoBLa/y4NfmQASpKZ5n7US+LbArkcTl1iKVKlntAWori4zUIwI7+WosAi2zfEig5ECf+EuHPqXyhxT/fOxGodImVg4B0dohgnfDPgHCrH5VFnxJAyWUZPChM2gJyUM1nlQRO2wGjTzHfkUOYSaYVjfLXf/2xyZA+c3a5XDKuE/b4moiCiavYuCb4NP7LjTzGP9aIG/Gu7DfngDSfxK1BxIHkjGgaGGx6p+e1svCRTt4cn3rdhlgsrDDjFdt9AwNvYHB4FEDXJjt9BmKn7++3G9JNjV67m2LIthljaqpDf59v8+a649A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEuA-0006MT-UJ for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:14 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 15/21] gnu: Add mono-5.4.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437014124260 (code B ref 74609); Mon, 16 Dec 2024 17:29:14 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:29:01 +0000 Received: from localhost ([127.0.0.1]:55875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtu-0006J1-1t for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:29:01 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:59642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEti-0006Gx-Ih for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:50 -0500 Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3862df95f92so2206215f8f.2 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370061; x=1734974861; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=kRg6cW6spJeAIRtdLIwCOJj9QI7t0vE4Cxb0gRNL3Pg=; b=f/yoOYugFrD9OI06QVKenmDYfSRwggXyd3xRkn2pNw/3nfBpStlh5Kvp7Otf8jR+Ow chti+OzGJgafU9dbW0OZEQaIiyA1kah0nDp+VPRG8M3mCFhzU2NOyvTOj47XMvcSzwdw Yw72ZVlLaWpxEcYdmyzKrcSe+c6Bd9SfkkOEr4qgldXuofj91PFf6mediV80v3y7ooBs kKLfU+Aod6hUjKtfpS22D0ipSKBqFjqwQ1hUpetW3btyR019try2N/Zspl5+TVCnUw3x ZePtStrvQS5Q4lvzxx2b43WspI71NlkaUqxobfpbFr9hvH3eQUjBYe5HHFuw+WO1s3t7 LKUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370061; x=1734974861; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kRg6cW6spJeAIRtdLIwCOJj9QI7t0vE4Cxb0gRNL3Pg=; b=m1QGDrRZDa5W/22TTY3q3+ZEfvpY8WV6GWwp4A9QuQjEhy8Z0pGmIJpiaMF8beLAgi mXOsHDFagwYd7Ci08mzfRPz59hrCNnMLyD9Czw23eEj8vlaJxjUQdz2HEmFglPPaMytI VOFDaSZhCeLt89PpysoeZpk5E6Cd+TEa+RKjB1LvbG4ihc7GwrRdxboreiqSdIvdin2i V5pkwddZKJpMyV7uFXenSmEvPwWSl7pcp3bewlgOcMb80YnbPU31ffswyWRCkFw9e4xW OmTGW9Tk7sQ7sVpjVDZK0SS5X0Au5gzEWPmXUzRrQw6cI30PYRcLaY2rZ90Q6oMmeF7o CnZg== X-Gm-Message-State: AOJu0YxIKe9uo6ssknUxFffkqQIV2DxBFvKRqmV8iPRgmrrrzook2Sk2 lcdEBUR2+ODsubu7lIhxSlAJN5byYm38TPpzCjcrED9Idc4gFnGtsO9R6g9Q X-Gm-Gg: ASbGnctQfAueIPtRitL3NhdorQVMHPcIA0gBEhHNrujgggYt+lfGx3qVTX57puumtVk 301E+pzpXi+Lc/PgGCA8/iI/OY7l46Vop/f1W7W0UnzSCj6n5f7h3gS+fZGP35tcKWyBzA/0S8a /EJPd3eLXehcm7P1vmdOXYsIhAsWdnXYSHW6HuH77CitolbY4ANNYbVDXNmxAHW/Bnwxs0FR7DI haHNhQAH4ICbwsKBQGx2yW0bY/8zSOG+euti+pGQcnxQ3huNuh5BLfxMQFHeQ== X-Google-Smtp-Source: AGHT+IH4V7M4Ujobay/G9LuW/nOWDC9ALcwpvaZzlccN5fXCtLIjwq4vF7+7zp89Y5MCnqU9s5qEOQ== X-Received: by 2002:a05:6000:1567:b0:385:f7d2:7e9b with SMTP id ffacd0b85a97d-38880adaaa2mr9535521f8f.30.1734370060540; Mon, 16 Dec 2024 09:27:40 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c806b84esm8669384f8f.108.2024.12.16.09.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:39 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:38 +0200 Message-ID: <50408f814cf6fa20cfed8c9b5e6f11fc2aa941a4.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-5.4.0-external-repo-specs, mono-5.4.0): New variables. * gnu/packages/patches/corefx-mono-5.4.0-patches.patch: New patch. * gnu/packages/patches/mono-5.4.0-patches.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patches. Change-Id: I1510c8ac13db60e5beab8033be3efc483e984ec0 --- gnu/local.mk | 2 + gnu/packages/dotnet.scm | 92 ++ .../patches/corefx-mono-5.4.0-patches.patch | 915 ++++++++++++++++++ gnu/packages/patches/mono-5.4.0-patches.patch | 100 ++ 4 files changed, 1109 insertions(+) create mode 100644 gnu/packages/patches/corefx-mono-5.4.0-patches.patch create mode 100644 gnu/packages/patches/mono-5.4.0-patches.patch diff --git a/gnu/local.mk b/gnu/local.mk index 5facc66932b..aa129d89d58 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1114,6 +1114,7 @@ dist_patch_DATA = \ %D%/packages/patches/converseen-hide-non-free-pointers.patch \ %D%/packages/patches/cool-retro-term-wctype.patch \ %D%/packages/patches/coq-autosubst-1.8-remove-deprecated-files.patch \ + %D%/packages/patches/corefx-mono-5.4.0-patches.patch \ %D%/packages/patches/coreutils-gnulib-tests.patch \ %D%/packages/patches/cppcheck-disable-char-signedness-test.patch \ %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\ @@ -1825,6 +1826,7 @@ dist_patch_DATA = \ %D%/packages/patches/mono-2.6.4-fixes.patch \ %D%/packages/patches/mono-2.11.4-fixes.patch \ %D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \ + %D%/packages/patches/mono-5.4.0-patches.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index cf391ed9200..b4355b048e2 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1104,3 +1104,95 @@ (define-public mono-5.2.0 #$@prepare-mono-source-0)))) (native-inputs (modify-inputs (package-native-inputs mono-5.1.0) (replace "mono" mono-5.1.0))))) + +(define mono-5.4.0-external-repo-specs + '(("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + ("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791" + "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj" + #:recursive? #t) + ("api-snapshot" "b09033be33ab25113743151c644c831158c54042" + "0z67iqd1brib6ni36pklrp7rlxyhri5nk3px37fm1aacgrnsk7ck") + (("reference-assemblies" "binary-reference-assemblies") + "142cbeb62ffabf1dd9c1414d8dd76f93bcbed0c2" + "1wkd589hgb16m5zvmp9yb57agyyryaa1jj8vhl4w20i2hp22wad9") + ("bockbuild" "0efdb371e6d79abc54c0e3bb3689fa1646f4394e" + "10qr1m2wa3zb2i3j16i0cq49higjm451bhlqhqd4rlisqn0w8nrv") + ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff" + "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y") + ("cecil" "c0eb983dac62519d3ae93a689312076aacecb723" + "02i3pwpaf6q00pklfmwxhz0lgp83854dyqnvf4c1ys07cs8y1pdk") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "9ad53d674e31327abcc60f35c14387700f50cc68" + "0ap4g2fj8wsar4xvbc6dkd2l67qalxlcw5laplq3an5nvj2ld65w" + #:patches ("corefx-mono-5.4.0-patches.patch")) + ("corert" "48dba73801e804e89f00311da99d873f9c550278" + "1zw47jf4cwqmaixylisxi73xf6cap41bwf9vlmpxanzxaqklzsvk") + ("ikdasm" "1d7d43603791e0236b56d076578657bee44fef6b" + "1kw8ykkad55qhapg6jbvqim7vainqlpz8469flm083lpz7pks3sg") + (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1" + "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi") + ("linker" "99354bf5c13b8055209cb082cddc50c8047ab088" + "05zlajnqf83xfvn2whh9nql6j85sq12aw26sqmyqz7zcpml171mj") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "b58ba4282377bcefd48abdc2d62ce6330e079abe" + "1say03fnqkjsx97zacany3sa5j4mhfk827hkwp23ib02q18f7lvp") + (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee" + "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc") + ;; ("roslyn-binaries" "1904c7d0682a878e2d25b4d49f3475d12fbb9cc6" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv") + ;; ("xunit-binaries" "d4433b0972f40cb3efaa3fbba52869bde5df8fa8" + ;; "") + )) + +(define-public mono-5.4.0 + (package + (inherit mono-5.2.0) + (version "5.4.0.212") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit + ;; 5.4.0.135 and before have a bug that makes mono not + ;; self-hosting (fails to compile self, example error: + ;; System.Data.SqlClient/SqlTransaction.cs(39,22): error + ;; CS0738: `System.Data.SqlClient.SqlTransaction' does not + ;; implement interface member + ;; `System.Data.IDbTransaction.Connection.get' and the best + ;; implementing candidate + ;; `System.Data.SqlClient.SqlTransaction.Connection.get' + ;; return type `System.Data.SqlClient.SqlConnection' does not + ;; match interface member return type + ;; `System.Data.IDbConnection' + + ;; Note: in above example, SqlConnection implements + ;; IDbConnection. My understanding is that for this to + ;; compile properly, we need covariant return types, which is + ;; a C# 9.0 feature, but somehow the same code has been + ;; compiled just fine by previous versions of mono, and is + ;; compiled fine by this version, but not specific 5.4.0.XXX + ;; versions. + "mono-5.4.0.212"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0gx3fxz1wlq5fkj7iphv32vg9m78ia74m9pgn9rab4fyq2k9an2y")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-5.4.0-external-repo-specs) + #$@prepare-mono-source-0)) + (patches + (search-patches + "mono-5.4.0-patches.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-5.2.0) + (replace "mono" mono-5.2.0))))) diff --git a/gnu/packages/patches/corefx-mono-5.4.0-patches.patch b/gnu/packages/patches/corefx-mono-5.4.0-patches.patch new file mode 100644 index 00000000000..034d769ebce --- /dev/null +++ b/gnu/packages/patches/corefx-mono-5.4.0-patches.patch @@ -0,0 +1,915 @@ +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs +index aa8afa5a1b..3a2518246a 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs +@@ -246,8 +246,9 @@ namespace Microsoft.CSharp.RuntimeBinder + ExprArrayInit arrinit; + + ExprList list = (ExprList)pExpr.OptionalArguments; +- if (list.OptionalNextListNode is ExprList next) ++ if (list.OptionalNextListNode is ExprList) + { ++ ExprList next = (ExprList)list.OptionalNextListNode; + methinfo = (ExprMethodInfo)next.OptionalElement; + arrinit = (ExprArrayInit)next.OptionalNextListNode; + } +@@ -382,8 +383,9 @@ namespace Microsoft.CSharp.RuntimeBinder + Expr nextNode = list.OptionalNextListNode; + ExprPropertyInfo propinfo; + ExprArrayInit arguments; +- if (nextNode is ExprList nextList) ++ if (nextNode is ExprList) + { ++ ExprList nextList = (ExprList)list.OptionalNextListNode; + propinfo = nextList.OptionalElement as ExprPropertyInfo; + arguments = nextList.OptionalNextListNode as ExprArrayInit; + } +@@ -553,8 +555,9 @@ namespace Microsoft.CSharp.RuntimeBinder + list = (ExprList)list.OptionalNextListNode; + MethodInfo methodInfo; + bool bIsLifted = false; +- if (list.OptionalNextListNode is ExprList next) ++ if (list.OptionalNextListNode is ExprList) + { ++ ExprList next = (ExprList)list.OptionalNextListNode; + ExprConstant isLifted = (ExprConstant)next.OptionalElement; + Debug.Assert(isLifted != null); + bIsLifted = isLifted.Val.Int32Val == 1; +@@ -677,8 +680,9 @@ namespace Microsoft.CSharp.RuntimeBinder + + private Expression GetExpression(Expr pExpr) + { +- if (pExpr is ExprWrap wrap) ++ if (pExpr is ExprWrap) + { ++ ExprWrap wrap = (ExprWrap) pExpr; + return _DictionaryOfParameters[(ExprCall)wrap.OptionalExpression]; + } + else if (pExpr is ExprConstant) +@@ -875,20 +879,24 @@ namespace Microsoft.CSharp.RuntimeBinder + { + for (;;) + { +- if (pExpr is ExprCast cast) ++ if (pExpr is ExprCast) + { ++ ExprCast cast = (ExprCast) pExpr; + pExpr = cast.Argument; + } +- else if (pExpr is ExprTypeOf typeOf) ++ else if (pExpr is ExprTypeOf) + { ++ ExprTypeOf typeOf = (ExprTypeOf) pExpr; + return typeOf.SourceType.Type.AssociatedSystemType; + } +- else if (pExpr is ExprMethodInfo methodInfo) ++ else if (pExpr is ExprMethodInfo) + { ++ ExprMethodInfo methodInfo = (ExprMethodInfo) pExpr; + return GetMethodInfoFromExpr(methodInfo); + } +- else if (pExpr is ExprConstant constant) ++ else if (pExpr is ExprConstant) + { ++ ExprConstant constant = (ExprConstant) pExpr; + ConstVal val = constant.Val; + CType underlyingType = pExpr.Type; + object objval; +@@ -954,8 +962,9 @@ namespace Microsoft.CSharp.RuntimeBinder + + return pExpr.Type.isEnumType() ? Enum.ToObject(pExpr.Type.AssociatedSystemType, objval) : objval; + } +- else if (pExpr is ExprZeroInit zeroInit) ++ else if (pExpr is ExprZeroInit) + { ++ ExprZeroInit zeroInit = (ExprZeroInit) pExpr; + if ((pExpr = zeroInit.OptionalArgument) == null) + { + return Activator.CreateInstance(zeroInit.Type.AssociatedSystemType); +@@ -981,8 +990,9 @@ namespace Microsoft.CSharp.RuntimeBinder + Expr p = list; + while (list != null) + { +- if (list is ExprList pList) ++ if (list is ExprList) + { ++ ExprList pList = (ExprList) list; + p = pList.OptionalElement; + list = pList.OptionalNextListNode; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs +index 6dc888c6ef..89f881f668 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs +@@ -195,7 +195,8 @@ namespace Microsoft.CSharp.RuntimeBinder + LocalVariableSymbol[] locals = PopulateLocalScope(payload, pScope, arguments, parameters); + + // (1.5) - Check to see if we need to defer. +- if (DeferBinding(payload, arguments, args, locals, out DynamicMetaObject o)) ++ DynamicMetaObject o; ++ if (DeferBinding(payload, arguments, args, locals, out o)) + { + deferredBinding = o; + return null; +@@ -1053,8 +1054,9 @@ namespace Microsoft.CSharp.RuntimeBinder + + private static void CheckForConditionalMethodError(Expr pExpr) + { +- if (pExpr is ExprCall call) ++ if (pExpr is ExprCall) + { ++ ExprCall call = (ExprCall)pExpr; + // This mimics the behavior of the native CompilerSymbolLoader in GetConditionalSymbols. Override + // methods cannot have the conditional attribute, but implicitly acquire it from their slot. + +@@ -1087,8 +1089,9 @@ namespace Microsoft.CSharp.RuntimeBinder + ExprMemberGroup memgroup; + TypeArray typeArgs; + +- if (pResult is ExprCall call) ++ if (pResult is ExprCall) + { ++ ExprCall call = (ExprCall) pResult; + type = call.MethWithInst.Ats; + methprop = call.MethWithInst.Meth(); + memgroup = call.MemberGroup; +@@ -1155,12 +1158,15 @@ namespace Microsoft.CSharp.RuntimeBinder + + private Expr StripNamedArgument(Expr pArg) + { +- if (pArg is ExprNamedArgumentSpecification named) ++ if (pArg is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = ++ (ExprNamedArgumentSpecification) pArg; + pArg = named.Value; + } +- else if (pArg is ExprArrayInit init) ++ else if (pArg is ExprArrayInit) + { ++ ExprArrayInit init = (ExprArrayInit) pArg; + init.OptionalArguments = StripNamedArguments(init.OptionalArguments); + } + +@@ -1169,14 +1175,16 @@ namespace Microsoft.CSharp.RuntimeBinder + + private Expr StripNamedArguments(Expr pArg) + { +- if (pArg is ExprList list) ++ if (pArg is ExprList) + { ++ ExprList list = (ExprList) pArg; + for(;;) + { + list.OptionalElement = StripNamedArgument(list.OptionalElement); + +- if (list.OptionalNextListNode is ExprList next) ++ if (list.OptionalNextListNode is ExprList) + { ++ ExprList next = (ExprList)list.OptionalNextListNode; + list = next; + } + else +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs +index cebfcd94e1..179ac21620 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs +@@ -157,8 +157,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // We then go over the specified arguments and put the type for any named argument in the right position in the array. + for (int iParam = 0; iParam < args.carg; iParam++) + { +- if (prgexpr[iParam] is ExprNamedArgumentSpecification named) ++ if (prgexpr[iParam] is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)prgexpr[iParam]; + // We find the index of the type of the argument in the method parameter list and store that in a temp + int index = FindName(methProp.ParameterNames, named.Name); + CType tempType = pta[index]; +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs +index c406af43de..0ea81ef21c 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs +@@ -76,22 +76,25 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + { + Debug.Assert(expr != null); + +- if (expr is ExprLocal local && local.IsOK) ++ if (expr is ExprLocal && ((ExprLocal)expr).IsOK) + { ++ ExprLocal local = (ExprLocal)expr; + ReportLocalError(local.Local, kind, isNested); + return true; + } + + Expr pObject = null; + +- if (expr is ExprProperty prop) ++ if (expr is ExprProperty) + { ++ ExprProperty prop = (ExprProperty)expr; + // We've already reported read-only-property errors. + Debug.Assert(prop.MethWithTypeSet != null); + pObject = prop.MemberGroup.OptionalObject; + } +- else if (expr is ExprField field) ++ else if (expr is ExprField) + { ++ ExprField field = (ExprField)expr; + if (field.FieldWithType.Field().isReadOnly) + { + ReportReadOnlyError(field, kind, isNested); +@@ -105,8 +108,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + if (pObject != null && pObject.Type.isStructOrEnum()) + { +- if (pObject is IExprWithArgs withArgs) ++ if (pObject is IExprWithArgs) + { ++ IExprWithArgs withArgs = (IExprWithArgs)pObject; + // assigning to RHS of method or property getter returning a value-type on the stack or + // passing RHS of method or property getter returning a value-type on the stack, as ref or out + ErrorContext.Error(ErrorCode.ERR_ReturnNotLValue, withArgs.GetSymWithType()); +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs +index bb62a926b5..873feff72f 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs +@@ -391,9 +391,10 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + FUNDTYPE ftSrc = expr.Type.fundType(); + FUNDTYPE ftDest = dest.fundType(); + +- if (expr is ExprConstant constant && constant.IsOK && ++ if (expr is ExprConstant && ((ExprConstant)expr).IsOK && + expr.Type.isSimpleType() && dest.isSimpleType()) + { ++ ExprConstant constant = (ExprConstant) expr; + if ((ftSrc == FUNDTYPE.FT_I4 && (ftDest <= FUNDTYPE.FT_LASTNONLONG || ftDest == FUNDTYPE.FT_U8)) || + (ftSrc == FUNDTYPE.FT_I8 && ftDest == FUNDTYPE.FT_U8)) + { +@@ -421,8 +422,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + ErrorContext.Error(dest is TypeParameterType ? ErrorCode.ERR_TypeVarCantBeNull : ErrorCode.ERR_ValueCantBeNull, dest); + } + +- else if (expr is ExprMemberGroup memGrp) ++ else if (expr is ExprMemberGroup) + { ++ ExprMemberGroup memGrp = (ExprMemberGroup) expr; + BindGrpConversion(memGrp, dest, true); + } + else if (!TypeManager.TypeContainsAnonymousTypes(dest) && canCast(expr.Type, dest, flags)) +@@ -555,8 +557,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + { + ErrorContext.Error(ErrorCode.ERR_ValueCantBeNull, dest); + } +- else if (expr is ExprMemberGroup memGrp) ++ else if (expr is ExprMemberGroup) + { ++ ExprMemberGroup memGrp = (ExprMemberGroup)expr; + BindGrpConversion(memGrp, dest, true); + } + else +@@ -1396,8 +1399,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + for (;;) + { + Debug.Assert(pExpr != null); +- if (pExpr is ExprCall call) ++ if (pExpr is ExprCall) + { ++ ExprCall call = (ExprCall)pExpr; + switch (call.NullableCallLiftKind) + { + case NullableCallLiftKind.NotLifted: +@@ -1411,8 +1415,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + continue; + } + } +- else if (pExpr is ExprUserDefinedConversion udc) ++ else if (pExpr is ExprUserDefinedConversion) + { ++ ExprUserDefinedConversion udc = (ExprUserDefinedConversion)pExpr; + pExpr = udc.UserDefinedCall; + continue; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs +index 075ed23a11..6408df4c36 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs +@@ -33,8 +33,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Expr exprCur = expr; + while (exprCur != null) + { +- if (exprCur is ExprList list) ++ if (exprCur is ExprList) + { ++ ExprList list = (ExprList)exprCur; + yield return list.OptionalElement; + exprCur = list.OptionalNextListNode; + } +@@ -61,12 +62,12 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + } + public static bool isNull(this Expr expr) + { +- return expr is ExprConstant constant && constant.IsOK && (expr.Type.fundType() == FUNDTYPE.FT_REF) && constant.Val.IsNullRef; ++ return expr is ExprConstant && ((ExprConstant)expr).IsOK && (expr.Type.fundType() == FUNDTYPE.FT_REF) && ((ExprConstant)expr).Val.IsNullRef; + } + + public static bool IsZero(this Expr expr) + { +- return expr is ExprConstant constant && constant.IsOK && constant.IsZero; ++ return expr is ExprConstant && ((ExprConstant)expr).IsOK && ((ExprConstant)expr).IsZero; + } + + private static Expr GetSeqVal(this Expr expr) +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs +index 6ea8879c40..137e950e76 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs +@@ -207,8 +207,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + VSFAIL("BindExplicitConversion failed unexpectedly"); + return false; + } +- if (_exprDest is ExprUserDefinedConversion udc) ++ if (_exprDest is ExprUserDefinedConversion) + { ++ ExprUserDefinedConversion udc = (ExprUserDefinedConversion)_exprDest; + udc.Argument = _exprSrc; + } + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs +index 99ee57626a..ec0d29d6f3 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs +@@ -265,8 +265,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + ExprUserLogicalOp rval = new ExprUserLogicalOp(pType); + Expr leftChild = ((ExprList)pCallOp.OptionalArguments).OptionalElement; + Debug.Assert(leftChild != null); +- if (leftChild is ExprWrap wrap) ++ if (leftChild is ExprWrap) + { ++ ExprWrap wrap = (ExprWrap)leftChild; + // In the EE case, we don't create WRAPEXPRs. + leftChild = wrap.OptionalExpression; + Debug.Assert(leftChild != null); +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs +index 60a1661eac..dc04fa1657 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs +@@ -601,10 +601,11 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // Check if we have a compile time constant. If we do, create a constant for it and set the + // original tree to the cast. + +- if (exprConst is ExprConstant constant && exprFlags == 0 && ++ if (exprConst is ExprConstant && exprFlags == 0 && + exprSrc.Type.fundType() == typeDest.fundType() && +- (!exprSrc.Type.isPredefType(PredefinedType.PT_STRING) || constant.Val.IsNullRef)) ++ (!exprSrc.Type.isPredefType(PredefinedType.PT_STRING) || ((ExprConstant)exprConst).Val.IsNullRef)) + { ++ ExprConstant constant = (ExprConstant)exprConst; + ExprConstant expr = GetExprFactory().CreateConstant(typeDest, constant.Val); + pexprDest = expr; + return; +@@ -1191,8 +1192,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + while (list != null) + { + Expr arg; +- if (list is ExprList next) ++ if (list is ExprList) + { ++ ExprList next = (ExprList)list; + arg = next.OptionalElement; + list = next.OptionalNextListNode; + } +@@ -1265,8 +1267,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + private Expr UnwrapExpression(Expr pExpression) + { +- while (pExpression is ExprWrap wrap) ++ while (pExpression is ExprWrap) + { ++ ExprWrap wrap = (ExprWrap)pExpression; + Expr wrapped = wrap.OptionalExpression; + if (wrapped == null) + { +@@ -1344,8 +1347,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return false; + if (expr.isLvalue()) + { +- if (expr is ExprProperty prop) ++ if (expr is ExprProperty) + { ++ ExprProperty prop = (ExprProperty)expr; + CheckLvalueProp(prop); + } + markFieldAssigned(expr); +@@ -1571,9 +1575,10 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + // If we're invoking code on a struct-valued field, mark the struct as assigned (to + // avoid warning CS0649). +- if (pObject is ExprField field && !field.FieldWithType.Field().isAssigned && !swt.Sym.IsFieldSymbol() && ++ if (pObject is ExprField && !((ExprField)pObject).FieldWithType.Field().isAssigned && !swt.Sym.IsFieldSymbol() && + typeObj.isStructType() && !typeObj.isPredefined()) + { ++ ExprField field = (ExprField) pObject; + field.FieldWithType.Field().isAssigned = true; + } + +@@ -1786,8 +1791,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + Expr argument = indir; + Expr rval; +- if (argument is ExprNamedArgumentSpecification named) ++ if (argument is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)argument; + int index = 0; + // If we're named, look for the type of the matching name. + foreach (Name i in mostDerivedMethod.ParameterNames) +@@ -1928,8 +1934,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Expr expr = it.Current(); + count++; + +- if (expr is ExprNamedArgumentSpecification named) ++ if (expr is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)expr; + named.Value = tryConvert(named.Value, elementType); + } + else +@@ -1951,8 +1958,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + private void markFieldAssigned(Expr expr) + { +- if (0 != (expr.Flags & EXPRFLAG.EXF_LVALUE) && expr is ExprField field) ++ if (0 != (expr.Flags & EXPRFLAG.EXF_LVALUE) && expr is ExprField) + { ++ ExprField field = (ExprField) expr; + FieldSymbol symbol; + do + { +@@ -2019,8 +2027,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + for (Expr list = args; list != null; iarg++) + { + Expr arg; +- if (list is ExprList next) ++ if (list is ExprList) + { ++ ExprList next = (ExprList)list; + arg = next.OptionalElement; + list = next.OptionalNextListNode; + } +@@ -2374,8 +2383,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + { + Expr arg; + +- if (list is ExprList next) ++ if (list is ExprList) + { ++ ExprList next = (ExprList)list; + arg = next.OptionalElement; + list = next.OptionalNextListNode; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs +index 7708f197ae..b75ac340be 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs +@@ -510,7 +510,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // then let us through. + if (methprop.isParamArray && + index < pArguments.carg && +- pArguments.prgexpr[index] is ExprArrayInit arrayInit && arrayInit.GeneratedForParamArray) ++ pArguments.prgexpr[index] is ExprArrayInit && ((ExprArrayInit)pArguments.prgexpr[index]).GeneratedForParamArray) + { + paramArrayArgument = pArguments.prgexpr[index]; + } +@@ -518,7 +518,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // Positional. + if (index < pArguments.carg && + !(pArguments.prgexpr[index] is ExprNamedArgumentSpecification) && +- !(pArguments.prgexpr[index] is ExprArrayInit arrayInitPos && arrayInitPos.GeneratedForParamArray)) ++ !(pArguments.prgexpr[index] is ExprArrayInit && ((ExprArrayInit)pArguments.prgexpr[index]).GeneratedForParamArray)) + { + pExprArguments[index] = pArguments.prgexpr[index++]; + continue; +@@ -839,7 +839,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + for (int i = 0; i < pArguments.carg; i++) + { + Expr expr = prgexpr[i]; +- if (expr is ExprNamedArgumentSpecification named && named.Name == pName) ++ if (expr is ExprNamedArgumentSpecification && ((ExprNamedArgumentSpecification)expr).Name == pName) + { + return expr; + } +@@ -861,7 +861,8 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + HashSet names = new HashSet(); + for (int i = 0; i < _pArguments.carg; i++) + { +- if (!(_pArguments.prgexpr[i] is ExprNamedArgumentSpecification named)) ++ ExprNamedArgumentSpecification named; ++ if (!(_pArguments.prgexpr[i] is ExprNamedArgumentSpecification)) + { + if (!currentPosition.IsEmpty()) + { +@@ -869,6 +870,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + } + continue; + } ++ named = (ExprNamedArgumentSpecification) _pArguments.prgexpr[i]; + + Name name = named.Name; + if (!methprop.ParameterNames.Contains(name)) +@@ -1080,8 +1082,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Expr pArgument = _pArguments.prgexpr[ivar]; + + // If we have a named argument, strip it to do the conversion. +- if (pArgument is ExprNamedArgumentSpecification named) ++ if (pArgument is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)pArgument; + pArgument = named.Value; + } + +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs +index f1a0159e53..fdbd1dd426 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs +@@ -172,8 +172,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + VSFAIL("Bad type symbol kind"); + break; + case TypeKind.TK_MethodGroupType: +- if (_exprSrc is ExprMemberGroup memGrp) ++ if (_exprSrc is ExprMemberGroup) + { ++ ExprMemberGroup memGrp = (ExprMemberGroup)_exprSrc; + ExprCall outExpr; + bool retVal = _binder.BindGrpConversion(memGrp, _typeDest, _needsExprDest, out outExpr, false); + _exprDest = outExpr; +@@ -744,10 +745,10 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // * A constant-expression of type long can be converted to type ulong, provided the value of + // the constant-expression is not negative. + // Note: Don't use GetConst here since the conversion only applies to bona-fide compile time constants. +- if (_exprSrc is ExprConstant constant && _exprSrc.IsOK && ++ if (_exprSrc is ExprConstant && _exprSrc.IsOK && + ((ptSrc == PredefinedType.PT_INT && ptDest != PredefinedType.PT_BOOL && ptDest != PredefinedType.PT_CHAR) || + (ptSrc == PredefinedType.PT_LONG && ptDest == PredefinedType.PT_ULONG)) && +- isConstantInRange(constant, _typeDest)) ++ isConstantInRange(((ExprConstant)_exprSrc), _typeDest)) + { + // Special case (CLR 6.1.6): if integral constant is in range, the conversion is a legal implicit conversion. + convertKind = ConvKind.Implicit; +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs +index 589b9c96d0..2559ca5c85 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs +@@ -1064,10 +1064,11 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // SPEC: yields a single method with return CType U then a lower-bound + // SPEC: inference is made from U to Tb. + +- if (!(pSource is ExprMemberGroup memGrp)) ++ if (!(pSource is ExprMemberGroup)) + { + return false; + } ++ ExprMemberGroup memGrp = (ExprMemberGroup)pSource; + pType = pType.GetDelegateTypeOfPossibleExpression(); + if (!pType.isDelegateType()) + { +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs +index 19dbea7e2f..1d258f2d67 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs +@@ -29,8 +29,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + { + Debug.Assert(expr != null); + +- if (expr is ExprCall pCall && pCall.MemberGroup.OptionalObject == null) ++ if (expr is ExprCall && ((ExprCall)expr).MemberGroup.OptionalObject == null) + { ++ ExprCall pCall = (ExprCall)expr; + MethodSymbol meth = pCall.MethWithInst.Meth(); + if (meth != null && meth.IsNullableConstructor()) + { +@@ -45,7 +46,8 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + public static Expr StripNullableConstructor(Expr pExpr) + { +- while (IsNullableConstructor(pExpr, out ExprCall call)) ++ ExprCall call; ++ while (IsNullableConstructor(pExpr, out call)) + { + pExpr = call.OptionalArguments; + Debug.Assert(pExpr != null && !(pExpr is ExprList)); +@@ -60,7 +62,8 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Debug.Assert(exprSrc != null && exprSrc.Type.IsNullableType()); + + // For new T?(x), the answer is x. +- if (IsNullableConstructor(exprSrc, out ExprCall call)) ++ ExprCall call; ++ if (IsNullableConstructor(exprSrc, out call)) + { + var args = call.OptionalArguments; + Debug.Assert(args != null && !(args is ExprList)); +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs +index 96ee032422..9397543de6 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs +@@ -83,8 +83,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + _pList = null; + _pCurrent = null; + } +- else if (pExpr is ExprList pList) ++ else if (pExpr is ExprList) + { ++ ExprList pList = (ExprList)pExpr; + _pList = pList; + _pCurrent = pList.OptionalElement; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs +index e2ce8e88f5..ded4d0b216 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs +@@ -21,8 +21,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return pResult; + } + +- if (pExpr is ExprStatement statement) ++ if (pExpr is ExprStatement) + { ++ ExprStatement statement = (ExprStatement)pExpr; + return CacheExprMapping(pExpr, DispatchStatementList(statement)); + } + +@@ -279,11 +280,13 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return; + } + +- if (!(nextNode is ExprList next)) ++ ExprList next; ++ if (!(nextNode is ExprList)) + { + list.OptionalNextListNode = Visit(nextNode); + return; + } ++ next = (ExprList)nextNode; + + list = next; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs +index 8a841ee5d9..cb40a59f6d 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs +@@ -54,8 +54,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // For assignments, we either have a member assignment or an indexed assignment. + //Debug.Assert(assignment.GetLHS().isPROP() || assignment.GetLHS().isFIELD() || assignment.GetLHS().isARRAYINDEX() || assignment.GetLHS().isLOCAL()); + Expr lhs; +- if (assignment.LHS is ExprProperty prop) ++ if (assignment.LHS is ExprProperty) + { ++ ExprProperty prop = (ExprProperty)assignment.LHS; + if (prop.OptionalArguments== null) + { + // Regular property. +@@ -318,8 +319,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // can handle in the general case all implicit boxing conversions. Right now it + // requires that all arguments to a call that need to be boxed be explicitly boxed. + +- if (pObject != null && pObject is ExprCast cast && cast.IsBoxingCast) ++ if (pObject != null && pObject is ExprCast && ((ExprCast)pObject).IsBoxingCast) + { ++ ExprCast cast = (ExprCast) pObject; + pObject = cast.Argument; + } + pObject = Visit(pObject); +@@ -597,8 +599,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + if (udcall != null) + { + Debug.Assert(udcall.Kind == ExpressionKind.Call || udcall.Kind == ExpressionKind.UserLogicalOp); +- if (udcall is ExprCall ascall) ++ if (udcall is ExprCall) + { ++ ExprCall ascall = (ExprCall)udcall; + ExprList args = (ExprList)ascall.OptionalArguments; + Debug.Assert(args.OptionalNextListNode.Kind != ExpressionKind.List); + p1 = args.OptionalElement; +@@ -731,8 +734,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + ExprBlock body = anonmeth.OptionalBody; + + // The most likely case: +- if (body.OptionalStatements is ExprReturn ret) ++ if (body.OptionalStatements is ExprReturn) + { ++ ExprReturn ret = (ExprReturn)body.OptionalStatements; + Debug.Assert(ret.OptionalObject != null); + return Visit(ret.OptionalObject); + } +@@ -854,8 +858,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Expr pUDConversion = call?.PConversions; + if (pUDConversion != null) + { +- if (pUDConversion is ExprCall convCall) ++ if (pUDConversion is ExprCall) + { ++ ExprCall convCall = (ExprCall)pUDConversion; + Expr pUDConversionArgument = convCall.OptionalArguments; + if (IsNullableValueAccess(pUDConversionArgument, pArgument)) + { +@@ -1238,23 +1243,25 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + private bool IsNullableValueAccess(Expr pExpr, Expr pObject) + { + Debug.Assert(pExpr != null); +- return pExpr is ExprProperty prop && prop.MemberGroup.OptionalObject == pObject && pObject.Type.IsNullableType(); ++ return pExpr is ExprProperty && ((ExprProperty)pExpr).MemberGroup.OptionalObject == pObject && pObject.Type.IsNullableType(); + } + + private bool IsDelegateConstructorCall(Expr pExpr) + { + Debug.Assert(pExpr != null); +- if (!(pExpr is ExprCall pCall)) ++ ExprCall pCall; ++ if (!(pExpr is ExprCall)) + { + return false; + } ++ pCall = (ExprCall)pExpr; + + return pCall.MethWithInst.Meth() != null && + pCall.MethWithInst.Meth().IsConstructor() && + pCall.Type.isDelegateType() && + pCall.OptionalArguments != null && +- pCall.OptionalArguments is ExprList list && +- list.OptionalNextListNode.Kind == ExpressionKind.FunctionPointer; ++ (pCall.OptionalArguments is ExprList) && ++ ((ExprList)pCall.OptionalArguments).OptionalNextListNode.Kind == ExpressionKind.FunctionPointer; + } + private static bool isEnumToDecimalConversion(CType argtype, CType desttype) + { +diff --git a/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs b/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs +index 4eb817c0af..671636f428 100644 +--- a/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs ++++ b/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs +@@ -352,7 +352,10 @@ namespace System.Collections.Generic + throw new PlatformNotSupportedException(); + } + +- protected override void OnDeserialization(Object sender) => throw new PlatformNotSupportedException(); ++ protected override void OnDeserialization(Object sender) ++ { ++ throw new PlatformNotSupportedException(); ++ } + } + } + } +diff --git a/src/System.Linq.Expressions/src/System/Dynamic/Utils/TypeExtensions.cs b/src/System.Linq.Expressions/src/System/Dynamic/Utils/TypeExtensions.cs +index c45caba093..ef9a25203d 100644 +--- a/src/System.Linq.Expressions/src/System/Dynamic/Utils/TypeExtensions.cs ++++ b/src/System.Linq.Expressions/src/System/Dynamic/Utils/TypeExtensions.cs +@@ -65,7 +65,8 @@ namespace System.Dynamic.Utils + internal static ParameterInfo[] GetParametersCached(this MethodBase method) + { + CacheDict pic = s_paramInfoCache; +- if (!pic.TryGetValue(method, out ParameterInfo[] pis)) ++ ParameterInfo[] pis; ++ if (!pic.TryGetValue(method, out pis)) + { + pis = method.GetParameters(); + +diff --git a/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs b/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs +index d8b1c61f74..8cefbd4f19 100644 +--- a/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs ++++ b/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs +@@ -952,8 +952,9 @@ namespace System.Linq.Expressions.Compiler + private void EmitMemberAssignment(MemberAssignment binding, Type objectType) + { + EmitExpression(binding.Expression); +- if (binding.Member is FieldInfo fi) ++ if (binding.Member is FieldInfo) + { ++ FieldInfo fi = (FieldInfo)binding.Member; + _ilg.Emit(OpCodes.Stfld, fi); + } + else +@@ -1097,7 +1098,7 @@ namespace System.Linq.Expressions.Compiler + private static Type GetMemberType(MemberInfo member) + { + Debug.Assert(member is FieldInfo || member is PropertyInfo); +- return member is FieldInfo fi ? fi.FieldType : (member as PropertyInfo).PropertyType; ++ return member is FieldInfo ? ((FieldInfo)member).FieldType : (member as PropertyInfo).PropertyType; + } + + #endregion +diff --git a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberAssignment.cs b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberAssignment.cs +index 475a6c63cc..0787b10186 100644 +--- a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberAssignment.cs ++++ b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberAssignment.cs +@@ -93,23 +93,23 @@ namespace System.Linq.Expressions + + // Null paramName as there are two paths here with different parameter names at the API + TypeUtils.ValidateType(decType, null); +- switch (member) ++ if (member is PropertyInfo) + { +- case PropertyInfo pi: +- if (!pi.CanWrite) +- { +- throw Error.PropertyDoesNotHaveSetter(pi, nameof(member)); +- } +- +- memberType = pi.PropertyType; +- break; +- +- case FieldInfo fi: +- memberType = fi.FieldType; +- break; +- +- default: +- throw Error.ArgumentMustBeFieldInfoOrPropertyInfo(nameof(member)); ++ PropertyInfo pi = (PropertyInfo) member; ++ if (!pi.CanWrite) ++ { ++ throw Error.PropertyDoesNotHaveSetter(pi, nameof(member)); ++ } ++ memberType = pi.PropertyType; ++ } ++ else if (member is FieldInfo) ++ { ++ FieldInfo fi = (FieldInfo) member; ++ memberType = fi.FieldType; ++ } ++ else ++ { ++ throw Error.ArgumentMustBeFieldInfoOrPropertyInfo(nameof(member)); + } + } + } +diff --git a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberBinding.cs b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberBinding.cs +index c1c5884618..43c0698f90 100644 +--- a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberBinding.cs ++++ b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberBinding.cs +@@ -61,6 +61,9 @@ namespace System.Linq.Expressions + return ExpressionStringBuilder.MemberBindingToString(this); + } + +- internal virtual void ValidateAsDefinedHere(int index) => throw Error.UnknownBindingType(index); ++ internal virtual void ValidateAsDefinedHere(int index) ++ { ++ throw Error.UnknownBindingType(index); ++ } + } + } +diff --git a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberMemberBinding.cs b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberMemberBinding.cs +index f3981a2b1f..75dd7141da 100644 +--- a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberMemberBinding.cs ++++ b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberMemberBinding.cs +@@ -127,23 +127,24 @@ namespace System.Linq.Expressions + + // Null paramName as there are several paths here with different parameter names at the API + TypeUtils.ValidateType(decType, null, allowByRef: true, allowPointer: true); +- switch (member) ++ if (member is PropertyInfo) + { +- case PropertyInfo pi: +- if (!pi.CanRead) +- { +- throw Error.PropertyDoesNotHaveGetter(pi, nameof(member)); +- } +- +- memberType = pi.PropertyType; +- break; +- +- case FieldInfo fi: +- memberType = fi.FieldType; +- break; ++ PropertyInfo pi = (PropertyInfo)member; ++ if (!pi.CanRead) ++ { ++ throw Error.PropertyDoesNotHaveGetter(pi, nameof(member)); ++ } + +- default: +- throw Error.ArgumentMustBeFieldInfoOrPropertyInfo(nameof(member)); ++ memberType = pi.PropertyType; ++ } ++ else if (member is FieldInfo) ++ { ++ FieldInfo fi = (FieldInfo)member; ++ memberType = fi.FieldType; ++ } ++ else ++ { ++ throw Error.ArgumentMustBeFieldInfoOrPropertyInfo(nameof(member)); + } + } + +diff --git a/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs b/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs +index 5321578946..ff54677027 100644 +--- a/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs ++++ b/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs +@@ -94,8 +94,9 @@ namespace System.Net.WebSockets + if (!(user is WindowsPrincipal)) + { + // AuthenticationSchemes.Basic. +- if (user.Identity is HttpListenerBasicIdentity basicIdentity) ++ if (user.Identity is HttpListenerBasicIdentity) + { ++ HttpListenerBasicIdentity basicIdentity = (HttpListenerBasicIdentity)user.Identity; + return new GenericPrincipal(new HttpListenerBasicIdentity(basicIdentity.Name, basicIdentity.Password), null); + } + } diff --git a/gnu/packages/patches/mono-5.4.0-patches.patch b/gnu/packages/patches/mono-5.4.0-patches.patch new file mode 100644 index 00000000000..007a6b847c6 --- /dev/null +++ b/gnu/packages/patches/mono-5.4.0-patches.patch @@ -0,0 +1,100 @@ +diff --git a/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs b/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs +index 3c537a7e427..59beb19255f 100644 +--- a/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs ++++ b/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs +@@ -316,7 +316,9 @@ namespace Mono.Net.Security + { + Debug ("ProcessRead - read user: {0} {1}", this, status); + +- var (ret, wantMore) = Parent.ProcessRead (UserBuffer); ++ System.ValueTuple t0 = Parent.ProcessRead (UserBuffer); ++ var ret = t0.Item1; ++ var wantMore = t0.Item2; + + Debug ("ProcessRead - read user done: {0} - {1} {2}", this, ret, wantMore); + +@@ -355,7 +357,9 @@ namespace Mono.Net.Security + return AsyncOperationStatus.Complete; + } + +- var (ret, wantMore) = Parent.ProcessWrite (UserBuffer); ++ System.ValueTuple t0 = Parent.ProcessWrite (UserBuffer); ++ var ret = t0.Item1; ++ var wantMore = t0.Item2; + + Debug ("ProcessWrite - write user done: {0} - {1} {2}", this, ret, wantMore); + +diff --git a/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs b/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs +index 2b380a1ae6c..66e45bc1f1d 100644 +--- a/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs ++++ b/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs +@@ -403,8 +403,10 @@ namespace Mono.Net.Security + asyncReadRequest != null ? "async" : "", + readBuffer != null ? readBuffer.ToString () : ""); + var asyncRequest = asyncHandshakeRequest ?? asyncReadRequest; +- var (ret, wantMore) = InternalRead (asyncRequest, readBuffer, buffer, offset, size); +- outWantMore = wantMore; ++ System.ValueTuple t0 = InternalRead (asyncRequest, readBuffer, buffer, offset, size); ++ var ret = t0.Item1; ++ var wantMore = t0.Item2; ++ outWantMore = wantMore; + return ret; + } catch (Exception ex) { + Debug ("InternalRead failed: {0}", ex); +@@ -414,7 +416,7 @@ namespace Mono.Net.Security + } + } + +- (int, bool) InternalRead (AsyncProtocolRequest asyncRequest, BufferOffsetSize internalBuffer, byte[] buffer, int offset, int size) ++ System.ValueTuple InternalRead (AsyncProtocolRequest asyncRequest, BufferOffsetSize internalBuffer, byte[] buffer, int offset, int size) + { + if (asyncRequest == null) + throw new InvalidOperationException (); +@@ -436,7 +438,7 @@ namespace Mono.Net.Security + Debug ("InternalRead #1: {0} {1} {2}", internalBuffer.Offset, internalBuffer.TotalBytes, size); + internalBuffer.Offset = internalBuffer.Size = 0; + asyncRequest.RequestRead (size); +- return (0, true); ++ return new ValueTuple(0, true); + } + + /* +@@ -451,7 +453,7 @@ namespace Mono.Net.Security + Buffer.BlockCopy (internalBuffer.Buffer, internalBuffer.Offset, buffer, offset, len); + internalBuffer.Offset += len; + internalBuffer.Size -= len; +- return (len, !internalBuffer.Complete && len < size); ++ return new ValueTuple(len, !internalBuffer.Complete && len < size); + } + + /* +@@ -620,21 +622,23 @@ namespace Mono.Net.Security + } + } + +- internal (int, bool) ProcessRead (BufferOffsetSize userBuffer) ++ internal System.ValueTuple ProcessRead (BufferOffsetSize userBuffer) + { + lock (ioLock) { + // This operates on the internal buffer and will never block. +- var ret = xobileTlsContext.Read (userBuffer.Buffer, userBuffer.Offset, userBuffer.Size, out bool wantMore); +- return (ret, wantMore); ++ bool wantMore; ++ var ret = xobileTlsContext.Read (userBuffer.Buffer, userBuffer.Offset, userBuffer.Size, out wantMore); ++ return new System.ValueTuple(ret, wantMore); + } + } + +- internal (int, bool) ProcessWrite (BufferOffsetSize userBuffer) ++ internal System.ValueTuple ProcessWrite (BufferOffsetSize userBuffer) + { + lock (ioLock) { + // This operates on the internal buffer and will never block. +- var ret = xobileTlsContext.Write (userBuffer.Buffer, userBuffer.Offset, userBuffer.Size, out bool wantMore); +- return (ret, wantMore); ++ bool wantMore; ++ var ret = xobileTlsContext.Write (userBuffer.Buffer, userBuffer.Offset, userBuffer.Size, out wantMore); ++ return new System.ValueTuple(ret, wantMore); + } + } + From patchwork Mon Dec 16 17:26:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34956 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id ACE0A27BBEA; Mon, 16 Dec 2024 17:30:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 630B827BBE2 for ; Mon, 16 Dec 2024 17:30:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEvf-0001T7-Af; Mon, 16 Dec 2024 12:30:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuE-0000QS-HS for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEuA-0001wp-I3 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=FJzf3Yu805ZxZjOLZlalAc92J1yXEvJu2+FSS76YD48=; b=r8+PO2QxgLATzI+dYc7Bo8jK2vhGf18LlzP7zxdGLt1GNkHtJ9gIq3//fW1OuXWL2dA1Cs4aUrv7luKZPGs1vVs8pautULdiE0yT9O2EAo2bK5qcZaHH1Wn+90uKhW83TShSOSzi5VSCtAMt6wdm68I7d/hb4+OZdvoBWV0slQnKU5caRPOnC9Q1IfNG/DBFIkaAeGvThDbaH4UpCBhdB5De64QvpPZ3brcjLI20Zy50zSjicZk97OZ0fixCi6WV6f8HpR41BKgFADBVfW4yNxgD4BwybxFTQax2G4sr4NkYXjTzsPABPb8gHKOyXoS/iGuu0jytJR4hnJphFXAEZQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEuA-0006MJ-7P for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:14 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 16/21] gnu: Add mono-pre-5.8.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:14 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437013824241 (code B ref 74609); Mon, 16 Dec 2024 17:29:14 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:28:58 +0000 Received: from localhost ([127.0.0.1]:55873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtp-0006IN-L6 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:57 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:56801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtg-0006HX-9w for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:49 -0500 Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-385ddcfc97bso3684874f8f.1 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370064; x=1734974864; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=FJzf3Yu805ZxZjOLZlalAc92J1yXEvJu2+FSS76YD48=; b=NDEPElQJbREjX12eaZW5Endd0pVxgCD11KGo0+U7VH3Gk1JqqKqffNahJMWNlaOvhs 5KnoaCDBi/yxzvLlsRpk/PrwQUnfsJ2zKBZ464HLth+5aI2x8DbP2Tm4kSOvCF+7Rrdx Ag/9UTE1M0B+R4r4wDs2CdNSiF3FL/U3Q6eXdqC1kiW/26xAIlEoWer3JV1kBCcBBS5D VySPW7DHKNP/2BR0Xnl3MnB2jq7jqcnPb5HkT+CPc1dFXEm/NUpf9zlkif97kQqIh+eJ FbGD6vt5r2hfSBSTd+UX5+dNUQ18BNUMqS7Eh0FVucvdRt40EY+5Ht3LLbfbjUf3zkAo 2v8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370064; x=1734974864; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FJzf3Yu805ZxZjOLZlalAc92J1yXEvJu2+FSS76YD48=; b=DFu553aNYNv2PrF2MuwhelfK5relRYiRGTLEFXS/VHSCSBQFOSAVZ4/7qRvwVU/si5 e8y8lkSZW/cKC1TB8dsj0ms4n8RKPiXSqu+8AnMmTodfznvNp7KjKO5xwCGBtXoP90nm 52VNgwTG5z3jF3Q44Yneq7PrvDXE+kZgQVPbdKCWWADgue1zjWEtGozfEKxoXiJD9/Gj s3q26gVBqqt8gaiXlf3W3TF2r1+7cCeF2AkdfISfZU/rrnSVX45SWdHxqU6XsLP/8xRG W7YVNlbRdeT4DjKGEtwfNF8zRf6ylfoddUyySMjLHFtph+UDMrKWUlLXtf0hvTRoQbv/ +Bpw== X-Gm-Message-State: AOJu0YyRprNQqWD21q6hhIkisAvMLD8mkHRAyYpkMAKLErRb094fd7Xx rtEZbVxyBa9mu3l4QdZAiykW8LwdXPPB2W6qRCNXmiz0SBApvfuYq4A9ArpR X-Gm-Gg: ASbGncsVagP6vyImav16G0dFqH/x26WrxjkzhkHuTDPvIhxSA2FFy5G3cOC375qlv5U 9u9IkzPy+QeBx1lCkmrygIg8xGzgLVRw8CrbsuGIzwNHnj4cUexHweJ7d6yRGvNl/2/R1mA7d2G NKo7XiuXbZ41Sgr0DMkpzZ6HLDdkm8a6W8VSg734KXCZ96z8N9HTSoduKcfPZIf+KWOoeOiNaCu 2ZN6U60Wz3zOpYLPJjiAOA+gLvHkl5FrjYwHaqQOzxd0Z1GpbUWsOnE1CVL6w== X-Google-Smtp-Source: AGHT+IFLjs1Sst3K48TSGDE7Z3/S98glYPxjA+GotnPAHRDmoPvXG0agPnxQVsCSmUVmGKd6y1P4BQ== X-Received: by 2002:a05:6000:4615:b0:386:2ebe:7ac3 with SMTP id ffacd0b85a97d-3889ad37d13mr11206367f8f.56.1734370063138; Mon, 16 Dec 2024 09:27:43 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c801211dsm8688480f8f.17.2024.12.16.09.27.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:42 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:39 +0200 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-pre-5.8.0-external-repo-specs, mono-pre-5.8.0): New variable. * gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patch. Change-Id: Id573b051e01980867a07032f339fdb2829b2a413 --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 79 + .../corefx-mono-pre-5.8.0-patches.patch | 1349 +++++++++++++++++ 3 files changed, 1429 insertions(+) create mode 100644 gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch diff --git a/gnu/local.mk b/gnu/local.mk index aa129d89d58..788f3bb835a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1115,6 +1115,7 @@ dist_patch_DATA = \ %D%/packages/patches/cool-retro-term-wctype.patch \ %D%/packages/patches/coq-autosubst-1.8-remove-deprecated-files.patch \ %D%/packages/patches/corefx-mono-5.4.0-patches.patch \ + %D%/packages/patches/corefx-mono-pre-5.8.0-patches.patch \ %D%/packages/patches/coreutils-gnulib-tests.patch \ %D%/packages/patches/cppcheck-disable-char-signedness-test.patch \ %D%/packages/patches/cppdap-add-CPPDAP_USE_EXTERNAL_GTEST_PACKAGE.patch\ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index b4355b048e2..7799f9b951a 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1196,3 +1196,82 @@ (define-public mono-5.4.0 "mono-5.4.0-patches.patch")))) (native-inputs (modify-inputs (package-native-inputs mono-5.2.0) (replace "mono" mono-5.2.0))))) + +(define mono-pre-5.8.0-external-repo-specs + '(("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791" + "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj" + #:recursive? #t) + ("api-snapshot" "e790a9b77031ef1d8ebf093ef88840edea11ed73" + "1c4np2fqd9mpc1i1x8bsxnypacp58vkvgdwpnmvmlyjdvbj5ax6q") + ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + (("reference-assemblies" "binary-reference-assemblies") + "142cbeb62ffabf1dd9c1414d8dd76f93bcbed0c2" + "1wkd589hgb16m5zvmp9yb57agyyryaa1jj8vhl4w20i2hp22wad9") + ("bockbuild" "b445017309aac741a26d8c51bb0636234084bf23" + "1jzhvavd1j0n7sy1waczgjv0kmrbr35gkzd76fhlmqvsy0sr9695") + ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff" + "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y") + ("cecil" "c76ba7b410447fa37093150cb7bc772cba28a0ae" + "0ydi7rn8ajqyvnj9agyn74llb4qgd9kgdcg3gajdfyb2klxx6za8") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "74ccd8aa00d7d271191ca3b9c4f818268dc36c28" + "0nm41qdpvj62r8bxnf92m7kimjm1i544ygdqz5a7pgc6zf99as6j" + #:patches ("corefx-mono-pre-5.8.0-patches.patch")) + ("corert" "48dba73801e804e89f00311da99d873f9c550278" + "1zw47jf4cwqmaixylisxi73xf6cap41bwf9vlmpxanzxaqklzsvk") + ("ikdasm" "3aef9cdd6013fc0620a1817f0b11d8fb90ed2e0f" + "078cai33x8c71969iwi7hmbqdfwpicpmam2ag3k2bklpva2vnszv") + (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1" + "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi") + ("linker" "21e445c26c69ac3a2e1441befa02d0bd105ff849" + "1hx3ik0sg70ysc2y8jdjxm2ljql0069i05i8fp1lakx7s7z7bywc") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "8d307472ea214f2b59636431f771894dbcba7258" + "1h1frnj0x8k7b29ic4jisch0vlpmsmghjw554pz277f2nxaidljj") + (("NUnitLite" "nunit-lite") "690603bea98aae69fca9a65130d88591bc6cabee" + "1f845ysjzs3yd9gcyww66dnkx484z5fknb8l0xz74sjmxk2mngwc") + ;; ("roslyn-binaries" "80b86f340b7f6fb7afe84443214e1cbd7ff70620" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv") + ;; ("xunit-binaries" "d4433b0972f40cb3efaa3fbba52869bde5df8fa8" + ;; "") + )) + +(define-public mono-pre-5.8.0 + (let ((commit "d0f51b4e834042cfa593748ada942033b458cc40") + (version "5.4.0.201") + (revision "0")) + (package + (inherit mono-5.4.0) + (version (git-version version revision commit)) + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0az5syk1nn9gd5imkbmpb13qm9q6ibr2d2ksdzpwsarkfyp4ic53")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-pre-5.8.0-external-repo-specs) + #$@prepare-mono-source-0)) + (patches + (search-patches "mono-5.4.0-patches.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-5.4.0) + (replace "mono" mono-5.4.0))) + (arguments + (substitute-keyword-arguments (package-arguments mono-5.4.0) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (delete 'patch-sub-autogen.sh-shebang)))))))) diff --git a/gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch b/gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch new file mode 100644 index 00000000000..04dcc6c5a50 --- /dev/null +++ b/gnu/packages/patches/corefx-mono-pre-5.8.0-patches.patch @@ -0,0 +1,1349 @@ +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs +index aa8afa5a1b..3a2518246a 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ExpressionTreeCallRewriter.cs +@@ -246,8 +246,9 @@ namespace Microsoft.CSharp.RuntimeBinder + ExprArrayInit arrinit; + + ExprList list = (ExprList)pExpr.OptionalArguments; +- if (list.OptionalNextListNode is ExprList next) ++ if (list.OptionalNextListNode is ExprList) + { ++ ExprList next = (ExprList)list.OptionalNextListNode; + methinfo = (ExprMethodInfo)next.OptionalElement; + arrinit = (ExprArrayInit)next.OptionalNextListNode; + } +@@ -382,8 +383,9 @@ namespace Microsoft.CSharp.RuntimeBinder + Expr nextNode = list.OptionalNextListNode; + ExprPropertyInfo propinfo; + ExprArrayInit arguments; +- if (nextNode is ExprList nextList) ++ if (nextNode is ExprList) + { ++ ExprList nextList = (ExprList)list.OptionalNextListNode; + propinfo = nextList.OptionalElement as ExprPropertyInfo; + arguments = nextList.OptionalNextListNode as ExprArrayInit; + } +@@ -553,8 +555,9 @@ namespace Microsoft.CSharp.RuntimeBinder + list = (ExprList)list.OptionalNextListNode; + MethodInfo methodInfo; + bool bIsLifted = false; +- if (list.OptionalNextListNode is ExprList next) ++ if (list.OptionalNextListNode is ExprList) + { ++ ExprList next = (ExprList)list.OptionalNextListNode; + ExprConstant isLifted = (ExprConstant)next.OptionalElement; + Debug.Assert(isLifted != null); + bIsLifted = isLifted.Val.Int32Val == 1; +@@ -677,8 +680,9 @@ namespace Microsoft.CSharp.RuntimeBinder + + private Expression GetExpression(Expr pExpr) + { +- if (pExpr is ExprWrap wrap) ++ if (pExpr is ExprWrap) + { ++ ExprWrap wrap = (ExprWrap) pExpr; + return _DictionaryOfParameters[(ExprCall)wrap.OptionalExpression]; + } + else if (pExpr is ExprConstant) +@@ -875,20 +879,24 @@ namespace Microsoft.CSharp.RuntimeBinder + { + for (;;) + { +- if (pExpr is ExprCast cast) ++ if (pExpr is ExprCast) + { ++ ExprCast cast = (ExprCast) pExpr; + pExpr = cast.Argument; + } +- else if (pExpr is ExprTypeOf typeOf) ++ else if (pExpr is ExprTypeOf) + { ++ ExprTypeOf typeOf = (ExprTypeOf) pExpr; + return typeOf.SourceType.Type.AssociatedSystemType; + } +- else if (pExpr is ExprMethodInfo methodInfo) ++ else if (pExpr is ExprMethodInfo) + { ++ ExprMethodInfo methodInfo = (ExprMethodInfo) pExpr; + return GetMethodInfoFromExpr(methodInfo); + } +- else if (pExpr is ExprConstant constant) ++ else if (pExpr is ExprConstant) + { ++ ExprConstant constant = (ExprConstant) pExpr; + ConstVal val = constant.Val; + CType underlyingType = pExpr.Type; + object objval; +@@ -954,8 +962,9 @@ namespace Microsoft.CSharp.RuntimeBinder + + return pExpr.Type.isEnumType() ? Enum.ToObject(pExpr.Type.AssociatedSystemType, objval) : objval; + } +- else if (pExpr is ExprZeroInit zeroInit) ++ else if (pExpr is ExprZeroInit) + { ++ ExprZeroInit zeroInit = (ExprZeroInit) pExpr; + if ((pExpr = zeroInit.OptionalArgument) == null) + { + return Activator.CreateInstance(zeroInit.Type.AssociatedSystemType); +@@ -981,8 +990,9 @@ namespace Microsoft.CSharp.RuntimeBinder + Expr p = list; + while (list != null) + { +- if (list is ExprList pList) ++ if (list is ExprList) + { ++ ExprList pList = (ExprList) list; + p = pList.OptionalElement; + list = pList.OptionalNextListNode; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs +index a623bfc0bf..4a742156b9 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/RuntimeBinder.cs +@@ -189,7 +189,8 @@ namespace Microsoft.CSharp.RuntimeBinder + LocalVariableSymbol[] locals = PopulateLocalScope(payload, pScope, arguments, parameters); + + // (1.5) - Check to see if we need to defer. +- if (DeferBinding(payload, arguments, args, locals, out DynamicMetaObject o)) ++ DynamicMetaObject o; ++ if (DeferBinding(payload, arguments, args, locals, out o)) + { + deferredBinding = o; + return null; +@@ -1030,8 +1031,9 @@ namespace Microsoft.CSharp.RuntimeBinder + + private static void CheckForConditionalMethodError(Expr pExpr) + { +- if (pExpr is ExprCall call) ++ if (pExpr is ExprCall) + { ++ ExprCall call = (ExprCall)pExpr; + // This mimics the behavior of the native CompilerSymbolLoader in GetConditionalSymbols. Override + // methods cannot have the conditional attribute, but implicitly acquire it from their slot. + +@@ -1064,8 +1066,9 @@ namespace Microsoft.CSharp.RuntimeBinder + ExprMemberGroup memgroup; + TypeArray typeArgs; + +- if (pResult is ExprCall call) ++ if (pResult is ExprCall) + { ++ ExprCall call = (ExprCall) pResult; + type = call.MethWithInst.Ats; + methprop = call.MethWithInst.Meth(); + memgroup = call.MemberGroup; +@@ -1132,12 +1135,15 @@ namespace Microsoft.CSharp.RuntimeBinder + + private Expr StripNamedArgument(Expr pArg) + { +- if (pArg is ExprNamedArgumentSpecification named) ++ if (pArg is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = ++ (ExprNamedArgumentSpecification) pArg; + pArg = named.Value; + } +- else if (pArg is ExprArrayInit init) ++ else if (pArg is ExprArrayInit) + { ++ ExprArrayInit init = (ExprArrayInit) pArg; + init.OptionalArguments = StripNamedArguments(init.OptionalArguments); + } + +@@ -1146,14 +1152,16 @@ namespace Microsoft.CSharp.RuntimeBinder + + private Expr StripNamedArguments(Expr pArg) + { +- if (pArg is ExprList list) ++ if (pArg is ExprList) + { ++ ExprList list = (ExprList) pArg; + for(;;) + { + list.OptionalElement = StripNamedArgument(list.OptionalElement); + +- if (list.OptionalNextListNode is ExprList next) ++ if (list.OptionalNextListNode is ExprList) + { ++ ExprList next = (ExprList)list.OptionalNextListNode; + list = next; + } + else +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs +index cebfcd94e1..179ac21620 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/Better.cs +@@ -157,8 +157,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // We then go over the specified arguments and put the type for any named argument in the right position in the array. + for (int iParam = 0; iParam < args.carg; iParam++) + { +- if (prgexpr[iParam] is ExprNamedArgumentSpecification named) ++ if (prgexpr[iParam] is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)prgexpr[iParam]; + // We find the index of the type of the argument in the method parameter list and store that in a temp + int index = FindName(methProp.ParameterNames, named.Name); + CType tempType = pta[index]; +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs +index c406af43de..0ea81ef21c 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Binding/ErrorReporting.cs +@@ -76,22 +76,25 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + { + Debug.Assert(expr != null); + +- if (expr is ExprLocal local && local.IsOK) ++ if (expr is ExprLocal && ((ExprLocal)expr).IsOK) + { ++ ExprLocal local = (ExprLocal)expr; + ReportLocalError(local.Local, kind, isNested); + return true; + } + + Expr pObject = null; + +- if (expr is ExprProperty prop) ++ if (expr is ExprProperty) + { ++ ExprProperty prop = (ExprProperty)expr; + // We've already reported read-only-property errors. + Debug.Assert(prop.MethWithTypeSet != null); + pObject = prop.MemberGroup.OptionalObject; + } +- else if (expr is ExprField field) ++ else if (expr is ExprField) + { ++ ExprField field = (ExprField)expr; + if (field.FieldWithType.Field().isReadOnly) + { + ReportReadOnlyError(field, kind, isNested); +@@ -105,8 +108,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + if (pObject != null && pObject.Type.isStructOrEnum()) + { +- if (pObject is IExprWithArgs withArgs) ++ if (pObject is IExprWithArgs) + { ++ IExprWithArgs withArgs = (IExprWithArgs)pObject; + // assigning to RHS of method or property getter returning a value-type on the stack or + // passing RHS of method or property getter returning a value-type on the stack, as ref or out + ErrorContext.Error(ErrorCode.ERR_ReturnNotLValue, withArgs.GetSymWithType()); +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs +index 2756538770..99adf488b3 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversion.cs +@@ -382,9 +382,10 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + FUNDTYPE ftSrc = expr.Type.fundType(); + FUNDTYPE ftDest = dest.fundType(); + +- if (expr is ExprConstant constant && constant.IsOK && ++ if (expr is ExprConstant && ((ExprConstant)expr).IsOK && + expr.Type.isSimpleType() && dest.isSimpleType()) + { ++ ExprConstant constant = (ExprConstant) expr; + if ((ftSrc == FUNDTYPE.FT_I4 && (ftDest <= FUNDTYPE.FT_LASTNONLONG || ftDest == FUNDTYPE.FT_U8)) || + (ftSrc == FUNDTYPE.FT_I8 && ftDest == FUNDTYPE.FT_U8)) + { +@@ -412,8 +413,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + ErrorContext.Error(dest is TypeParameterType ? ErrorCode.ERR_TypeVarCantBeNull : ErrorCode.ERR_ValueCantBeNull, dest); + } + +- else if (expr is ExprMemberGroup memGrp) ++ else if (expr is ExprMemberGroup) + { ++ ExprMemberGroup memGrp = (ExprMemberGroup) expr; + BindGrpConversion(memGrp, dest, true); + } + else if (canCast(expr.Type, dest, flags)) +@@ -546,8 +548,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + { + ErrorContext.Error(ErrorCode.ERR_ValueCantBeNull, dest); + } +- else if (expr is ExprMemberGroup memGrp) ++ else if (expr is ExprMemberGroup) + { ++ ExprMemberGroup memGrp = (ExprMemberGroup)expr; + BindGrpConversion(memGrp, dest, true); + } + else +@@ -1387,8 +1390,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + for (;;) + { + Debug.Assert(pExpr != null); +- if (pExpr is ExprCall call) ++ if (pExpr is ExprCall) + { ++ ExprCall call = (ExprCall)pExpr; + switch (call.NullableCallLiftKind) + { + case NullableCallLiftKind.NotLifted: +@@ -1402,8 +1406,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + continue; + } + } +- else if (pExpr is ExprUserDefinedConversion udc) ++ else if (pExpr is ExprUserDefinedConversion) + { ++ ExprUserDefinedConversion udc = (ExprUserDefinedConversion)pExpr; + pExpr = udc.UserDefinedCall; + continue; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs +index 075ed23a11..6408df4c36 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/EXPRExtensions.cs +@@ -33,8 +33,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Expr exprCur = expr; + while (exprCur != null) + { +- if (exprCur is ExprList list) ++ if (exprCur is ExprList) + { ++ ExprList list = (ExprList)exprCur; + yield return list.OptionalElement; + exprCur = list.OptionalNextListNode; + } +@@ -61,12 +62,12 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + } + public static bool isNull(this Expr expr) + { +- return expr is ExprConstant constant && constant.IsOK && (expr.Type.fundType() == FUNDTYPE.FT_REF) && constant.Val.IsNullRef; ++ return expr is ExprConstant && ((ExprConstant)expr).IsOK && (expr.Type.fundType() == FUNDTYPE.FT_REF) && ((ExprConstant)expr).Val.IsNullRef; + } + + public static bool IsZero(this Expr expr) + { +- return expr is ExprConstant constant && constant.IsOK && constant.IsZero; ++ return expr is ExprConstant && ((ExprConstant)expr).IsOK && ((ExprConstant)expr).IsZero; + } + + private static Expr GetSeqVal(this Expr expr) +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs +index b55cf07078..9afeaac622 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs +@@ -207,8 +207,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + VSFAIL("BindExplicitConversion failed unexpectedly"); + return false; + } +- if (_exprDest is ExprUserDefinedConversion udc) ++ if (_exprDest is ExprUserDefinedConversion) + { ++ ExprUserDefinedConversion udc = (ExprUserDefinedConversion)_exprDest; + udc.Argument = _exprSrc; + } + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs +index 159f157f43..4a0e3cb479 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExprFactory.cs +@@ -17,33 +17,33 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Debug.Assert(globalSymbolContext != null); + _globalSymbolContext = globalSymbolContext; + } +- private TypeManager Types => _globalSymbolContext.GetTypes(); ++ private TypeManager Types { get { return _globalSymbolContext.GetTypes(); } } + +- private BSYMMGR GlobalSymbols => _globalSymbolContext.GetGlobalSymbols(); ++ private BSYMMGR GlobalSymbols { get { return _globalSymbolContext.GetGlobalSymbols(); } } + +- public ExprCall CreateCall(EXPRFLAG flags, CType type, Expr arguments, ExprMemberGroup memberGroup, MethWithInst method) => +- new ExprCall(type, flags, arguments, memberGroup, method); ++ public ExprCall CreateCall(EXPRFLAG flags, CType type, Expr arguments, ExprMemberGroup memberGroup, MethWithInst method) ++ { return new ExprCall(type, flags, arguments, memberGroup, method); } + +- public ExprField CreateField(CType type, Expr optionalObject, FieldWithType field, bool isLValue) => +- new ExprField(type, optionalObject, field, isLValue); ++ public ExprField CreateField(CType type, Expr optionalObject, FieldWithType field, bool isLValue) ++ { return new ExprField(type, optionalObject, field, isLValue); } + +- public ExprFuncPtr CreateFunctionPointer(EXPRFLAG flags, CType type, Expr obj, MethWithInst method) => +- new ExprFuncPtr(type, flags, obj, method); ++ public ExprFuncPtr CreateFunctionPointer(EXPRFLAG flags, CType type, Expr obj, MethWithInst method) ++ { return new ExprFuncPtr(type, flags, obj, method); } + +- public ExprArrayInit CreateArrayInit(CType type, Expr arguments, Expr argumentDimensions, int[] dimSizes, int dimSize) => +- new ExprArrayInit(type, arguments, argumentDimensions, dimSizes, dimSize); ++ public ExprArrayInit CreateArrayInit(CType type, Expr arguments, Expr argumentDimensions, int[] dimSizes, int dimSize) ++ { return new ExprArrayInit(type, arguments, argumentDimensions, dimSizes, dimSize); } + +- public ExprProperty CreateProperty(CType type, Expr optionalObject) => +- CreateProperty(type, null, null, CreateMemGroup(optionalObject, new MethPropWithInst()), null, null); ++ public ExprProperty CreateProperty(CType type, Expr optionalObject) ++ { return CreateProperty(type, null, null, CreateMemGroup(optionalObject, new MethPropWithInst()), null, null); } + +- public ExprProperty CreateProperty(CType type, Expr optionalObjectThrough, Expr arguments, ExprMemberGroup memberGroup, PropWithType property, MethWithType setMethod) => +- new ExprProperty(type, optionalObjectThrough, arguments, memberGroup, property, setMethod); ++ public ExprProperty CreateProperty(CType type, Expr optionalObjectThrough, Expr arguments, ExprMemberGroup memberGroup, PropWithType property, MethWithType setMethod) ++ { return new ExprProperty(type, optionalObjectThrough, arguments, memberGroup, property, setMethod); } + +- public ExprEvent CreateEvent(CType type, Expr optionalObject, EventWithType eventWithType) => +- new ExprEvent(type, optionalObject, eventWithType); ++ public ExprEvent CreateEvent(CType type, Expr optionalObject, EventWithType eventWithType) ++ { return new ExprEvent(type, optionalObject, eventWithType); } + +- public ExprMemberGroup CreateMemGroup(EXPRFLAG flags, Name name, TypeArray typeArgs, SYMKIND symKind, CType parentType, MethodOrPropertySymbol memberSymbol, Expr obj, CMemberLookupResults memberLookupResults) => +- new ExprMemberGroup(Types.GetMethGrpType(), flags, name, typeArgs, symKind, parentType, memberSymbol, obj, memberLookupResults); ++ public ExprMemberGroup CreateMemGroup(EXPRFLAG flags, Name name, TypeArray typeArgs, SYMKIND symKind, CType parentType, MethodOrPropertySymbol memberSymbol, Expr obj, CMemberLookupResults memberLookupResults) ++ { return new ExprMemberGroup(Types.GetMethGrpType(), flags, name, typeArgs, symKind, parentType, memberSymbol, obj, memberLookupResults); } + + public ExprMemberGroup CreateMemGroup(Expr obj, MethPropWithInst method) + { +@@ -57,25 +57,25 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + obj, new CMemberLookupResults(GlobalSymbols.AllocParams(1, new[] {type}), name)); + } + +- public ExprUserDefinedConversion CreateUserDefinedConversion(Expr arg, Expr call, MethWithInst method) => +- new ExprUserDefinedConversion(arg, call, method); ++ public ExprUserDefinedConversion CreateUserDefinedConversion(Expr arg, Expr call, MethWithInst method) ++ { return new ExprUserDefinedConversion(arg, call, method); } + + public ExprCast CreateCast(CType type, Expr argument) => CreateCast(0, CreateClass(type), argument); + +- public ExprCast CreateCast(EXPRFLAG flags, ExprClass type, Expr argument) => new ExprCast(flags, type, argument); ++ public ExprCast CreateCast(EXPRFLAG flags, ExprClass type, Expr argument) { return new ExprCast(flags, type, argument); } + +- public ExprReturn CreateReturn(Expr optionalObject) => new ExprReturn(optionalObject); ++ public ExprReturn CreateReturn(Expr optionalObject) { return new ExprReturn(optionalObject); } + +- public ExprLocal CreateLocal(LocalVariableSymbol local) => new ExprLocal(local); ++ public ExprLocal CreateLocal(LocalVariableSymbol local) { return new ExprLocal(local); } + +- public ExprBoundLambda CreateAnonymousMethod(AggregateType delegateType, Scope argumentScope) => +- new ExprBoundLambda(delegateType, argumentScope); ++ public ExprBoundLambda CreateAnonymousMethod(AggregateType delegateType, Scope argumentScope) ++ { return new ExprBoundLambda(delegateType, argumentScope); } + +- public ExprHoistedLocalExpr CreateHoistedLocalInExpression() => +- new ExprHoistedLocalExpr(Types.GetOptPredefAgg(PredefinedType.PT_EXPRESSION).getThisType()); ++ public ExprHoistedLocalExpr CreateHoistedLocalInExpression() ++ { return new ExprHoistedLocalExpr(Types.GetOptPredefAgg(PredefinedType.PT_EXPRESSION).getThisType()); } + +- public ExprMethodInfo CreateMethodInfo(MethPropWithInst mwi) => +- CreateMethodInfo(mwi.Meth(), mwi.GetType(), mwi.TypeArgs); ++ public ExprMethodInfo CreateMethodInfo(MethPropWithInst mwi) ++ { return CreateMethodInfo(mwi.Meth(), mwi.GetType(), mwi.TypeArgs); } + + public ExprMethodInfo CreateMethodInfo(MethodSymbol method, AggregateType methodType, TypeArray methodParameters) + { +@@ -84,19 +84,19 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + method, methodType, methodParameters); + } + +- public ExprPropertyInfo CreatePropertyInfo(PropertySymbol prop, AggregateType propertyType) => +- new ExprPropertyInfo(Types.GetOptPredefAgg(PredefinedType.PT_PROPERTYINFO).getThisType(), prop, propertyType); ++ public ExprPropertyInfo CreatePropertyInfo(PropertySymbol prop, AggregateType propertyType) ++ { return new ExprPropertyInfo(Types.GetOptPredefAgg(PredefinedType.PT_PROPERTYINFO).getThisType(), prop, propertyType); } + +- public ExprFieldInfo CreateFieldInfo(FieldSymbol field, AggregateType fieldType) => +- new ExprFieldInfo(field, fieldType, Types.GetOptPredefAgg(PredefinedType.PT_FIELDINFO).getThisType()); ++ public ExprFieldInfo CreateFieldInfo(FieldSymbol field, AggregateType fieldType) ++ { return new ExprFieldInfo(field, fieldType, Types.GetOptPredefAgg(PredefinedType.PT_FIELDINFO).getThisType()); } + +- private ExprTypeOf CreateTypeOf(ExprClass sourceType) => +- new ExprTypeOf(Types.GetReqPredefAgg(PredefinedType.PT_TYPE).getThisType(), sourceType); ++ private ExprTypeOf CreateTypeOf(ExprClass sourceType) ++ { return new ExprTypeOf(Types.GetReqPredefAgg(PredefinedType.PT_TYPE).getThisType(), sourceType); } + +- public ExprTypeOf CreateTypeOf(CType sourceType) => CreateTypeOf(CreateClass(sourceType)); ++ public ExprTypeOf CreateTypeOf(CType sourceType) { return CreateTypeOf(CreateClass(sourceType)); } + +- public ExprUserLogicalOp CreateUserLogOp(CType type, Expr trueFalseCall, ExprCall operatorCall) => +- new ExprUserLogicalOp(type, trueFalseCall, operatorCall); ++ public ExprUserLogicalOp CreateUserLogOp(CType type, Expr trueFalseCall, ExprCall operatorCall) ++ { return new ExprUserLogicalOp(type, trueFalseCall, operatorCall); } + + public ExprUserLogicalOp CreateUserLogOpError(CType type, Expr trueFalseCall, ExprCall operatorCall) + { +@@ -105,16 +105,16 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return rval; + } + +- public ExprConcat CreateConcat(Expr first, Expr second) => new ExprConcat(first, second); ++ public ExprConcat CreateConcat(Expr first, Expr second) { return new ExprConcat(first, second); } + +- public ExprConstant CreateStringConstant(string str) => +- CreateConstant(Types.GetReqPredefAgg(PredefinedType.PT_STRING).getThisType(), ConstVal.Get(str)); ++ public ExprConstant CreateStringConstant(string str) ++ { return CreateConstant(Types.GetReqPredefAgg(PredefinedType.PT_STRING).getThisType(), ConstVal.Get(str)); } + +- public ExprMultiGet CreateMultiGet(EXPRFLAG flags, CType type, ExprMulti multi) => +- new ExprMultiGet(type, flags, multi); ++ public ExprMultiGet CreateMultiGet(EXPRFLAG flags, CType type, ExprMulti multi) ++ { return new ExprMultiGet(type, flags, multi); } + +- public ExprMulti CreateMulti(EXPRFLAG flags, CType type, Expr left, Expr op) => +- new ExprMulti(type, flags, left, op); ++ public ExprMulti CreateMulti(EXPRFLAG flags, CType type, Expr left, Expr op) ++ { return new ExprMulti(type, flags, left, op); } + + //////////////////////////////////////////////////////////////////////////////// + // +@@ -124,7 +124,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // + // This returns a null for reference types and an EXPRZEROINIT for all others. + +- public Expr CreateZeroInit(CType type) => CreateZeroInit(CreateClass(type), null, false); ++ public Expr CreateZeroInit(CType type) { return CreateZeroInit(CreateClass(type), null, false); } + + private Expr CreateZeroInit(ExprClass typeExpr, Expr originalConstructorCall, bool isConstructor) + { +@@ -187,15 +187,15 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return new ExprZeroInit(type, originalConstructorCall, isConstructor, isError); + } + +- public ExprConstant CreateConstant(CType type, ConstVal constVal) => new ExprConstant(type, constVal); ++ public ExprConstant CreateConstant(CType type, ConstVal constVal) { return new ExprConstant(type, constVal); } + +- public ExprConstant CreateIntegerConstant(int x) => +- CreateConstant(Types.GetReqPredefAgg(PredefinedType.PT_INT).getThisType(), ConstVal.Get(x)); ++ public ExprConstant CreateIntegerConstant(int x) ++ { return CreateConstant(Types.GetReqPredefAgg(PredefinedType.PT_INT).getThisType(), ConstVal.Get(x)); } + +- public ExprConstant CreateBoolConstant(bool b) => +- CreateConstant(Types.GetReqPredefAgg(PredefinedType.PT_BOOL).getThisType(), ConstVal.Get(b)); ++ public ExprConstant CreateBoolConstant(bool b) ++ { return CreateConstant(Types.GetReqPredefAgg(PredefinedType.PT_BOOL).getThisType(), ConstVal.Get(b)); } + +- public ExprBlock CreateBlock(ExprStatement pOptionalStatements) => new ExprBlock(pOptionalStatements); ++ public ExprBlock CreateBlock(ExprStatement pOptionalStatements) { return new ExprBlock(pOptionalStatements); } + + public ExprArrayIndex CreateArrayIndex(Expr array, Expr index) + { +@@ -212,11 +212,11 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return new ExprArrayIndex(type, array, index); + } + +- public ExprBinOp CreateBinop(ExpressionKind exprKind, CType type, Expr left, Expr right) => +- new ExprBinOp(exprKind, type, left, right); ++ public ExprBinOp CreateBinop(ExpressionKind exprKind, CType type, Expr left, Expr right) ++ { return new ExprBinOp(exprKind, type, left, right); } + +- public ExprUnaryOp CreateUnaryOp(ExpressionKind exprKind, CType type, Expr operand) => +- new ExprUnaryOp(exprKind, type, operand); ++ public ExprUnaryOp CreateUnaryOp(ExpressionKind exprKind, CType type, Expr operand) ++ { return new ExprUnaryOp(exprKind, type, operand); } + + public ExprOperator CreateOperator(ExpressionKind exprKind, CType type, Expr arg1, Expr arg2) + { +@@ -228,12 +228,12 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + } + + +- public ExprBinOp CreateUserDefinedBinop(ExpressionKind exprKind, CType type, Expr left, Expr right, Expr call, MethPropWithInst userMethod) => +- new ExprBinOp(exprKind, type, left, right, call, userMethod); ++ public ExprBinOp CreateUserDefinedBinop(ExpressionKind exprKind, CType type, Expr left, Expr right, Expr call, MethPropWithInst userMethod) ++ { return new ExprBinOp(exprKind, type, left, right, call, userMethod); } + + // The call may be lifted, but we do not mark the outer binop as lifted. +- public ExprUnaryOp CreateUserDefinedUnaryOperator(ExpressionKind exprKind, CType type, Expr operand, ExprCall call, MethPropWithInst userMethod) => +- new ExprUnaryOp(exprKind, type, operand, call, userMethod); ++ public ExprUnaryOp CreateUserDefinedUnaryOperator(ExpressionKind exprKind, CType type, Expr operand, ExprCall call, MethPropWithInst userMethod) ++ { return new ExprUnaryOp(exprKind, type, operand, call, userMethod); } + + public ExprUnaryOp CreateNeg(EXPRFLAG flags, Expr operand) + { +@@ -246,23 +246,22 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + //////////////////////////////////////////////////////////////////////////////// + // Create a node that evaluates the first, evaluates the second, results in the second. + +- public ExprBinOp CreateSequence(Expr first, Expr second) => +- CreateBinop(ExpressionKind.Sequence, second.Type, first, second); ++ public ExprBinOp CreateSequence(Expr first, Expr second) ++ { return CreateBinop(ExpressionKind.Sequence, second.Type, first, second); } + + //////////////////////////////////////////////////////////////////////////////// + // Create a node that evaluates the first, evaluates the second, results in the first. + +- public ExprBinOp CreateReverseSequence(Expr first, Expr second) => +- CreateBinop(ExpressionKind.SequenceReverse, first.Type, first, second); ++ public ExprBinOp CreateReverseSequence(Expr first, Expr second) ++ { return CreateBinop(ExpressionKind.SequenceReverse, first.Type, first, second); } + +- public ExprAssignment CreateAssignment(Expr left, Expr right) => new ExprAssignment(left, right); ++ public ExprAssignment CreateAssignment(Expr left, Expr right) { return new ExprAssignment(left, right); } + + //////////////////////////////////////////////////////////////////////////////// + +- public ExprNamedArgumentSpecification CreateNamedArgumentSpecification(Name name, Expr value) => +- new ExprNamedArgumentSpecification(name, value); ++ public ExprNamedArgumentSpecification CreateNamedArgumentSpecification(Name name, Expr value) { return new ExprNamedArgumentSpecification(name, value); } + +- public ExprWrap CreateWrap(Expr expression) => new ExprWrap(expression); ++ public ExprWrap CreateWrap(Expr expression) { return new ExprWrap(expression); } + + public ExprBinOp CreateSave(ExprWrap wrap) + { +@@ -272,7 +271,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return expr; + } + +- public ExprConstant CreateNull() => CreateConstant(Types.GetNullType(), default(ConstVal)); ++ public ExprConstant CreateNull() { return CreateConstant(Types.GetNullType(), default(ConstVal)); } + + public void AppendItemToList( + Expr newItem, +@@ -306,14 +305,13 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + last = list.OptionalNextListNode; + } + +- public ExprList CreateList(Expr op1, Expr op2) => new ExprList(op1, op2); ++ public ExprList CreateList(Expr op1, Expr op2) { return new ExprList(op1, op2); } + +- public ExprList CreateList(Expr op1, Expr op2, Expr op3) => CreateList(op1, CreateList(op2, op3)); ++ public ExprList CreateList(Expr op1, Expr op2, Expr op3) { return CreateList(op1, CreateList(op2, op3)); } + +- public ExprList CreateList(Expr op1, Expr op2, Expr op3, Expr op4) => +- CreateList(op1, CreateList(op2, CreateList(op3, op4))); ++ public ExprList CreateList(Expr op1, Expr op2, Expr op3, Expr op4) { return CreateList(op1, CreateList(op2, CreateList(op3, op4))); } + +- public ExprClass CreateClass(CType type) => new ExprClass(type); ++ public ExprClass CreateClass(CType type) { return new ExprClass(type); } + } + } + +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs +index ee75e7b38e..bd7c52f87e 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs +@@ -601,10 +601,11 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // Check if we have a compile time constant. If we do, create a constant for it and set the + // original tree to the cast. + +- if (exprConst is ExprConstant constant && exprFlags == 0 && ++ if (exprConst is ExprConstant && exprFlags == 0 && + exprSrc.Type.fundType() == typeDest.fundType() && +- (!exprSrc.Type.isPredefType(PredefinedType.PT_STRING) || constant.Val.IsNullRef)) ++ (!exprSrc.Type.isPredefType(PredefinedType.PT_STRING) || ((ExprConstant)exprConst).Val.IsNullRef)) + { ++ ExprConstant constant = (ExprConstant)exprConst; + ExprConstant expr = GetExprFactory().CreateConstant(typeDest, constant.Val); + pexprDest = expr; + return; +@@ -1191,8 +1192,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + while (list != null) + { + Expr arg; +- if (list is ExprList next) ++ if (list is ExprList) + { ++ ExprList next = (ExprList)list; + arg = next.OptionalElement; + list = next.OptionalNextListNode; + } +@@ -1265,8 +1267,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + private Expr UnwrapExpression(Expr pExpression) + { +- while (pExpression is ExprWrap wrap) ++ while (pExpression is ExprWrap) + { ++ ExprWrap wrap = (ExprWrap)pExpression; + Expr wrapped = wrap.OptionalExpression; + if (wrapped == null) + { +@@ -1344,8 +1347,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return false; + if (expr.isLvalue()) + { +- if (expr is ExprProperty prop) ++ if (expr is ExprProperty) + { ++ ExprProperty prop = (ExprProperty)expr; + CheckLvalueProp(prop); + } + markFieldAssigned(expr); +@@ -1570,9 +1574,10 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + // If we're invoking code on a struct-valued field, mark the struct as assigned (to + // avoid warning CS0649). +- if (pObject is ExprField field && !field.FieldWithType.Field().isAssigned && !swt.Sym.IsFieldSymbol() && ++ if (pObject is ExprField && !((ExprField)pObject).FieldWithType.Field().isAssigned && !swt.Sym.IsFieldSymbol() && + typeObj.isStructType() && !typeObj.isPredefined()) + { ++ ExprField field = (ExprField) pObject; + field.FieldWithType.Field().isAssigned = true; + } + +@@ -1779,8 +1784,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + Expr argument = indir; + Expr rval; +- if (argument is ExprNamedArgumentSpecification named) ++ if (argument is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)argument; + int index = 0; + // If we're named, look for the type of the matching name. + foreach (Name i in mostDerivedMethod.ParameterNames) +@@ -1918,8 +1924,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Expr expr = it.Current(); + count++; + +- if (expr is ExprNamedArgumentSpecification named) ++ if (expr is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)expr; + named.Value = tryConvert(named.Value, elementType); + } + else +@@ -1941,8 +1948,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + private void markFieldAssigned(Expr expr) + { +- if (0 != (expr.Flags & EXPRFLAG.EXF_LVALUE) && expr is ExprField field) ++ if (0 != (expr.Flags & EXPRFLAG.EXF_LVALUE) && expr is ExprField) + { ++ ExprField field = (ExprField) expr; + FieldSymbol symbol; + do + { +@@ -2009,8 +2017,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + for (Expr list = args; list != null; iarg++) + { + Expr arg; +- if (list is ExprList next) ++ if (list is ExprList) + { ++ ExprList next = (ExprList)list; + arg = next.OptionalElement; + list = next.OptionalNextListNode; + } +@@ -2364,8 +2373,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + { + Expr arg; + +- if (list is ExprList next) ++ if (list is ExprList) + { ++ ExprList next = (ExprList)list; + arg = next.OptionalElement; + list = next.OptionalNextListNode; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs +index 25a8d40341..d17de3977d 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/GroupToArgsBinder.cs +@@ -510,7 +510,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // then let us through. + if (methprop.isParamArray && + index < pArguments.carg && +- pArguments.prgexpr[index] is ExprArrayInit arrayInit && arrayInit.GeneratedForParamArray) ++ pArguments.prgexpr[index] is ExprArrayInit && ((ExprArrayInit)pArguments.prgexpr[index]).GeneratedForParamArray) + { + paramArrayArgument = pArguments.prgexpr[index]; + } +@@ -518,7 +518,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // Positional. + if (index < pArguments.carg && + !(pArguments.prgexpr[index] is ExprNamedArgumentSpecification) && +- !(pArguments.prgexpr[index] is ExprArrayInit arrayInitPos && arrayInitPos.GeneratedForParamArray)) ++ !(pArguments.prgexpr[index] is ExprArrayInit && ((ExprArrayInit)pArguments.prgexpr[index]).GeneratedForParamArray)) + { + pExprArguments[index] = pArguments.prgexpr[index++]; + continue; +@@ -839,7 +839,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + for (int i = 0; i < pArguments.carg; i++) + { + Expr expr = prgexpr[i]; +- if (expr is ExprNamedArgumentSpecification named && named.Name == pName) ++ if (expr is ExprNamedArgumentSpecification && ((ExprNamedArgumentSpecification)expr).Name == pName) + { + return expr; + } +@@ -861,7 +861,8 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + HashSet names = new HashSet(); + for (int i = 0; i < _pArguments.carg; i++) + { +- if (!(_pArguments.prgexpr[i] is ExprNamedArgumentSpecification named)) ++ ExprNamedArgumentSpecification named; ++ if (!(_pArguments.prgexpr[i] is ExprNamedArgumentSpecification)) + { + if (!currentPosition.IsEmpty()) + { +@@ -869,6 +870,7 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + } + continue; + } ++ named = (ExprNamedArgumentSpecification) _pArguments.prgexpr[i]; + + Name name = named.Name; + if (!methprop.ParameterNames.Contains(name)) +@@ -1080,8 +1082,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Expr pArgument = _pArguments.prgexpr[ivar]; + + // If we have a named argument, strip it to do the conversion. +- if (pArgument is ExprNamedArgumentSpecification named) ++ if (pArgument is ExprNamedArgumentSpecification) + { ++ ExprNamedArgumentSpecification named = (ExprNamedArgumentSpecification)pArgument; + pArgument = named.Value; + } + +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs +index c9eb5ae21d..cde533d750 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ImplicitConversion.cs +@@ -172,8 +172,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + VSFAIL("Bad type symbol kind"); + break; + case TypeKind.TK_MethodGroupType: +- if (_exprSrc is ExprMemberGroup memGrp) ++ if (_exprSrc is ExprMemberGroup) + { ++ ExprMemberGroup memGrp = (ExprMemberGroup)_exprSrc; + ExprCall outExpr; + bool retVal = _binder.BindGrpConversion(memGrp, _typeDest, _needsExprDest, out outExpr, false); + _exprDest = outExpr; +@@ -737,10 +738,10 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // * A constant-expression of type long can be converted to type ulong, provided the value of + // the constant-expression is not negative. + // Note: Don't use GetConst here since the conversion only applies to bona-fide compile time constants. +- if (_exprSrc is ExprConstant constant && _exprSrc.IsOK && ++ if (_exprSrc is ExprConstant && _exprSrc.IsOK && + ((ptSrc == PredefinedType.PT_INT && ptDest != PredefinedType.PT_BOOL && ptDest != PredefinedType.PT_CHAR) || + (ptSrc == PredefinedType.PT_LONG && ptDest == PredefinedType.PT_ULONG)) && +- isConstantInRange(constant, _typeDest)) ++ isConstantInRange(((ExprConstant)_exprSrc), _typeDest)) + { + // Special case (CLR 6.1.6): if integral constant is in range, the conversion is a legal implicit conversion. + convertKind = ConvKind.Implicit; +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs +index 52d354ac53..f43684690d 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/MethodTypeInferrer.cs +@@ -1063,10 +1063,11 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // SPEC: yields a single method with return CType U then a lower-bound + // SPEC: inference is made from U to Tb. + +- if (!(pSource is ExprMemberGroup memGrp)) ++ if (!(pSource is ExprMemberGroup)) + { + return false; + } ++ ExprMemberGroup memGrp = (ExprMemberGroup)pSource; + pType = pType.GetDelegateTypeOfPossibleExpression(); + if (!pType.isDelegateType()) + { +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs +index b23fc44509..7dbe8227ca 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Nullable.cs +@@ -29,8 +29,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + { + Debug.Assert(expr != null); + +- if (expr is ExprCall pCall && pCall.MemberGroup.OptionalObject == null) ++ if (expr is ExprCall && ((ExprCall)expr).MemberGroup.OptionalObject == null) + { ++ ExprCall pCall = (ExprCall)expr; + MethodSymbol meth = pCall.MethWithInst.Meth(); + if (meth != null && meth.IsNullableConstructor()) + { +@@ -45,7 +46,8 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + + public static Expr StripNullableConstructor(Expr pExpr) + { +- while (IsNullableConstructor(pExpr, out ExprCall call)) ++ ExprCall call; ++ while (IsNullableConstructor(pExpr, out call)) + { + pExpr = call.OptionalArguments; + Debug.Assert(pExpr != null && !(pExpr is ExprList)); +@@ -60,7 +62,8 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Debug.Assert(exprSrc != null && exprSrc.Type.IsNullableType()); + + // For new T?(x), the answer is x. +- if (IsNullableConstructor(exprSrc, out ExprCall call)) ++ ExprCall call; ++ if (IsNullableConstructor(exprSrc, out call)) + { + var args = call.OptionalArguments; + Debug.Assert(args != null && !(args is ExprList)); +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs +index 96ee032422..9397543de6 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ExpressionIterator.cs +@@ -83,8 +83,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + _pList = null; + _pCurrent = null; + } +- else if (pExpr is ExprList pList) ++ else if (pExpr is ExprList) + { ++ ExprList pList = (ExprList)pExpr; + _pList = pList; + _pCurrent = pList.OptionalElement; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs +index 2abac4cecc..84bc0e1d4c 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExprVisitorBase.cs +@@ -21,8 +21,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return pResult; + } + +- if (pExpr is ExprStatement statement) ++ if (pExpr is ExprStatement) + { ++ ExprStatement statement = (ExprStatement)pExpr; + return CacheExprMapping(pExpr, DispatchStatementList(statement)); + } + +@@ -275,11 +276,13 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + return; + } + +- if (!(nextNode is ExprList next)) ++ ExprList next; ++ if (!(nextNode is ExprList)) + { + list.OptionalNextListNode = Visit(nextNode); + return; + } ++ next = (ExprList)nextNode; + + list = next; + } +diff --git a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs +index 96075b6d38..e0581fd14e 100644 +--- a/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs ++++ b/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Visitors/ExpressionTreeRewriter.cs +@@ -50,8 +50,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // For assignments, we either have a member assignment or an indexed assignment. + //Debug.Assert(assignment.GetLHS().isPROP() || assignment.GetLHS().isFIELD() || assignment.GetLHS().isARRAYINDEX() || assignment.GetLHS().isLOCAL()); + Expr lhs; +- if (assignment.LHS is ExprProperty prop) ++ if (assignment.LHS is ExprProperty) + { ++ ExprProperty prop = (ExprProperty)assignment.LHS; + if (prop.OptionalArguments== null) + { + // Regular property. +@@ -304,8 +305,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + // can handle in the general case all implicit boxing conversions. Right now it + // requires that all arguments to a call that need to be boxed be explicitly boxed. + +- if (pObject != null && pObject is ExprCast cast && cast.IsBoxingCast) ++ if (pObject != null && pObject is ExprCast && ((ExprCast)pObject).IsBoxingCast) + { ++ ExprCast cast = (ExprCast) pObject; + pObject = cast.Argument; + } + pObject = Visit(pObject); +@@ -576,8 +578,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + if (udcall != null) + { + Debug.Assert(udcall.Kind == ExpressionKind.Call || udcall.Kind == ExpressionKind.UserLogicalOp); +- if (udcall is ExprCall ascall) ++ if (udcall is ExprCall) + { ++ ExprCall ascall = (ExprCall)udcall; + ExprList args = (ExprList)ascall.OptionalArguments; + Debug.Assert(args.OptionalNextListNode.Kind != ExpressionKind.List); + p1 = args.OptionalElement; +@@ -708,8 +711,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + ExprBlock body = anonmeth.OptionalBody; + + // The most likely case: +- if (body.OptionalStatements is ExprReturn ret) ++ if (body.OptionalStatements is ExprReturn) + { ++ ExprReturn ret = (ExprReturn)body.OptionalStatements; + Debug.Assert(ret.OptionalObject != null); + return Visit(ret.OptionalObject); + } +@@ -831,8 +835,9 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + Expr pUDConversion = call?.PConversions; + if (pUDConversion != null) + { +- if (pUDConversion is ExprCall convCall) ++ if (pUDConversion is ExprCall) + { ++ ExprCall convCall = (ExprCall)pUDConversion; + Expr pUDConversionArgument = convCall.OptionalArguments; + if (IsNullableValueAccess(pUDConversionArgument, pArgument)) + { +@@ -1174,23 +1179,25 @@ namespace Microsoft.CSharp.RuntimeBinder.Semantics + private bool IsNullableValueAccess(Expr pExpr, Expr pObject) + { + Debug.Assert(pExpr != null); +- return pExpr is ExprProperty prop && prop.MemberGroup.OptionalObject == pObject && pObject.Type.IsNullableType(); ++ return pExpr is ExprProperty && ((ExprProperty)pExpr).MemberGroup.OptionalObject == pObject && pObject.Type.IsNullableType(); + } + + private bool IsDelegateConstructorCall(Expr pExpr) + { + Debug.Assert(pExpr != null); +- if (!(pExpr is ExprCall pCall)) ++ ExprCall pCall; ++ if (!(pExpr is ExprCall)) + { + return false; + } ++ pCall = (ExprCall)pExpr; + + return pCall.MethWithInst.Meth() != null && + pCall.MethWithInst.Meth().IsConstructor() && + pCall.Type.isDelegateType() && + pCall.OptionalArguments != null && +- pCall.OptionalArguments is ExprList list && +- list.OptionalNextListNode.Kind == ExpressionKind.FunctionPointer; ++ (pCall.OptionalArguments is ExprList) && ++ ((ExprList)pCall.OptionalArguments).OptionalNextListNode.Kind == ExpressionKind.FunctionPointer; + } + private static bool isEnumToDecimalConversion(CType argtype, CType desttype) + { +diff --git a/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs b/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs +index 4eb817c0af..671636f428 100644 +--- a/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs ++++ b/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs +@@ -352,7 +352,10 @@ namespace System.Collections.Generic + throw new PlatformNotSupportedException(); + } + +- protected override void OnDeserialization(Object sender) => throw new PlatformNotSupportedException(); ++ protected override void OnDeserialization(Object sender) ++ { ++ throw new PlatformNotSupportedException(); ++ } + } + } + } +diff --git a/src/System.Drawing.Common/src/System/Drawing/Brush.cs b/src/System.Drawing.Common/src/System/Drawing/Brush.cs +index 089069ed64..b202ef7736 100644 +--- a/src/System.Drawing.Common/src/System/Drawing/Brush.cs ++++ b/src/System.Drawing.Common/src/System/Drawing/Brush.cs +@@ -62,6 +62,6 @@ namespace System.Drawing + } + } + +- ~Brush() => Dispose(false); ++ ~Brush() { Dispose(false); } + } + } +diff --git a/src/System.Drawing.Common/src/System/Drawing/Design/CategoryNameCollection.cs b/src/System.Drawing.Common/src/System/Drawing/Design/CategoryNameCollection.cs +index 065498c3ad..fcc4f8b2b6 100644 +--- a/src/System.Drawing.Common/src/System/Drawing/Design/CategoryNameCollection.cs ++++ b/src/System.Drawing.Common/src/System/Drawing/Design/CategoryNameCollection.cs +@@ -16,34 +16,34 @@ namespace System.Drawing.Design + /// Initializes a new instance of based on another + /// . + /// +- public CategoryNameCollection(CategoryNameCollection value) => InnerList.AddRange(value); ++ public CategoryNameCollection(CategoryNameCollection value) { InnerList.AddRange(value); } + + /// + /// Initializes a new instance of containing any array of + /// objects. + /// +- public CategoryNameCollection(string[] value) => InnerList.AddRange(value); ++ public CategoryNameCollection(string[] value) { InnerList.AddRange(value); } + + /// + /// Represents the entry at the specified index of the . + /// +- public string this[int index] => ((string)(InnerList[index])); ++ public string this[int index] { get { return ((string)(InnerList[index])); } } + + /// + /// Gets a value indicating whether the contains the specified + /// . + /// +- public bool Contains(string value) => InnerList.Contains(value); ++ public bool Contains(string value) { return InnerList.Contains(value); } + + /// + /// Copies the values to a one-dimensional instance + /// at the specified index. + /// +- public void CopyTo(string[] array, int index) => InnerList.CopyTo(array, index); ++ public void CopyTo(string[] array, int index) { InnerList.CopyTo(array, index); } + + /// + /// Returns the index of a in the . + /// +- public int IndexOf(string value) => InnerList.IndexOf(value); ++ public int IndexOf(string value) { return InnerList.IndexOf(value); } + } + } +diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/CustomLineCap.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/CustomLineCap.cs +index 152474117d..d9769778c7 100644 +--- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/CustomLineCap.cs ++++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/CustomLineCap.cs +@@ -38,7 +38,7 @@ namespace System.Drawing.Drawing2D + SetNativeLineCap(nativeLineCap); + } + +- internal CustomLineCap(IntPtr nativeLineCap) => SetNativeLineCap(nativeLineCap); ++ internal CustomLineCap(IntPtr nativeLineCap) { SetNativeLineCap(nativeLineCap); } + + internal void SetNativeLineCap(IntPtr handle) + { +@@ -72,7 +72,7 @@ namespace System.Drawing.Drawing2D + _disposed = true; + } + +- ~CustomLineCap() => Dispose(false); ++ ~CustomLineCap() { Dispose(false); } + + public object Clone() + { +diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPathIterator.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPathIterator.cs +index cb9c34c62a..3b552f1baf 100644 +--- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPathIterator.cs ++++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPathIterator.cs +@@ -58,7 +58,7 @@ namespace System.Drawing.Drawing2D + } + } + +- ~GraphicsPathIterator() => Dispose(false); ++ ~GraphicsPathIterator() { Dispose(false); } + + public int NextSubpath(out int startIndex, out int endIndex, out bool isClosed) + { +diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsState.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsState.cs +index c7d086756e..61de948b2d 100644 +--- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsState.cs ++++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsState.cs +@@ -8,7 +8,7 @@ namespace System.Drawing.Drawing2D + { + internal int nativeState; + +- internal GraphicsState(int nativeState) => this.nativeState = nativeState; ++ internal GraphicsState(int nativeState) { this.nativeState = nativeState; } + } + } + +diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/RegionData.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/RegionData.cs +index 596b8622eb..dfa2446c87 100644 +--- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/RegionData.cs ++++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/RegionData.cs +@@ -6,7 +6,7 @@ namespace System.Drawing.Drawing2D + { + public sealed class RegionData + { +- internal RegionData(byte[] data) => Data = data; ++ internal RegionData(byte[] data) { Data = data; } + + public byte[] Data { get; set; } + } +diff --git a/src/System.Drawing.Common/src/System/Drawing/Text/FontCollection.cs b/src/System.Drawing.Common/src/System/Drawing/Text/FontCollection.cs +index df2ac5c8c2..a451dc621d 100644 +--- a/src/System.Drawing.Common/src/System/Drawing/Text/FontCollection.cs ++++ b/src/System.Drawing.Common/src/System/Drawing/Text/FontCollection.cs +@@ -14,7 +14,7 @@ namespace System.Drawing.Text + { + internal IntPtr _nativeFontCollection; + +- internal FontCollection() => _nativeFontCollection = IntPtr.Zero; ++ internal FontCollection() { _nativeFontCollection = IntPtr.Zero; } + + /// + /// Disposes of this +@@ -58,6 +58,6 @@ namespace System.Drawing.Text + } + } + +- ~FontCollection() => Dispose(false); ++ ~FontCollection() { Dispose(false); } + } + } +diff --git a/src/System.Linq.Expressions/src/System/Dynamic/Utils/TypeExtensions.cs b/src/System.Linq.Expressions/src/System/Dynamic/Utils/TypeExtensions.cs +index c45caba093..ef9a25203d 100644 +--- a/src/System.Linq.Expressions/src/System/Dynamic/Utils/TypeExtensions.cs ++++ b/src/System.Linq.Expressions/src/System/Dynamic/Utils/TypeExtensions.cs +@@ -65,7 +65,8 @@ namespace System.Dynamic.Utils + internal static ParameterInfo[] GetParametersCached(this MethodBase method) + { + CacheDict pic = s_paramInfoCache; +- if (!pic.TryGetValue(method, out ParameterInfo[] pis)) ++ ParameterInfo[] pis; ++ if (!pic.TryGetValue(method, out pis)) + { + pis = method.GetParameters(); + +diff --git a/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs b/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs +index d8b1c61f74..8cefbd4f19 100644 +--- a/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs ++++ b/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/LambdaCompiler.Expressions.cs +@@ -952,8 +952,9 @@ namespace System.Linq.Expressions.Compiler + private void EmitMemberAssignment(MemberAssignment binding, Type objectType) + { + EmitExpression(binding.Expression); +- if (binding.Member is FieldInfo fi) ++ if (binding.Member is FieldInfo) + { ++ FieldInfo fi = (FieldInfo)binding.Member; + _ilg.Emit(OpCodes.Stfld, fi); + } + else +@@ -1097,7 +1098,7 @@ namespace System.Linq.Expressions.Compiler + private static Type GetMemberType(MemberInfo member) + { + Debug.Assert(member is FieldInfo || member is PropertyInfo); +- return member is FieldInfo fi ? fi.FieldType : (member as PropertyInfo).PropertyType; ++ return member is FieldInfo ? ((FieldInfo)member).FieldType : (member as PropertyInfo).PropertyType; + } + + #endregion +diff --git a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberAssignment.cs b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberAssignment.cs +index 475a6c63cc..0787b10186 100644 +--- a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberAssignment.cs ++++ b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberAssignment.cs +@@ -93,23 +93,23 @@ namespace System.Linq.Expressions + + // Null paramName as there are two paths here with different parameter names at the API + TypeUtils.ValidateType(decType, null); +- switch (member) ++ if (member is PropertyInfo) + { +- case PropertyInfo pi: +- if (!pi.CanWrite) +- { +- throw Error.PropertyDoesNotHaveSetter(pi, nameof(member)); +- } +- +- memberType = pi.PropertyType; +- break; +- +- case FieldInfo fi: +- memberType = fi.FieldType; +- break; +- +- default: +- throw Error.ArgumentMustBeFieldInfoOrPropertyInfo(nameof(member)); ++ PropertyInfo pi = (PropertyInfo) member; ++ if (!pi.CanWrite) ++ { ++ throw Error.PropertyDoesNotHaveSetter(pi, nameof(member)); ++ } ++ memberType = pi.PropertyType; ++ } ++ else if (member is FieldInfo) ++ { ++ FieldInfo fi = (FieldInfo) member; ++ memberType = fi.FieldType; ++ } ++ else ++ { ++ throw Error.ArgumentMustBeFieldInfoOrPropertyInfo(nameof(member)); + } + } + } +diff --git a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberBinding.cs b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberBinding.cs +index c1c5884618..43c0698f90 100644 +--- a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberBinding.cs ++++ b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberBinding.cs +@@ -61,6 +61,9 @@ namespace System.Linq.Expressions + return ExpressionStringBuilder.MemberBindingToString(this); + } + +- internal virtual void ValidateAsDefinedHere(int index) => throw Error.UnknownBindingType(index); ++ internal virtual void ValidateAsDefinedHere(int index) ++ { ++ throw Error.UnknownBindingType(index); ++ } + } + } +diff --git a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberMemberBinding.cs b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberMemberBinding.cs +index f3981a2b1f..75dd7141da 100644 +--- a/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberMemberBinding.cs ++++ b/src/System.Linq.Expressions/src/System/Linq/Expressions/MemberMemberBinding.cs +@@ -127,23 +127,24 @@ namespace System.Linq.Expressions + + // Null paramName as there are several paths here with different parameter names at the API + TypeUtils.ValidateType(decType, null, allowByRef: true, allowPointer: true); +- switch (member) ++ if (member is PropertyInfo) + { +- case PropertyInfo pi: +- if (!pi.CanRead) +- { +- throw Error.PropertyDoesNotHaveGetter(pi, nameof(member)); +- } +- +- memberType = pi.PropertyType; +- break; +- +- case FieldInfo fi: +- memberType = fi.FieldType; +- break; ++ PropertyInfo pi = (PropertyInfo)member; ++ if (!pi.CanRead) ++ { ++ throw Error.PropertyDoesNotHaveGetter(pi, nameof(member)); ++ } + +- default: +- throw Error.ArgumentMustBeFieldInfoOrPropertyInfo(nameof(member)); ++ memberType = pi.PropertyType; ++ } ++ else if (member is FieldInfo) ++ { ++ FieldInfo fi = (FieldInfo)member; ++ memberType = fi.FieldType; ++ } ++ else ++ { ++ throw Error.ArgumentMustBeFieldInfoOrPropertyInfo(nameof(member)); + } + } + +diff --git a/src/System.Linq/src/System/Linq/Reverse.cs b/src/System.Linq/src/System/Linq/Reverse.cs +index e68a4f42ee..a6352779b0 100644 +--- a/src/System.Linq/src/System/Linq/Reverse.cs ++++ b/src/System.Linq/src/System/Linq/Reverse.cs +@@ -103,19 +103,24 @@ namespace System.Linq + { + if (onlyIfCheap) + { +- switch (_source) ++ if (_source is IIListProvider) + { +- case IIListProvider listProv: +- return listProv.GetCount(onlyIfCheap: true); +- +- case ICollection colT: +- return colT.Count; +- +- case ICollection col: +- return col.Count; +- +- default: +- return -1; ++ IIListProvider listProv = (IIListProvider)_source; ++ return listProv.GetCount(onlyIfCheap: true); ++ } ++ else if (_source is ICollection) ++ { ++ ICollection colT = (ICollection) _source; ++ return colT.Count; ++ } ++ else if (_source is ICollection) ++ { ++ ICollection col = (ICollection) _source; ++ return col.Count; ++ } ++ else ++ { ++ return -1; + } + } + +diff --git a/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs b/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs +index 5321578946..ff54677027 100644 +--- a/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs ++++ b/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs +@@ -94,8 +94,9 @@ namespace System.Net.WebSockets + if (!(user is WindowsPrincipal)) + { + // AuthenticationSchemes.Basic. +- if (user.Identity is HttpListenerBasicIdentity basicIdentity) ++ if (user.Identity is HttpListenerBasicIdentity) + { ++ HttpListenerBasicIdentity basicIdentity = (HttpListenerBasicIdentity)user.Identity; + return new GenericPrincipal(new HttpListenerBasicIdentity(basicIdentity.Name, basicIdentity.Password), null); + } + } From patchwork Mon Dec 16 17:26:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34955 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0137827BBE2; Mon, 16 Dec 2024 17:30:47 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 16BD127BBE9 for ; Mon, 16 Dec 2024 17:30:46 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuv-0000xl-9Y; Mon, 16 Dec 2024 12:30:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuE-0000QT-Hr for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEuB-0001wr-Rh for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=YjikGg/6fXCa8j7BFRdVC+FFo8oNH5WmWT8jiICWye8=; b=CrrE78py5eLOymfb+YYfLzJci0g3tEji33gQ1d0xfnRjYqgsP3AOIJET5F22br2hku1LJ1iM08kqDroeujBtfoef5WbcI/oiiRIJV7ofd+EwYcDgUUicW9mh+yrep5qZA8WZj9jVJ4hhp3P62gWg0C92ATRACiJ3pct+EqHN+d805pDYbSiRyeE/rGFiS4xFrvpBeOYptn3osnAZHM/WuBzJjAPxhbeyZ/rtFRXRiNJ3kLDOA/GpxL17hbTmqv/xvrxz9k4bNcm0k7NwUeR7FNonvDJwWA9c+QVqG9i5w7Kt6M8lTN7vVTG4noEkSn+DfSIfVGwx1naqfcFol05VHQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEuB-0006Ma-Hu for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:15 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 17/21] gnu: Add mono-5.8.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:15 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437014724328 (code B ref 74609); Mon, 16 Dec 2024 17:29:15 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:29:07 +0000 Received: from localhost ([127.0.0.1]:55882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEu0-0006Ju-Ls for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:29:06 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:55616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtn-0006Hl-4R for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:52 -0500 Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4361dc6322fso28856445e9.3 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370065; x=1734974865; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=YjikGg/6fXCa8j7BFRdVC+FFo8oNH5WmWT8jiICWye8=; b=Cnk8m79vI+OEYmNP90ty10Tk9FOBvxdTXqpgIy/lwRM3cwW4To1NqqrFNlf5kOAvJV lT/MVi/sm4Md60IG/Jf2ep7UmQuU1VJ5z8dX9Zl0AyMEJJ2kWhgLapO2TpLFKVIxDWWo GT8vJW143udVelKJsaFvUnGy0Pft7uvgW1llLsd1wEMPJZH7M8PI+wai+vBSb2XMZqJ0 ppvp/T7M/rrcE6mw1HKBMH6uD59iuX0eXvWB7i/VG79L4TlKjNMBGKpF1OfUJLESbvsg fwpx5QemDBz9s34WaPb355r5U2Cb9izIITicq6s6dz6i7qzAUNGWozzqGHFr1xV9IAMF S+cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370065; x=1734974865; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YjikGg/6fXCa8j7BFRdVC+FFo8oNH5WmWT8jiICWye8=; b=l4xvws1ieA0frqjQ/TSrZ+jv5g+FiomZNda+BP4bkcbMLO12lFMXY0U6EhsoUk/0ab 1DwumAefFxfhLKPJgbUjpaTG0/LOolUsrBVL3+E+JRTTyQ/uLWw9sCYabWMMFaYRXspF dFVLsCd/kucOPOOyj6Bh+1yG7BLoJEiTufpgg4KPYbhZTHYYJGK1SG63VmBeJmpS/hu1 3ATHyDg+p68oid3QQ07vXhj4zguHIzlWE+Eg4ZXGH0djgilehHkhfwDI22+FpZ9alqdo zkrQrX2So/a+1P4JLgyVLOWM9/ghiA2SL0H/pXB+Kfa+4Prj8TKWM03gEVZQTtml2THo c24g== X-Gm-Message-State: AOJu0Ywsc9dGmlRxyy3K0zjSk2vKtS/Lk5r4o7zw3eKhh5DHIJ+7jTtf eyo+sFaT8wWVVaMZ15Dn7fLJXi3aietp3GSPecGSGypadwjqhhd96O5Qw3I6 X-Gm-Gg: ASbGncvVEFEnMhODXSPGOkBysjG/TLEr7t+BUAfe4TVv4DgS9yqwMLA4w0qU+rvu4rt KNV0XaQsoSk0HEMwejxLEy/ZdweExq1Y3PPbGYQyEpCIj/Pan7Iu07Yvk1YZqvJ78xA2bLLYGQc kXV6BrRcAGqK77h2gGUemZGlK4/u7m3XArPhMmqItjmSAjgd54pnBXRRN9wLz0p/MWSe6PKzr0L gYy7425F9eg32cCKCENgS5BSjwcVaPCzT3zwkXKvlhlgiN+41qPjyb05jpyHg== X-Google-Smtp-Source: AGHT+IHmejVFGWF5g8dolBgkX+Vt9RjlIXe9CvBKNGx0k0dJT3sou3DrirJlUpHXCOFRzEpjx2wOqg== X-Received: by 2002:a05:6000:188f:b0:386:5b2:a9d9 with SMTP id ffacd0b85a97d-3888e0c04aemr10585186f8f.53.1734370065281; Mon, 16 Dec 2024 09:27:45 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c8049facsm8867328f8f.79.2024.12.16.09.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:44 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:40 +0200 Message-ID: <6bb9968172b788d893ce204e2c8ac9c4a9142b39.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-5.8.0-external-repo-specs, mono-5.8.0): New variables. * gnu/packages/patches/mono-5.8.0-patches.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patch. Change-Id: Iea71bf52d67a182f7543adaba44409dbf6c3c0e2 --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 123 ++++++++++++++++++ gnu/packages/patches/mono-5.8.0-patches.patch | 60 +++++++++ 3 files changed, 184 insertions(+) create mode 100644 gnu/packages/patches/mono-5.8.0-patches.patch diff --git a/gnu/local.mk b/gnu/local.mk index 788f3bb835a..2b1a6f7c782 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1828,6 +1828,7 @@ dist_patch_DATA = \ %D%/packages/patches/mono-2.11.4-fixes.patch \ %D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \ %D%/packages/patches/mono-5.4.0-patches.patch \ + %D%/packages/patches/mono-5.8.0-patches.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 7799f9b951a..82fc2033707 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1275,3 +1275,126 @@ (define-public mono-pre-5.8.0 ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (delete 'patch-sub-autogen.sh-shebang)))))))) + +(define mono-5.8.0-external-repo-specs + '(("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791" + "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj" + #:recursive? #t) + ("api-snapshot" "6668c80a9499218c0b8cc41f48a9e242587df756" + "0vbwbwa1hr4jlj7283w8bk3v5i8s43h8413r2pkh4hf38b2rks7d") + ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + (("reference-assemblies" "binary-reference-assemblies") + "e048fe4a88d237d105ae02fe0363a68296099362" + "0i87i3x694f4g8s2flflv0ah88blxds7gbiyrwrmscqdjsifhy49") + ("bockbuild" "cb4545409dafe16dfe86c7d8e6548a69c369e2a2" + "0svdfv61d6ppwd4zgki129r9prf75fnsqihna253zfwfpzpingx7") + ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff" + "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y") + ("cecil" "76ffcdabae660e9586273c9b40db180a0dc8d4c8" + "0f3bsfri28pxmnb0m6074bnmmjgsr7cjixv9fhnp6aimhvy4l5p4") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "b965d1f8b5281712c4400ef28ed97670ffd4880d" + "0r9hr0bs3j3agqi2pq4n1km9jfycaqvxf6756y7r5l3ykqsd6wsr") + ("corert" "48dba73801e804e89f00311da99d873f9c550278" + "1zw47jf4cwqmaixylisxi73xf6cap41bwf9vlmpxanzxaqklzsvk") + ("ikdasm" "465c0815558fd43c0110f8d00fc186ac0044ac6a" + "0xir7pcgq04hb7s8g9wsqdrypb6l29raj3iz5rcqzdm0056k75w2") + (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1" + "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi") + ("linker" "c62335c350f3902ff0459112f7efc8b926f4f15d" + "015191sdw9i7vnhlsycv65pw8nnfpkd65k11jw1y9bikb4x3aj8x") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "b2c30bc81b2a7733a4eeb252a55f6b4d50cfc3a1" + "01vajrfx6y12f525xdiwfbn9qzmym2s65rbiqpy9d9xw0pnq7gbl") + (("NUnitLite" "nunit-lite") "764656cdafdb3acd25df8cb52a4e0ea14760fccd" + "0pc7lk3p916is8cn4ngaqvjlmlzv3vvjpyksy4pvb3qb5iiaw0vq") + ;; ("roslyn-binaries" "e484c75e2edd3c3f1870a2468a71a56220cf1f7f" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv") + ;; ("xunit-binaries" "d4433b0972f40cb3efaa3fbba52869bde5df8fa8" + ;; "") + )) + +(define-public mono-5.8.0 + (package + (inherit mono-pre-5.8.0) + (version "5.8.0.129") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit "mono-5.8.0.129"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0130vd33yzp4w7570qw9xjq2g7b2xmacjbpkmzrpbhy8as5hy4z6")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-5.8.0-external-repo-specs) + #$@prepare-mono-source-0)) + (patches + (search-patches "mono-5.8.0-patches.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-pre-5.8.0) + (replace "mono" mono-pre-5.8.0))) + (arguments + (substitute-keyword-arguments (package-arguments mono-pre-5.8.0) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (replace 'build-reference-assemblies + ;; More references need updating this time... + (lambda* (#:key make-flags #:allow-other-keys) + (let ((top (getcwd))) + (with-directory-excursion + "external/binary-reference-assemblies" + (substitute* (find-files "." "^Makefile$") + (("CSC_COMMON_ARGS := " all) + (string-append all "-delaysign+ ")) + (("IBM\\.Data\\.DB2_REFS := " all) + (string-append all "System.Xml ")) + (("Mono\\.Data\\.Sqlite_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Data\\.DataSetExtensions_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Data\\.OracleClient_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.IdentityModel_REFS := " all) + (string-append all "System.Configuration ")) + (("System\\.Design_REFS := " all) + (string-append all "Accessibility ")) + (("System\\.Web\\.Extensions\\.Design_REFS := " all) + (string-append all "System.Windows.Forms System.Web ")) + (("System\\.ServiceModel\\.Routing_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Web\\.Abstractions_REFS := " all) + (string-append all "System ")) + (("System\\.Reactive\\.Windows\\.Forms_REFS := " all) + (string-append all "System ")) + (("System\\.Windows\\.Forms\\.DataVisualization_REFS := " all) + (string-append all "Accessibility ")) + (("Facades/System\\.ServiceModel\\.Primitives_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Dynamic\\.Runtime_REFS := " all) + (string-append all "System ")) + (("Facades/System\\.Xml\\.XDocument_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Runtime\\.Serialization.Xml_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Data\\.Common_REFS := " all) + (string-append all "System System.Xml "))) + (apply invoke "make" + (string-append "CSC=MONO_PATH=" + top "/mcs/class/lib/build" + " " + top "/runtime/mono-wrapper" + " " + top "/mcs/class/lib/build/mcs.exe") + make-flags))))))))))) diff --git a/gnu/packages/patches/mono-5.8.0-patches.patch b/gnu/packages/patches/mono-5.8.0-patches.patch new file mode 100644 index 00000000000..f73c51d92f5 --- /dev/null +++ b/gnu/packages/patches/mono-5.8.0-patches.patch @@ -0,0 +1,60 @@ +diff --git a/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs b/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs +index 0cc69e47648..51ded713ba6 100644 +--- a/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs ++++ b/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs +@@ -775,7 +775,7 @@ namespace Mono.AppleTls + [DllImport (SecurityLibrary)] + extern unsafe static /* OSStatus */ SslStatus SSLRead (/* SSLContextRef */ IntPtr context, /* const void* */ byte* data, /* size_t */ IntPtr dataLength, /* size_t* */ out IntPtr processed); + +- public override unsafe (int ret, bool wantMore) Read (byte[] buffer, int offset, int count) ++ public override unsafe System.ValueTuple Read (byte[] buffer, int offset, int count) + { + if (Interlocked.Exchange (ref pendingIO, 1) == 1) + throw new InvalidOperationException (); +@@ -816,7 +816,7 @@ namespace Mono.AppleTls + [DllImport (SecurityLibrary)] + extern unsafe static /* OSStatus */ SslStatus SSLWrite (/* SSLContextRef */ IntPtr context, /* const void* */ byte* data, /* size_t */ IntPtr dataLength, /* size_t* */ out IntPtr processed); + +- public override unsafe (int ret, bool wantMore) Write (byte[] buffer, int offset, int count) ++ public override unsafe System.ValueTuple Write (byte[] buffer, int offset, int count) + { + if (Interlocked.Exchange (ref pendingIO, 1) == 1) + throw new InvalidOperationException (); +diff --git a/mcs/class/System/Mono.Btls/MonoBtlsContext.cs b/mcs/class/System/Mono.Btls/MonoBtlsContext.cs +index 559db4aca5d..b70239c5163 100644 +--- a/mcs/class/System/Mono.Btls/MonoBtlsContext.cs ++++ b/mcs/class/System/Mono.Btls/MonoBtlsContext.cs +@@ -300,7 +300,7 @@ namespace Mono.Btls + throw new NotImplementedException (); + } + +- public override (int ret, bool wantMore) Read (byte[] buffer, int offset, int size) ++ public override System.ValueTuple Read (byte[] buffer, int offset, int size) + { + Debug ("Read: {0} {1} {2}", buffer.Length, offset, size); + +@@ -329,7 +329,7 @@ namespace Mono.Btls + } + } + +- public override (int ret, bool wantMore) Write (byte[] buffer, int offset, int size) ++ public override System.ValueTuple Write (byte[] buffer, int offset, int size) + { + Debug ("Write: {0} {1} {2}", buffer.Length, offset, size); + +diff --git a/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs b/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs +index 74410976a85..46f0eb59b9c 100644 +--- a/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs ++++ b/mcs/class/System/Mono.Net.Security/MobileTlsContext.cs +@@ -165,9 +165,9 @@ namespace Mono.Net.Security + + public abstract void Flush (); + +- public abstract (int ret, bool wantMore) Read (byte[] buffer, int offset, int count); ++ public abstract System.ValueTuple Read (byte[] buffer, int offset, int count); + +- public abstract (int ret, bool wantMore) Write (byte[] buffer, int offset, int count); ++ public abstract System.ValueTuple Write (byte[] buffer, int offset, int count); + + public abstract void Shutdown (); + From patchwork Mon Dec 16 17:26:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34953 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3167427BBE9; Mon, 16 Dec 2024 17:30:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 69D4B27BBE2 for ; Mon, 16 Dec 2024 17:30:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuq-0000mt-0B; Mon, 16 Dec 2024 12:29:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuE-0000QQ-H5 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEuD-0001x4-5V for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=9dinxwyM7fxuG73TubZown8CgOMBHHrG798MIcPk5IM=; b=CjOl0Wzg87ha2KXZ+XsvCWKScFx3Py/gMynQFUR/mYi8kb/tkSmLskIkl/YlCkNEbNVwrxFY9dOYss16bABYldYOsUWfDV9NFid4do3m+82zbBD4cTOjyfTXK7DjyztAi8t+gSp6OSqrcUcHL8Z7IQlIYpPuP4J0x2eWDz4PLGUhCWIBRuzXIqDefuehvw8hCaAlZ2eJzIHUcq6t4A5X9DqUNSSneU4CZ+M88XZ+A6macwMGxU5toTAKFuReU5JrGJFhOpVuge0aL6CFxSWtHgEHAd+h2uHjRLqtGplyfJCpgyvcGlFk9tAGJ1kwptTJPbmrq04b1flNTLFhz7NZYw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEuC-0006Ms-WA for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 18/21] gnu: Add mono-pre-5.10.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:16 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437014724344 (code B ref 74609); Mon, 16 Dec 2024 17:29:16 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:29:07 +0000 Received: from localhost ([127.0.0.1]:55886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEu2-0006KT-Uc for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:29:07 -0500 Received: from mail-wm1-f47.google.com ([209.85.128.47]:44294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtr-0006Hw-Ag for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:55 -0500 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-43618283d48so31648075e9.1 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370070; x=1734974870; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=9dinxwyM7fxuG73TubZown8CgOMBHHrG798MIcPk5IM=; b=P8e2ld2JW9LR095VhdNoYnqESDHR6BtWb0b5BzVMNY7eOyepMPQVFiVvEu1bae9mTG c7+l1q+JUjTZtwZKcGe4TuqOs+hVkxI2142QT0YfBUVKcmFWrYe7Nq9y3v/kdNX1lgZR 4RyNozfzIomFx1TnKBhferXiGZQwsXcpgRIG/+DXHZYxvHXp4SzDYkItwxk+/HZmpzWO 5D5fcb6xf91zbg30G2xky0D+y3MAN9arJNXgfQVzUuAVO7xS6gOeQnc1MM7AP6WIYb6C nJseZtYbMBfcan46EBbthBSRL4Dq6sFG/pm3SKpJkCEOzc5k1pw6mlRE4ugGSaQ7LaG7 GsJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370070; x=1734974870; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=9dinxwyM7fxuG73TubZown8CgOMBHHrG798MIcPk5IM=; b=nluKr+oY8FawNpQJ1QcymgGE2ZMv0rvEd2ZpBk6gF8NQsI5tCb004hkupJ7REJtr7L 7i4WVdgdvcY63fAOQ18SUBXJt1AdHWZkqc9ww23hWrFqCtc6gzrUPq97/sgKqE42RqtI tWeXA6DbvQPNmJz8BiHZHepWkv3jHxXaNLtbg5pJIdVhDTGf3rJCrB4TVbsdiZ+pSGlH JMdXFamzKH+qYSecqaQIF8c4lPYu9odqpKPxU8BbmjE1Xo9aDb16CsIE8S6QgAc4HprS FAYY36dlw38o78HV8fWJB4KQx0aB786ccGA/5Ra/onkXZU0+ISLirgEGLwVGbtVPoDSh oDBw== X-Gm-Message-State: AOJu0YyLdHezBtwELpRYm8R6oQgwnx4wYBQzkmXyejkKPIpqxRku256W dCE82e0hiK3uJjpThv1Hf8cHG6RZvEofkSQIDreOo9JQMHZVjMfTr2Jl1Rr/ X-Gm-Gg: ASbGncsWvxwwSk5hSbAUsZCNzHBElc8ZJZOPJZ8GyuF/qhVK3PfsLZ1HlKxp+29VBx3 EFNTurP/R25NxlVfiaaBj1gA2ZZfgeNw5Tg3zp4TnW+ViRoz99zSTL5TxFskkQK+ipgmMgmO42J vtI5+AjCIf6BxThn1KneupEt/IeFJnarqWleJjqrhdk47Izn8qEY+xhRutg8Sm+bheutmR6ByXu TOkaihSPmJvmbdZKink9qR8jb7yY5qq9RIhOGU99i945eTLr+wAWaSLK/zrcQ== X-Google-Smtp-Source: AGHT+IFq350YnnwiF69sUjO03Z212W+YbGeW0dR0yJOAh2hNMCx+BtCx2m4T1tpigOU9Uje+VLShaA== X-Received: by 2002:a05:600c:198a:b0:434:fe3c:c67c with SMTP id 5b1f17b1804b1-436476cd473mr4628855e9.26.1734370068612; Mon, 16 Dec 2024 09:27:48 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4363602dc58sm90019535e9.17.2024.12.16.09.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:47 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:41 +0200 Message-ID: <3cbfc5b25a94ed1a917791c8f79b692b6c78b2b2.1734369314.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-pre-5.10.0-external-repo-specs, mono-pre-5.10.0): New variables. * gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patch. Change-Id: Ie78dce071032b6743b6e4c2eb58e43bc89e6a1d1 --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 73 + .../mono-mcs-patches-from-5.10.0.patch | 4218 +++++++++++++++++ 3 files changed, 4292 insertions(+) create mode 100644 gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2b1a6f7c782..c58bfe73cdb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1829,6 +1829,7 @@ dist_patch_DATA = \ %D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \ %D%/packages/patches/mono-5.4.0-patches.patch \ %D%/packages/patches/mono-5.8.0-patches.patch \ + %D%/packages/patches/mono-mcs-patches-from-5.10.0.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 82fc2033707..414e955340f 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1398,3 +1398,76 @@ (define-public mono-5.8.0 " " top "/mcs/class/lib/build/mcs.exe") make-flags))))))))))) + +(define mono-pre-5.10.0-external-repo-specs + '(("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791" + "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj" + #:recursive? #t) + ("api-snapshot" "627333cae84f02a36ee9ca605c96dac4557d9f35" + "0p9c6brxiwx38yvaf55jd0l1mxfj3b5ah0xas2hv6frkz80yrqdl") + ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + (("reference-assemblies" "binary-reference-assemblies") + "9c5cc7f051a0bba2e41341a5baebfc4d2c2133ef" + "14bfn1qvni8gyfxjwmvykyjjy3j5ng4fnbljdadi9dm4b9al0wg1") + ("bockbuild" "29022af5d8a94651b2eece93f910559b254ec3f0" + "0lclc1smmrj6xw32dll073mxw4ddiixv9arv02yw3w5h135ay7w4") + ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff" + "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y") + ("cecil" "bc11f472954694ebd92ae4956f110c1036a7c2e0" + "122nnp5pcnw18pj6amnqkqxlrmapd4vy9xs65hd0bqyqjh56bwnd") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "cb1b049c95227465c1791b857cb5ba86385d9f29" + "1pr0qjlgxf63zs1g80gqd6x3qhlgb0wlcc8zm8z8am5aywrvgb53") + ("corert" "48dba73801e804e89f00311da99d873f9c550278" + "1zw47jf4cwqmaixylisxi73xf6cap41bwf9vlmpxanzxaqklzsvk") + ("ikdasm" "465c0815558fd43c0110f8d00fc186ac0044ac6a" + "0xir7pcgq04hb7s8g9wsqdrypb6l29raj3iz5rcqzdm0056k75w2") + (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1" + "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi") + ("linker" "99354bf5c13b8055209cb082cddc50c8047ab088" + "05zlajnqf83xfvn2whh9nql6j85sq12aw26sqmyqz7zcpml171mj") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "b58ba4282377bcefd48abdc2d62ce6330e079abe" + "1say03fnqkjsx97zacany3sa5j4mhfk827hkwp23ib02q18f7lvp") + (("NUnitLite" "nunit-lite") "764656cdafdb3acd25df8cb52a4e0ea14760fccd" + "0pc7lk3p916is8cn4ngaqvjlmlzv3vvjpyksy4pvb3qb5iiaw0vq") + ;; ("roslyn-binaries" "1904c7d0682a878e2d25b4d49f3475d12fbb9cc6" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv") + ;; ("xunit-binaries" "d4433b0972f40cb3efaa3fbba52869bde5df8fa8" + ;; "") + )) + +(define-public mono-pre-5.10.0 + (let ((commit "3e9d7d6e9cf8dc33eb29c497c350a1cd7df3a057") + (version "5.8.0.129") + (revision "0")) + (package + (inherit mono-5.8.0) + (version (git-version version revision commit)) + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0m8i0zgzh0fgb3ssy95v9czk1c0rl76q0jj7834s5fjnkdj8l4jb")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-pre-5.10.0-external-repo-specs) + #$@prepare-mono-source-0)) + (patches + (search-patches "mono-mcs-patches-from-5.10.0.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-5.8.0) + (replace "mono" mono-5.8.0)))))) diff --git a/gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch b/gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch new file mode 100644 index 00000000000..41dfed7df7f --- /dev/null +++ b/gnu/packages/patches/mono-mcs-patches-from-5.10.0.patch @@ -0,0 +1,4218 @@ +Includes the following commits: +6f5bfe5cf5a +3812d1c13fc +a80f3d0d87c +b2f051f0b19 +2a202a8478b +4d7d1606d73 +d9970305731 +94e80fc8d7f +0b9280083a9 +07d1e5f36a5 +5f279f14aa2 +889421f3bef +f4c0fd3dc11 +71df5c63b46 +d6e5bf16782 +207f5c2cd6d +c512752a416 +9aca8d5fe4b +diff --git a/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs b/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs +index 97f9e047e6d..f8bf63455de 100644 +--- a/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs ++++ b/mcs/class/Mono.CSharp/Test/Evaluator/TypesTest.cs +@@ -131,5 +131,17 @@ namespace MonoTests.EvaluatorTest + { + Evaluator.Run ("public class TestClass { private TestEnum _te; public string Get() { return _te.ToString(); } } public enum TestEnum { First, Second }"); + } ++ ++ [Test] ++ public void EnumTypeWithOrderDependency () ++ { ++ Evaluator.Run ("public class TestClass { public enum TestEnum { Val1, Val2, Val3 } public TestEnum test; public TestClass() { test = TestEnum.Val3; } }"); ++ object res = Evaluator.Evaluate ("new TestClass()"); ++ ++ var fields = res.GetType ().GetFields (); ++ foreach (var field in fields) { ++ Console.WriteLine ($"{field.Name} = {field.MemberType}"); ++ } ++ } + } + } +\ No newline at end of file +diff --git a/mcs/errors/cs0023-30.cs b/mcs/errors/cs0023-30.cs +new file mode 100644 +index 00000000000..fc19cc24e3e +--- /dev/null ++++ b/mcs/errors/cs0023-30.cs +@@ -0,0 +1,11 @@ ++// CS0023: The `is' operator cannot be applied to operand of type `default' ++// Line: 9 ++// Compiler options: -langversion:latest ++ ++class C ++{ ++ static void Main () ++ { ++ bool d = default is C; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0029-39.cs b/mcs/errors/cs0029-39.cs +new file mode 100644 +index 00000000000..0ed200036dc +--- /dev/null ++++ b/mcs/errors/cs0029-39.cs +@@ -0,0 +1,15 @@ ++// CS0029: Cannot implicitly convert type `S' to `object' ++// Line: 13 ++// Compiler options: -langversion:latest ++ ++public ref struct S ++{ ++} ++ ++class Test ++{ ++ public static void Main () ++ { ++ object o = new S (); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0029-40.cs b/mcs/errors/cs0029-40.cs +new file mode 100644 +index 00000000000..6d9167c31fa +--- /dev/null ++++ b/mcs/errors/cs0029-40.cs +@@ -0,0 +1,19 @@ ++// CS0029: Cannot implicitly convert type `S' to `System.ValueType' ++// Line: 16 ++// Compiler options: -langversion:latest ++ ++using System; ++ ++public ref struct S ++{ ++} ++ ++class Test ++{ ++ public static void Main () ++ { ++ var s = default (S); ++ ValueType s2 = s; ++ var res = default (S).ToString (); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0029-41.cs b/mcs/errors/cs0029-41.cs +new file mode 100644 +index 00000000000..1a65f52f737 +--- /dev/null ++++ b/mcs/errors/cs0029-41.cs +@@ -0,0 +1,12 @@ ++// CS0029: Cannot implicitly convert type `System.TypedReference' to `object' ++// Line: 10 ++ ++using System; ++ ++class Test ++{ ++ public static void Main () ++ { ++ var res = default (TypedReference).ToString (); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0029-42.cs b/mcs/errors/cs0029-42.cs +new file mode 100644 +index 00000000000..c7671000c76 +--- /dev/null ++++ b/mcs/errors/cs0029-42.cs +@@ -0,0 +1,10 @@ ++// CS0029: Cannot implicitly convert type `string' to `int' ++// Line: 8 ++ ++class C ++{ ++ void Exists (int _) ++ { ++ _ = "2"; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0030-17.cs b/mcs/errors/cs0030-17.cs +new file mode 100644 +index 00000000000..b72b8bf71e5 +--- /dev/null ++++ b/mcs/errors/cs0030-17.cs +@@ -0,0 +1,15 @@ ++// CS0030: Cannot convert type `object' to `S' ++// Line: 13 ++// Compiler options: -langversion:latest ++ ++ref struct S ++{ ++} ++ ++class X ++{ ++ public static void Foo (object o) ++ { ++ var res = (S) o; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0103-18.cs b/mcs/errors/cs0103-18.cs +new file mode 100644 +index 00000000000..8cec755d23d +--- /dev/null ++++ b/mcs/errors/cs0103-18.cs +@@ -0,0 +1,10 @@ ++// CS0103: The name `_' does not exist in the current context ++// Line: 8 ++ ++class C ++{ ++ void Test () ++ { ++ _.ToString (); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0123-10.cs b/mcs/errors/cs0123-10.cs +new file mode 100644 +index 00000000000..43d5e5d6368 +--- /dev/null ++++ b/mcs/errors/cs0123-10.cs +@@ -0,0 +1,18 @@ ++// CS0123: A method or delegate `object.ToString()' parameters do not match delegate `System.Func()' parameters ++// Line: 16 ++// Compiler options: -langversion:latest ++ ++using System; ++ ++public ref struct S ++{ ++} ++ ++class Test ++{ ++ public static void Main () ++ { ++ var s = new S (); ++ Func f = s.ToString; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0123-11.cs b/mcs/errors/cs0123-11.cs +new file mode 100644 +index 00000000000..427b628c159 +--- /dev/null ++++ b/mcs/errors/cs0123-11.cs +@@ -0,0 +1,12 @@ ++// CS0123: A method or delegate `object.ToString()' parameters do not match delegate `System.Func()' parameters ++// Line: 16 ++ ++using System; ++ ++class Test ++{ ++ public static void Main () ++ { ++ Func f = default (TypedReference).ToString; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0133-2.cs b/mcs/errors/cs0133-2.cs +index b7a37182d73..48488876f7e 100644 +--- a/mcs/errors/cs0133-2.cs ++++ b/mcs/errors/cs0133-2.cs +@@ -1,4 +1,4 @@ +-// CS0133: The expression being assigned to `c' must be constant ++// CS0133: The expression being assigned to `c' must be a constant or default value + // Line: 10 + + class C +diff --git a/mcs/errors/cs0133-3.cs b/mcs/errors/cs0133-3.cs +index caae3bde68c..2f7dac6880d 100644 +--- a/mcs/errors/cs0133-3.cs ++++ b/mcs/errors/cs0133-3.cs +@@ -1,5 +1,5 @@ +-// CS0133: The expression being assigned to `Foo' must be constant +-// Line: 12 ++// CS0133: The expression being assigned to `Foo' must be a constant or default value ++// Line: 8 + + class T + { +diff --git a/mcs/errors/cs0133-4.cs b/mcs/errors/cs0133-4.cs +index 41fe639b446..54162d544ca 100644 +--- a/mcs/errors/cs0133-4.cs ++++ b/mcs/errors/cs0133-4.cs +@@ -1,4 +1,4 @@ +-// CS0133: The expression being assigned to `S.pathName' must be constant ++// CS0133: The expression being assigned to `S.pathName' must be a constant or default value + // Line: 12 + // Compiler options: -unsafe + +diff --git a/mcs/errors/cs0133-5.cs b/mcs/errors/cs0133-5.cs +index a49f265c690..32e6bfdf416 100644 +--- a/mcs/errors/cs0133-5.cs ++++ b/mcs/errors/cs0133-5.cs +@@ -1,4 +1,4 @@ +-// CS0133: The expression being assigned to `b' must be constant ++// CS0133: The expression being assigned to `b' must be a constant or default value + // Line: 8 + + class X +diff --git a/mcs/errors/cs0133-6.cs b/mcs/errors/cs0133-6.cs +index a523169cdbd..28448dd6de8 100644 +--- a/mcs/errors/cs0133-6.cs ++++ b/mcs/errors/cs0133-6.cs +@@ -1,4 +1,4 @@ +-// CS0133: The expression being assigned to `o' must be constant ++// CS0133: The expression being assigned to `o' must be a constant or default value + // Line: 8 + + class X +diff --git a/mcs/errors/cs0133-7.cs b/mcs/errors/cs0133-7.cs +index 10d82d9fe5e..024bc148229 100644 +--- a/mcs/errors/cs0133-7.cs ++++ b/mcs/errors/cs0133-7.cs +@@ -1,4 +1,4 @@ +-// CS0133: The expression being assigned to `o' must be constant ++// CS0133: The expression being assigned to `o' must be a constant or default value + // Line: 8 + + class X +diff --git a/mcs/errors/cs0133.cs b/mcs/errors/cs0133.cs +index 094194deabb..f0dda9ee3cb 100644 +--- a/mcs/errors/cs0133.cs ++++ b/mcs/errors/cs0133.cs +@@ -1,5 +1,6 @@ +-// CS0133: The expression being assigned to `x' must be constant +-// Line: 6 ++// CS0133: The expression being assigned to `x' must be a constant or default value ++// Line: 7 ++ + class X { + X (int arg) + { +diff --git a/mcs/errors/cs0306-4.cs b/mcs/errors/cs0306-4.cs +new file mode 100644 +index 00000000000..4653512e55b +--- /dev/null ++++ b/mcs/errors/cs0306-4.cs +@@ -0,0 +1,15 @@ ++// CS0306: The type `S' may not be used as a type argument ++// Line: 13 ++// Compiler options: -langversion:latest ++ ++public ref struct S ++{ ++} ++ ++class Test ++{ ++ public static void Foo () ++ { ++ Test local; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0611-3.cs b/mcs/errors/cs0611-3.cs +new file mode 100644 +index 00000000000..6eda773dd24 +--- /dev/null ++++ b/mcs/errors/cs0611-3.cs +@@ -0,0 +1,15 @@ ++// CS0611: Array elements cannot be of type `S' ++// Line: 13 ++// Compiler options: -langversion:latest ++ ++public ref struct S ++{ ++} ++ ++class Test ++{ ++ public static void Main () ++ { ++ var x = new S[0]; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0815-9.cs b/mcs/errors/cs0815-9.cs +new file mode 100644 +index 00000000000..f54703349be +--- /dev/null ++++ b/mcs/errors/cs0815-9.cs +@@ -0,0 +1,11 @@ ++// CS0815: An implicitly typed local variable declaration cannot be initialized with `default' ++// Line: 9 ++// Compiler options: -langversion:latest ++ ++static class X ++{ ++ public static void Main () ++ { ++ var x = default; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1502-11.cs b/mcs/errors/cs1502-11.cs +deleted file mode 100644 +index 82dcb3a2c17..00000000000 +--- a/mcs/errors/cs1502-11.cs ++++ /dev/null +@@ -1,11 +0,0 @@ +-// CS1502: The best overloaded method match for `string.String(char*)' has some invalid arguments +-// Line: 8 +- +-class C +-{ +- static string Prop { +- get { +- return new string ("s"); +- } +- } +-} +diff --git a/mcs/errors/cs1599-2.cs b/mcs/errors/cs1599-2.cs +index 941ff6bb0d6..28aa05b2ed3 100644 +--- a/mcs/errors/cs1599-2.cs ++++ b/mcs/errors/cs1599-2.cs +@@ -1,4 +1,4 @@ +-// CS1599: Method or delegate cannot return type `System.ArgIterator' ++// CS1599: The return type of `System.ArgIterator' is not allowed + // Line: 8 + + using System; +diff --git a/mcs/errors/cs1599-3.cs b/mcs/errors/cs1599-3.cs +index e4869dcaf70..9d378099d82 100644 +--- a/mcs/errors/cs1599-3.cs ++++ b/mcs/errors/cs1599-3.cs +@@ -1,4 +1,4 @@ +-// CS1599: Method or delegate cannot return type `System.ArgIterator' ++// CS1599: The return type of `System.ArgIterator' is not allowed + // Line: 8 + + using System; +diff --git a/mcs/errors/cs1599-4.cs b/mcs/errors/cs1599-4.cs +new file mode 100644 +index 00000000000..358eee59a13 +--- /dev/null ++++ b/mcs/errors/cs1599-4.cs +@@ -0,0 +1,12 @@ ++// CS1599: The return type of `System.TypedReference' is not allowed ++// Line: 8 ++ ++using System; ++ ++public class Program ++{ ++ public static TypedReference operator + (int a, Program b) ++ { ++ throw new ApplicationException (); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1599.cs b/mcs/errors/cs1599.cs +index 5cef32d7f97..871d9fb3e7a 100644 +--- a/mcs/errors/cs1599.cs ++++ b/mcs/errors/cs1599.cs +@@ -1,4 +1,4 @@ +-// CS1599: Method or delegate cannot return type `System.TypedReference' ++// CS1599: The return type of `System.TypedReference' is not allowed + // Line: 8 + + using System; +diff --git a/mcs/errors/cs1644-57.cs b/mcs/errors/cs1644-57.cs +new file mode 100644 +index 00000000000..7ee98373080 +--- /dev/null ++++ b/mcs/errors/cs1644-57.cs +@@ -0,0 +1,7 @@ ++// CS1644: Feature `ref structs' cannot be used because it is not part of the C# 7.0 language specification ++// Line: 5 ++// Compiler options: -langversion:7 ++ ++ref struct S ++{ ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1644-58.cs b/mcs/errors/cs1644-58.cs +new file mode 100644 +index 00000000000..e994cf338bd +--- /dev/null ++++ b/mcs/errors/cs1644-58.cs +@@ -0,0 +1,8 @@ ++// CS1644: Feature `default literal' cannot be used because it is not part of the C# 7.0 language specification ++// Line: 7 ++// Compiler options: -langversion:7 ++ ++class X ++{ ++ int i = default; ++} +diff --git a/mcs/errors/cs1644-59.cs b/mcs/errors/cs1644-59.cs +new file mode 100644 +index 00000000000..2f8aed6b958 +--- /dev/null ++++ b/mcs/errors/cs1644-59.cs +@@ -0,0 +1,13 @@ ++// CS1644: Feature `readonly references' cannot be used because it is not part of the C# 7.0 language specification ++// Line: 9 ++// Compiler options: -langversion:7 ++ ++class X ++{ ++ int i; ++ ++ ref readonly int Test () ++ { ++ return ref i; ++ } ++} +diff --git a/mcs/errors/cs1644-60.cs b/mcs/errors/cs1644-60.cs +new file mode 100644 +index 00000000000..ca9547bc561 +--- /dev/null ++++ b/mcs/errors/cs1644-60.cs +@@ -0,0 +1,11 @@ ++// CS1644: Feature `discards' cannot be used because it is not part of the C# 6.0 language specification ++// Line: 9 ++// Compiler options: -langversion:6 ++ ++class X ++{ ++ int Test () ++ { ++ _ = 2; ++ } ++} +diff --git a/mcs/errors/cs1738-2.cs b/mcs/errors/cs1738-2.cs +index f59221f4c7a..44b3f6d1b14 100644 +--- a/mcs/errors/cs1738-2.cs ++++ b/mcs/errors/cs1738-2.cs +@@ -1,4 +1,4 @@ +-// CS1738: Named arguments must appear after the positional arguments ++// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2 + // Line: 13 + + using System; +diff --git a/mcs/errors/cs1738-3.cs b/mcs/errors/cs1738-3.cs +index 53c4efc3553..901ac0e5d59 100644 +--- a/mcs/errors/cs1738-3.cs ++++ b/mcs/errors/cs1738-3.cs +@@ -1,4 +1,4 @@ +-// CS1738: Named arguments must appear after the positional arguments ++// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2 + // Line: 14 + + class C +diff --git a/mcs/errors/cs1738.cs b/mcs/errors/cs1738.cs +index dab9a61160b..537bc17b917 100644 +--- a/mcs/errors/cs1738.cs ++++ b/mcs/errors/cs1738.cs +@@ -1,4 +1,4 @@ +-// CS1738: Named arguments must appear after the positional arguments ++// CS1738: Named arguments must appear after the positional arguments when using language version older than 7.2 + // Line: 12 + + class C +diff --git a/mcs/errors/cs1983.cs b/mcs/errors/cs1983.cs +index a2ef6c150d6..76d2db4e677 100644 +--- a/mcs/errors/cs1983.cs ++++ b/mcs/errors/cs1983.cs +@@ -1,4 +1,4 @@ +-// CS1983: The return type of an async method must be void, Task, or Task ++// CS1983: The return type of an async method must be void or task type + // Line: 6 + + class C +diff --git a/mcs/errors/cs4012-3.cs b/mcs/errors/cs4012-3.cs +new file mode 100644 +index 00000000000..fb3d1dc276f +--- /dev/null ++++ b/mcs/errors/cs4012-3.cs +@@ -0,0 +1,19 @@ ++// CS4012: Parameters or local variables of type `S' cannot be declared in async methods or iterators ++// Line: 16 ++// Compiler options: -langversion:latest ++ ++using System; ++using System.Threading.Tasks; ++ ++public ref struct S ++{ ++} ++ ++class C ++{ ++ public async void Test () ++ { ++ var tr = new S (); ++ await Task.Factory.StartNew (() => 6); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8175-2.cs b/mcs/errors/cs8175-2.cs +new file mode 100644 +index 00000000000..27c4babf8bf +--- /dev/null ++++ b/mcs/errors/cs8175-2.cs +@@ -0,0 +1,19 @@ ++// CS8175: Cannot use by-reference variable `s' inside an anonymous method, lambda expression, or query expression ++// Line: 17 ++// Compiler options: -langversion:latest ++ ++using System; ++ ++public ref struct S ++{ ++} ++ ++class Test ++{ ++ public static void Main () ++ { ++ var s = new S (); ++ ++ Action a = () => Console.WriteLine (s); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8183.cs b/mcs/errors/cs8183.cs +new file mode 100644 +index 00000000000..f9e9004b737 +--- /dev/null ++++ b/mcs/errors/cs8183.cs +@@ -0,0 +1,11 @@ ++// CS8183: Cannot infer the type of implicitly-typed discard ++// Line: 9 ++// Compiler options: -langversion:7.2 ++ ++class X ++{ ++ public static void Main () ++ { ++ _ = default; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8184.cs b/mcs/errors/cs8184.cs +new file mode 100644 +index 00000000000..19a4685d7bd +--- /dev/null ++++ b/mcs/errors/cs8184.cs +@@ -0,0 +1,10 @@ ++// CS8184: A deconstruction cannot mix declarations and expressions on the left-hand-side ++// Line: 8 ++ ++class X ++{ ++ public static void Main () ++ { ++ (int a, b) = (1, 2); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8207.cs b/mcs/errors/cs8207.cs +new file mode 100644 +index 00000000000..31090948b45 +--- /dev/null ++++ b/mcs/errors/cs8207.cs +@@ -0,0 +1,19 @@ ++// CS8207: An expression tree cannot contain a discard ++// Line: 11 ++ ++using System; ++using System.Linq.Expressions; ++ ++class X ++{ ++ void Test () ++ { ++ Expression> e = () => TryGetValue (out _); ++ } ++ ++ bool TryGetValue (out int arg) ++ { ++ arg = 3; ++ return true; ++ } ++} +diff --git a/mcs/errors/cs8209.cs b/mcs/errors/cs8209.cs +new file mode 100644 +index 00000000000..3a46a206c8e +--- /dev/null ++++ b/mcs/errors/cs8209.cs +@@ -0,0 +1,10 @@ ++// CS8209: Cannot assign void to a discard ++// Line: 8 ++ ++class C ++{ ++ public static void Main () ++ { ++ _ = Main (); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8310.cs b/mcs/errors/cs8310.cs +new file mode 100644 +index 00000000000..134624c03b7 +--- /dev/null ++++ b/mcs/errors/cs8310.cs +@@ -0,0 +1,11 @@ ++// CS8310: Operator `+' cannot be applied to operand `default' ++// Line: 9 ++// Compiler options: -langversion:latest ++ ++class C ++{ ++ static void Main () ++ { ++ int h = 1 + default; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8311.cs b/mcs/errors/cs8311.cs +new file mode 100644 +index 00000000000..5b35229442d +--- /dev/null ++++ b/mcs/errors/cs8311.cs +@@ -0,0 +1,12 @@ ++// CS8311: Cannot use a default literal as an argument to a dynamically dispatched operation ++// Line: 10 ++// Compiler options: -langversion:latest ++ ++class C ++{ ++ static void Main () ++ { ++ dynamic d = null; ++ d.M2 (default); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8312.cs b/mcs/errors/cs8312.cs +new file mode 100644 +index 00000000000..d2ad3f52f02 +--- /dev/null ++++ b/mcs/errors/cs8312.cs +@@ -0,0 +1,12 @@ ++// CS8312: Use of default literal is not valid in this context ++// Line: 9 ++// Compiler options: -langversion:latest ++ ++class C ++{ ++ static void Main () ++ { ++ foreach (var x in default) { ++ } ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8315.cs b/mcs/errors/cs8315.cs +new file mode 100644 +index 00000000000..c40bf8613b4 +--- /dev/null ++++ b/mcs/errors/cs8315.cs +@@ -0,0 +1,11 @@ ++// CS8315: Operator `==' is ambiguous on operands `default' and `default' ++// Line: 9 ++// Compiler options: -langversion:latest ++ ++class C ++{ ++ static void Main () ++ { ++ bool d = default == default; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8323.cs b/mcs/errors/cs8323.cs +new file mode 100644 +index 00000000000..c6c9309ec0d +--- /dev/null ++++ b/mcs/errors/cs8323.cs +@@ -0,0 +1,15 @@ ++// CS8323: Named argument `str' is used out of position but is followed by positional argument ++// Line: 9 ++// Compiler options: -langversion:7.2 ++ ++class X ++{ ++ public static void Main () ++ { ++ Test (str: "", ""); ++ } ++ ++ static void Test (int arg, string str) ++ { ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8324.cs b/mcs/errors/cs8324.cs +new file mode 100644 +index 00000000000..8a0be1aefb9 +--- /dev/null ++++ b/mcs/errors/cs8324.cs +@@ -0,0 +1,12 @@ ++// CS8324: Named argument specifications must appear after all fixed arguments have been specified in a dynamic invocation ++// Line: 10 ++// Compiler options: -langversion:7.2 ++ ++class C ++{ ++ void M () ++ { ++ dynamic d = new object (); ++ d.M (arg: 1, ""); ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8343.cs b/mcs/errors/cs8343.cs +new file mode 100644 +index 00000000000..b6aa8e83a09 +--- /dev/null ++++ b/mcs/errors/cs8343.cs +@@ -0,0 +1,12 @@ ++// CS8343: `S': ref structs cannot implement interfaces ++// Line: 7 ++// Compiler options: -langversion:latest ++ ++using System; ++ ++public ref struct S : IDisposable ++{ ++ public void Dispose () ++ { ++ } ++} +diff --git a/mcs/errors/cs8345-2.cs b/mcs/errors/cs8345-2.cs +new file mode 100644 +index 00000000000..3f6137b1b56 +--- /dev/null ++++ b/mcs/errors/cs8345-2.cs +@@ -0,0 +1,12 @@ ++// CS8345: Field or auto-implemented property cannot be of type `S' unless it is an instance member of a ref struct ++// Line: 11 ++// Compiler options: -langversion:latest ++ ++public ref struct S ++{ ++} ++ ++ref struct Test ++{ ++ static S field; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8345.cs b/mcs/errors/cs8345.cs +new file mode 100644 +index 00000000000..0b5bd05518f +--- /dev/null ++++ b/mcs/errors/cs8345.cs +@@ -0,0 +1,12 @@ ++// CS8345: Field or auto-implemented property cannot be of type `S' unless it is an instance member of a ref struct ++// Line: 11 ++// Compiler options: -langversion:latest ++ ++public ref struct S ++{ ++} ++ ++struct Test ++{ ++ S field; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8346.cs b/mcs/errors/cs8346.cs +new file mode 100644 +index 00000000000..58e22a2ae7f +--- /dev/null ++++ b/mcs/errors/cs8346.cs +@@ -0,0 +1,13 @@ ++// CS8346: Cannot convert a stackalloc expression of type `byte' to type `System.Span' ++// Line: 11 ++// Compiler options: -langversion:7.2 ++ ++using System; ++ ++class X ++{ ++ public static void Main () ++ { ++ Span stackSpan = stackalloc byte[1]; ++ } ++} +\ No newline at end of file +diff --git a/mcs/mcs/argument.cs b/mcs/mcs/argument.cs +index 8421b4dfbfc..5b1003dbadf 100644 +--- a/mcs/mcs/argument.cs ++++ b/mcs/mcs/argument.cs +@@ -106,11 +106,6 @@ namespace Mono.CSharp + + public virtual Expression CreateExpressionTree (ResolveContext rc) + { +- if (Type.Kind == MemberKind.ByRef) { +- rc.Report.Error (8153, Expr.Location, "An expression tree lambda cannot contain a call to a method, property, or indexer that returns by reference"); +- return null; +- } +- + if (ArgType == AType.Default) + rc.Report.Error (854, Expr.Location, "An expression tree cannot contain an invocation which uses optional parameter"); + +diff --git a/mcs/mcs/assign.cs b/mcs/mcs/assign.cs +index a07c8c0ef39..596623feae4 100644 +--- a/mcs/mcs/assign.cs ++++ b/mcs/mcs/assign.cs +@@ -391,9 +391,21 @@ namespace Mono.CSharp { + return System.Linq.Expressions.Expression.Assign (target_object, source_object); + } + +- protected virtual Expression ResolveConversions (ResolveContext ec) ++ protected virtual Expression ResolveConversions (ResolveContext rc) + { +- source = Convert.ImplicitConversionRequired (ec, source, target.Type, source.Location); ++ var ttype = target.Type; ++ var stackAlloc = source as StackAlloc; ++ if (stackAlloc != null && ttype.Arity == 1 && ttype.GetDefinition () == rc.Module.PredefinedTypes.SpanGeneric.TypeSpec && ++ rc.Module.Compiler.Settings.Version >= LanguageVersion.V_7_2) { ++ ++ var etype = ttype.TypeArguments [0]; ++ var stype = ((PointerContainer)source.Type).Element; ++ if (etype == stype && stackAlloc.ResolveSpanConversion (rc, ttype)) { ++ return this; ++ } ++ } ++ ++ source = Convert.ImplicitConversionRequired (rc, source, ttype, source.Location); + if (source == null) + return null; + +diff --git a/mcs/mcs/async.cs b/mcs/mcs/async.cs +index fd6499346e8..643aed5e568 100644 +--- a/mcs/mcs/async.cs ++++ b/mcs/mcs/async.cs +@@ -628,58 +628,112 @@ namespace Mono.CSharp + + protected override bool DoDefineMembers () + { +- PredefinedType builder_type; +- PredefinedMember bf; +- PredefinedMember bs; +- PredefinedMember sr; +- PredefinedMember se; +- PredefinedMember sm; ++ TypeSpec bt; + bool has_task_return_type = false; +- var pred_members = Module.PredefinedMembers; ++ var istate_machine = Module.PredefinedTypes.IAsyncStateMachine; ++ MethodSpec set_statemachine; + +- if (return_type.Kind == MemberKind.Void) { +- builder_type = Module.PredefinedTypes.AsyncVoidMethodBuilder; +- bf = pred_members.AsyncVoidMethodBuilderCreate; +- bs = pred_members.AsyncVoidMethodBuilderStart; +- sr = pred_members.AsyncVoidMethodBuilderSetResult; +- se = pred_members.AsyncVoidMethodBuilderSetException; +- sm = pred_members.AsyncVoidMethodBuilderSetStateMachine; +- } else if (return_type == Module.PredefinedTypes.Task.TypeSpec) { +- builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilder; +- bf = pred_members.AsyncTaskMethodBuilderCreate; +- bs = pred_members.AsyncTaskMethodBuilderStart; +- sr = pred_members.AsyncTaskMethodBuilderSetResult; +- se = pred_members.AsyncTaskMethodBuilderSetException; +- sm = pred_members.AsyncTaskMethodBuilderSetStateMachine; +- task = pred_members.AsyncTaskMethodBuilderTask.Get (); ++ if (return_type.IsCustomTaskType ()) { ++ // ++ // TODO: Would be nice to cache all this on per-type basis ++ // ++ var btypes = Compiler.BuiltinTypes; ++ bt = return_type.MemberDefinition.GetAsyncMethodBuilder (); ++ TypeSpec bt_inflated; ++ if (return_type.IsGeneric) { ++ bt_inflated = bt.MakeGenericType (Module, bt.MemberDefinition.TypeParameters); ++ } else { ++ bt_inflated = bt; ++ } ++ ++ var set_result_sign = MemberFilter.Method ("SetResult", 0, ParametersCompiled.CreateFullyResolved (bt.MemberDefinition.TypeParameters), btypes.Void); ++ set_result = new PredefinedMember (Module, bt, set_result_sign).Resolve (Location); ++ ++ var set_exception_sign = MemberFilter.Method ("SetException", 0, ParametersCompiled.CreateFullyResolved (btypes.Exception), btypes.Void); ++ set_exception = new PredefinedMember (Module, bt, set_exception_sign).Resolve (Location); ++ ++ var builder_factory_sign = MemberFilter.Method ("Create", 0, ParametersCompiled.EmptyReadOnlyParameters, bt_inflated); ++ builder_factory = new PredefinedMember (Module, bt, builder_factory_sign).Resolve (Location); ++ if (builder_factory?.IsStatic == false) ++ throw new NotImplementedException ("report better error message"); ++ ++ var builder_start_sign = MemberFilter.Method ("Start", 1, new ParametersImported ( ++ new [] { ++ new ParameterData (null, Parameter.Modifier.REF), ++ }, ++ new [] { ++ new TypeParameterSpec (0, null, SpecialConstraint.None, Variance.None, null), ++ }, false), ++ btypes.Void); ++ builder_start = new PredefinedMember (Module, bt, builder_start_sign).Resolve (Location); ++ ++ if (!istate_machine.Define ()) ++ return false; ++ ++ var set_statemachine_sign = MemberFilter.Method ("SetStateMachine", 0, ParametersCompiled.CreateFullyResolved (istate_machine.TypeSpec), btypes.Void); ++ set_statemachine = new PredefinedMember (Module, bt, set_statemachine_sign).Resolve (Location); ; ++ ++ var task_sign = MemberFilter.Property ("Task", return_type.MemberDefinition as TypeSpec); ++ task = new PredefinedMember (Module, bt, task_sign).Resolve (Location); ++ ++ if (set_result == null || set_exception == null || builder_factory == null || builder_start == null || set_statemachine == null || task == null || ++ !Module.PredefinedTypes.INotifyCompletion.Define ()) { ++ return false; ++ } ++ ++ has_task_return_type = return_type.IsGeneric; + } else { +- builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilderGeneric; +- bf = pred_members.AsyncTaskMethodBuilderGenericCreate; +- bs = pred_members.AsyncTaskMethodBuilderGenericStart; +- sr = pred_members.AsyncTaskMethodBuilderGenericSetResult; +- se = pred_members.AsyncTaskMethodBuilderGenericSetException; +- sm = pred_members.AsyncTaskMethodBuilderGenericSetStateMachine; +- task = pred_members.AsyncTaskMethodBuilderGenericTask.Get (); +- has_task_return_type = true; +- } ++ PredefinedType builder_type; ++ PredefinedMember bf; ++ PredefinedMember bs; ++ PredefinedMember sr; ++ PredefinedMember se; ++ PredefinedMember sm; ++ var pred_members = Module.PredefinedMembers; ++ ++ if (return_type.Kind == MemberKind.Void) { ++ builder_type = Module.PredefinedTypes.AsyncVoidMethodBuilder; ++ bf = pred_members.AsyncVoidMethodBuilderCreate; ++ bs = pred_members.AsyncVoidMethodBuilderStart; ++ sr = pred_members.AsyncVoidMethodBuilderSetResult; ++ se = pred_members.AsyncVoidMethodBuilderSetException; ++ sm = pred_members.AsyncVoidMethodBuilderSetStateMachine; ++ } else if (return_type == Module.PredefinedTypes.Task.TypeSpec) { ++ builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilder; ++ bf = pred_members.AsyncTaskMethodBuilderCreate; ++ bs = pred_members.AsyncTaskMethodBuilderStart; ++ sr = pred_members.AsyncTaskMethodBuilderSetResult; ++ se = pred_members.AsyncTaskMethodBuilderSetException; ++ sm = pred_members.AsyncTaskMethodBuilderSetStateMachine; ++ task = pred_members.AsyncTaskMethodBuilderTask.Get (); ++ } else { ++ builder_type = Module.PredefinedTypes.AsyncTaskMethodBuilderGeneric; ++ bf = pred_members.AsyncTaskMethodBuilderGenericCreate; ++ bs = pred_members.AsyncTaskMethodBuilderGenericStart; ++ sr = pred_members.AsyncTaskMethodBuilderGenericSetResult; ++ se = pred_members.AsyncTaskMethodBuilderGenericSetException; ++ sm = pred_members.AsyncTaskMethodBuilderGenericSetStateMachine; ++ task = pred_members.AsyncTaskMethodBuilderGenericTask.Get (); ++ has_task_return_type = true; ++ } + +- set_result = sr.Get (); +- set_exception = se.Get (); +- builder_factory = bf.Get (); +- builder_start = bs.Get (); ++ set_result = sr.Get (); ++ set_exception = se.Get (); ++ builder_factory = bf.Get (); ++ builder_start = bs.Get (); + +- var istate_machine = Module.PredefinedTypes.IAsyncStateMachine; +- var set_statemachine = sm.Get (); +- +- if (!builder_type.Define () || !istate_machine.Define () || set_result == null || builder_factory == null || +- set_exception == null || set_statemachine == null || builder_start == null || +- !Module.PredefinedTypes.INotifyCompletion.Define ()) { +- Report.Error (1993, Location, +- "Cannot find compiler required types for asynchronous functions support. Are you targeting the wrong framework version?"); +- return base.DoDefineMembers (); +- } ++ set_statemachine = sm.Get (); ++ ++ if (!builder_type.Define () || !istate_machine.Define () || set_result == null || builder_factory == null || ++ set_exception == null || set_statemachine == null || builder_start == null || ++ !Module.PredefinedTypes.INotifyCompletion.Define ()) { ++ Report.Error (1993, Location, ++ "Cannot find compiler required types for asynchronous functions support. Are you targeting the wrong framework version?"); ++ return base.DoDefineMembers (); ++ } + +- var bt = builder_type.TypeSpec; ++ bt = builder_type.TypeSpec; ++ } + + // + // Inflate generic Task types +@@ -825,9 +879,26 @@ namespace Mono.CSharp + predefined = unsafeVersion ? pm.AsyncVoidMethodBuilderOnCompletedUnsafe : pm.AsyncVoidMethodBuilderOnCompleted; + } else if (return_type == Module.PredefinedTypes.Task.TypeSpec) { + predefined = unsafeVersion ? pm.AsyncTaskMethodBuilderOnCompletedUnsafe : pm.AsyncTaskMethodBuilderOnCompleted; +- } else { ++ } else if (return_type.IsGenericTask) { + predefined = unsafeVersion ? pm.AsyncTaskMethodBuilderGenericOnCompletedUnsafe : pm.AsyncTaskMethodBuilderGenericOnCompleted; + has_task_return_type = true; ++ } else { ++ var parameters = new ParametersImported ( ++ new [] { ++ new ParameterData (null, Parameter.Modifier.REF), ++ new ParameterData (null, Parameter.Modifier.REF) ++ }, ++ new [] { ++ new TypeParameterSpec (0, null, SpecialConstraint.None, Variance.None, null), ++ new TypeParameterSpec (1, null, SpecialConstraint.None, Variance.None, null) ++ }, false); ++ ++ var on_completed_sign = unsafeVersion ? ++ MemberFilter.Method ("AwaitUnsafeOnCompleted", 2, parameters, Compiler.BuiltinTypes.Void) : ++ MemberFilter.Method ("AwaitOnCompleted", 2, parameters, Compiler.BuiltinTypes.Void); ++ ++ predefined = new PredefinedMember (Module, return_type.MemberDefinition.GetAsyncMethodBuilder (), on_completed_sign); ++ has_task_return_type = return_type.IsGeneric; + } + + var on_completed = predefined.Resolve (Location); +@@ -887,11 +958,14 @@ namespace Mono.CSharp + // stateMachine.$builder.Start<{storey-type}>(ref stateMachine); + // + instance.AddressOf (ec, AddressOp.Store); +- ec.Emit (OpCodes.Ldflda, builder_field); ++ ++ bool struct_builder = builder.MemberType.IsStruct; ++ ++ ec.Emit (struct_builder ? OpCodes.Ldflda : OpCodes.Ldfld, builder_field); + if (Task != null) + ec.Emit (OpCodes.Dup); + instance.AddressOf (ec, AddressOp.Store); +- ec.Emit (OpCodes.Call, builder_start.MakeGenericMethod (Module, instance.Type)); ++ ec.Emit (struct_builder ? OpCodes.Call : OpCodes.Callvirt, builder_start.MakeGenericMethod (Module, instance.Type)); + + // + // Emits return stateMachine.$builder.Task; +@@ -1029,4 +1103,20 @@ namespace Mono.CSharp + EmitAssign (ec, new NullConstant (type, loc), false, false); + } + } ++ ++ static class TypeSpecAsyncExtensions ++ { ++ public static bool IsCustomTaskType (this TypeSpec type) ++ { ++ // LAMESPEC: Arity is not mentioned ++ if (type.Arity > 1) ++ return false; ++ ++ var amb = type.MemberDefinition.GetAsyncMethodBuilder (); ++ if (amb == null) ++ return false; ++ ++ return amb.Arity == type.Arity; ++ } ++ } + } +diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs +index 3ff2d68ccb5..83d403118ad 100644 +--- a/mcs/mcs/attribute.cs ++++ b/mcs/mcs/attribute.cs +@@ -789,6 +789,17 @@ namespace Mono.CSharp { + return ((BoolConstant) pos_args[0].Expr).Value; + } + ++ public TypeSpec GetAsyncMethodBuilderValue () ++ { ++ if (!arg_resolved) ++ Resolve (); ++ ++ if (resolve_error) ++ return null; ++ ++ return GetArgumentType (); ++ } ++ + public TypeSpec GetCoClassAttributeValue () + { + if (!arg_resolved) +@@ -1754,9 +1765,11 @@ namespace Mono.CSharp { + + // New in .NET 4.7 + public readonly PredefinedTupleElementNamesAttribute TupleElementNames; ++ public readonly PredefinedAttribute AsyncMethodBuilder; + + // New in .NET 4.7.1 + public readonly PredefinedAttribute IsReadOnly; ++ public readonly PredefinedAttribute IsByRefLike; + + // + // Optional types which are used as types and for member lookup +@@ -1837,8 +1850,10 @@ namespace Mono.CSharp { + CallerLineNumberAttribute = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "CallerLineNumberAttribute"); + CallerFilePathAttribute = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "CallerFilePathAttribute"); + ++ AsyncMethodBuilder = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "AsyncMethodBuilderAttribute"); + TupleElementNames = new PredefinedTupleElementNamesAttribute (module, "System.Runtime.CompilerServices", "TupleElementNamesAttribute"); + IsReadOnly = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "IsReadOnlyAttribute"); ++ IsByRefLike = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "IsByRefLikeAttribute"); + + // TODO: Should define only attributes which are used for comparison + const System.Reflection.BindingFlags all_fields = System.Reflection.BindingFlags.Public | +diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs +index 9afb32c6fe5..6b1adc297a3 100644 +--- a/mcs/mcs/class.cs ++++ b/mcs/mcs/class.cs +@@ -224,6 +224,24 @@ namespace Mono.CSharp + } + } + ++ public void CloseContainerEarlyForReflectionEmit () ++ { ++ if (containers != null) { ++ foreach (TypeContainer tc in containers) { ++ // ++ // SRE requires due to internal checks that any field of enum type is ++ // baked. We close all enum types before closing any other types to ++ // workaround this limitation ++ // ++ if (tc.Kind == MemberKind.Enum) { ++ tc.CloseContainer (); ++ } else { ++ tc.CloseContainerEarlyForReflectionEmit (); ++ } ++ } ++ } ++ } ++ + public virtual void CreateMetadataName (StringBuilder sb) + { + if (Parent != null && Parent.MemberName != null) +@@ -1102,6 +1120,18 @@ namespace Mono.CSharp + member.GenerateDocComment (builder); + } + ++ public TypeSpec GetAsyncMethodBuilder () ++ { ++ if (OptAttributes == null) ++ return null; ++ ++ Attribute a = OptAttributes.Search (Module.PredefinedAttributes.AsyncMethodBuilder); ++ if (a == null) ++ return null; ++ ++ return a.GetAsyncMethodBuilderValue (); ++ } ++ + public TypeSpec GetAttributeCoClass () + { + if (OptAttributes == null) +@@ -2171,7 +2201,7 @@ namespace Mono.CSharp + + public override void Emit () + { +- if (Interfaces != null) { ++ if (Interfaces != null && (ModFlags & Modifiers.PRIVATE) == 0) { + foreach (var iface in Interfaces) { + if (iface.HasNamedTupleElement) { + throw new NotImplementedException ("named tuples for .interfaceimpl"); +@@ -3023,7 +3053,8 @@ namespace Mono.CSharp + Modifiers.INTERNAL | + Modifiers.UNSAFE | + Modifiers.PRIVATE | +- Modifiers.READONLY; ++ Modifiers.READONLY | ++ Modifiers.REF; + + public Struct (TypeContainer parent, MemberName name, Modifiers mod, Attributes attrs) + : base (parent, name, attrs, MemberKind.Struct) +@@ -3139,6 +3170,9 @@ namespace Mono.CSharp + if ((ModFlags & Modifiers.READONLY) != 0) + Module.PredefinedAttributes.IsReadOnly.EmitAttribute (TypeBuilder); + ++ if ((ModFlags & Modifiers.REF) != 0) ++ Module.PredefinedAttributes.IsByRefLike.EmitAttribute (TypeBuilder); ++ + CheckStructCycles (); + + base.Emit (); +@@ -3213,6 +3247,10 @@ namespace Mono.CSharp + protected override TypeSpec[] ResolveBaseTypes (out FullNamedExpression base_class) + { + var ifaces = base.ResolveBaseTypes (out base_class); ++ if (ifaces != null && (ModFlags & Modifiers.REF) != 0) { ++ Report.Error (8343, Location, "`{0}': ref structs cannot implement interfaces", GetSignatureForError ()); ++ } ++ + base_type = Compiler.BuiltinTypes.ValueType; + return ifaces; + } +@@ -3915,7 +3953,7 @@ namespace Mono.CSharp + + protected void IsTypePermitted () + { +- if (MemberType.IsSpecialRuntimeType) { ++ if (MemberType.IsSpecialRuntimeType || MemberType.IsByRefLike) { + if (Parent is StateMachine) { + Report.Error (4012, Location, + "Parameters or local variables of type `{0}' cannot be declared in async methods or iterators", +@@ -3924,6 +3962,19 @@ namespace Mono.CSharp + Report.Error (4013, Location, + "Local variables of type `{0}' cannot be used inside anonymous methods, lambda expressions or query expressions", + MemberType.GetSignatureForError ()); ++ } else if (MemberType.IsByRefLike) { ++ if ((ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) != 0) ++ return; ++ ++ if ((ModFlags & Modifiers.AutoProperty) == 0 && this is Property) ++ return; ++ ++ if ((ModFlags & Modifiers.STATIC) == 0 && (Parent.ModFlags & Modifiers.REF) != 0) ++ return; ++ ++ Report.Error (8345, Location, ++ "Field or auto-implemented property cannot be of type `{0}' unless it is an instance member of a ref struct", ++ MemberType.GetSignatureForError ()); + } else { + Report.Error (610, Location, + "Field or property cannot be of type `{0}'", MemberType.GetSignatureForError ()); +diff --git a/mcs/mcs/const.cs b/mcs/mcs/const.cs +index 046aec24c1b..658f15ec57a 100644 +--- a/mcs/mcs/const.cs ++++ b/mcs/mcs/const.cs +@@ -206,7 +206,9 @@ namespace Mono.CSharp { + c = field.ConvertInitializer (rc, c); + + if (c == null) { +- if (TypeSpec.IsReferenceType (field.MemberType)) ++ if (expr is DefaultLiteralExpression) { ++ // It's handled bellow in New.Constantify ++ } else if (TypeSpec.IsReferenceType (field.MemberType)) + Error_ConstantCanBeInitializedWithNullOnly (rc, field.MemberType, expr.Location, GetSignatureForError ()); + else if (!(expr is Constant)) + Error_ExpressionMustBeConstant (rc, expr.Location, GetSignatureForError ()); +diff --git a/mcs/mcs/convert.cs b/mcs/mcs/convert.cs +index b11477c1043..ae153fc49e8 100644 +--- a/mcs/mcs/convert.cs ++++ b/mcs/mcs/convert.cs +@@ -392,6 +392,9 @@ namespace Mono.CSharp { + if (!TypeSpec.IsValueType (expr_type)) + return null; + ++ if (expr_type.IsByRefLike) ++ return null; ++ + return expr == null ? EmptyExpression.Null : new BoxedCast (expr, target_type); + + case BuiltinTypeSpec.Type.Enum: +@@ -816,7 +819,7 @@ namespace Mono.CSharp { + if (expr_type == target_type) + return true; + +- if (expr_type == InternalType.ThrowExpr) ++ if (expr_type == InternalType.ThrowExpr || expr_type == InternalType.DefaultType) + return target_type.Kind != MemberKind.InternalCompilerType; + + if (target_type.IsNullableType) +@@ -1478,6 +1481,10 @@ namespace Mono.CSharp { + return target_type.Kind == MemberKind.InternalCompilerType ? null : EmptyCast.Create (expr, target_type); + } + ++ if (expr_type == InternalType.DefaultType) { ++ return new DefaultValueExpression (new TypeExpression (target_type, expr.Location), expr.Location).Resolve (ec); ++ } ++ + if (target_type.IsNullableType) + return ImplicitNulableConversion (ec, expr, target_type); + +@@ -1967,7 +1974,7 @@ namespace Mono.CSharp { + // From object or dynamic to any reference type or value type (unboxing) + // + if (source_type.BuiltinType == BuiltinTypeSpec.Type.Object || source_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) { +- if (target_type.IsPointer) ++ if (target_type.IsPointer || target_type.IsByRefLike) + return null; + + return +diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay +index 2868d2fd8f6..4d6fcb44c0d 100644 +--- a/mcs/mcs/cs-parser.jay ++++ b/mcs/mcs/cs-parser.jay +@@ -169,7 +169,8 @@ namespace Mono.CSharp + %token CONST + %token CONTINUE + %token DECIMAL +-%token DEFAULT ++%token DEFAULT ++%token DEFAULT_VALUE + %token DELEGATE + %token DO + %token DOUBLE +@@ -336,6 +337,7 @@ namespace Mono.CSharp + %token DEFAULT_COLON + %token OPEN_BRACKET_EXPR + %token OPEN_PARENS_DECONSTRUCT ++%token REF_STRUCT + + // Make the parser go into eval mode parsing (statements and compilation units). + %token EVAL_STATEMENT_PARSER +@@ -863,7 +865,7 @@ attribute_arguments + } + + Arguments args = ((Arguments) o [0]); +- if (args.Count > 0 && !($3 is NamedArgument) && args [args.Count - 1] is NamedArgument) ++ if (lang_version < LanguageVersion.V_7_2 && args.Count > 0 && !($3 is NamedArgument) && args [args.Count - 1] is NamedArgument) + Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]); + + args.Add ((Argument) $3); +@@ -1015,17 +1017,34 @@ primary_constructor_body + } + ; + ++struct_keyword ++ : STRUCT ++ { ++ $$ = null; ++ } ++ | REF_STRUCT ++ { ++ if (lang_version < LanguageVersion.V_7_2) { ++ FeatureIsNotAvailable (GetLocation ($1), "ref structs"); ++ } ++ ++ $$ = this; ++ } ++ ; ++ + struct_declaration + : opt_attributes + opt_modifiers + opt_partial +- STRUCT ++ struct_keyword + type_declaration_name + { + var mods = (Modifiers) $2; + if ((mods & Modifiers.READONLY) != 0 && lang_version < LanguageVersion.V_7_2) { + FeatureIsNotAvailable (GetLocation ($4), "readonly structs"); + } ++ if ($4 != null) ++ mods |= Modifiers.REF; + + lexer.ConstraintsParsing = true; + valid_param_mod = ParameterModifierType.PrimaryConstructor; +@@ -1071,7 +1090,7 @@ struct_declaration + } + $$ = pop_current_class (); + } +- | opt_attributes opt_modifiers opt_partial STRUCT error ++ | opt_attributes opt_modifiers opt_partial struct_keyword error + { + Error_SyntaxError (yyToken); + } +@@ -1384,6 +1403,18 @@ ref_member_type + + $$ = new ReferenceTypeExpr ((FullNamedExpression) $3, GetLocation ($1)); + } ++ | REF READONLY ++ { ++ lexer.parsing_generic_declaration = true; ++ } ++ type ++ { ++ if (lang_version < LanguageVersion.V_7_2) { ++ FeatureIsNotAvailable (GetLocation ($2), "readonly references"); ++ } ++ ++ $$ = new ReferenceTypeExpr ((FullNamedExpression) $4, true, GetLocation ($1)); ++ } + ; + + method_header +@@ -3448,6 +3479,7 @@ primary_expression + | anonymous_method_expression + | undocumented_expressions + | interpolated_string ++ | default_literal + ; + + type_name_expression +@@ -3824,7 +3856,7 @@ argument_list + | argument_list COMMA argument + { + Arguments list = (Arguments) $1; +- if (list [list.Count - 1] is NamedArgument) ++ if (lang_version < LanguageVersion.V_7_2 && list [list.Count - 1] is NamedArgument) + Error_NamedArgumentExpected ((NamedArgument) list [list.Count - 1]); + + list.Add ((Argument) $3); +@@ -3969,7 +4001,7 @@ expression_list_arguments + | expression_list_arguments COMMA expression_list_argument + { + Arguments args = (Arguments) $1; +- if (args [args.Count - 1] is NamedArgument && !($3 is NamedArgument)) ++ if (lang_version < LanguageVersion.V_7_2 && args [args.Count - 1] is NamedArgument && !($3 is NamedArgument)) + Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]); + + args.Add ((Argument) $3); +@@ -4386,7 +4418,7 @@ anonymous_method_signature + ; + + default_value_expression +- : DEFAULT open_parens_any type CLOSE_PARENS ++ : DEFAULT_VALUE open_parens_any type CLOSE_PARENS + { + if (lang_version < LanguageVersion.ISO_2) + FeatureIsNotAvailable (GetLocation ($1), "default value expression"); +@@ -4396,6 +4428,16 @@ default_value_expression + } + ; + ++default_literal ++ : DEFAULT ++ { ++ if (lang_version < LanguageVersion.V_7_1) ++ FeatureIsNotAvailable (GetLocation ($1), "default literal"); ++ ++ $$ = new DefaultLiteralExpression (GetLocation ($1)); ++ } ++ ; ++ + unary_expression + : primary_expression + | BANG prefixed_unary_expression +@@ -4750,7 +4792,7 @@ pattern_list + | pattern_list COMMA pattern_argument + { + Arguments args = (Arguments) $1; +- if (args [args.Count - 1] is NamedArgument && !($3 is NamedArgument)) ++ if (lang_version < LanguageVersion.V_7_2 && args [args.Count - 1] is NamedArgument && !($3 is NamedArgument)) + Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]); + + args.Add ((Argument) $3); +@@ -5067,17 +5109,25 @@ assignment_expression + $$ = new CompoundAssign (Binary.Operator.ExclusiveOr, (Expression) $1, (Expression) $3); + lbag.AddLocation ($$, GetLocation ($2)); + } +- | OPEN_PARENS_DECONSTRUCT deconstruct_exprs CLOSE_PARENS ASSIGN expression ++ | OPEN_PARENS_DECONSTRUCT deconstruct_assignment CLOSE_PARENS ASSIGN expression + { + if (lang_version < LanguageVersion.V_7) + FeatureIsNotAvailable (GetLocation ($1), "tuples"); + +- var exprs = (List) $2; ++ var exprs = (List) $2; ++ $$ = new TupleDeconstruct (exprs, (Expression) $5, GetLocation ($4)); ++ } ++ | OPEN_PARENS_DECONSTRUCT deconstruct_declaration CLOSE_PARENS ASSIGN expression ++ { ++ if (lang_version < LanguageVersion.V_7) ++ FeatureIsNotAvailable (GetLocation ($1), "tuples"); ++ ++ var exprs = (List) $2; + $$ = new TupleDeconstruct (exprs, (Expression) $5, GetLocation ($4)); + } + ; + +-deconstruct_exprs ++deconstruct_assignment + : expression COMMA expression + { + $$ = new List () { +@@ -5085,7 +5135,7 @@ deconstruct_exprs + (Expression) $3 + }; + } +- | deconstruct_exprs COMMA expression ++ | deconstruct_assignment COMMA expression + { + var src = (List) $1; + src.Add ((Expression) $3); +@@ -5093,6 +5143,43 @@ deconstruct_exprs + } + ; + ++deconstruct_declaration ++ : variable_type identifier_inside_body ++ { ++ var lt = (LocatedToken) $2; ++ var li = new LocalVariable (current_block, lt.Value, lt.Location); ++ current_block.AddLocalName (li); ++ $$ = new List (2) { ++ new BlockVariable ((FullNamedExpression) $1, li) ++ }; ++ } ++ | deconstruct_declaration COMMA variable_type identifier_inside_body ++ { ++ var lt = (LocatedToken) $4; ++ var li = new LocalVariable (current_block, lt.Value, lt.Location); ++ current_block.AddLocalName (li); ++ ++ var src = (List) $1; ++ src.Add (new BlockVariable ((FullNamedExpression) $3, li)); ++ $$ = src; ++ } ++ | deconstruct_declaration COMMA identifier_inside_body ++ { ++ var lt = (LocatedToken) $3; ++ var li = new LocalVariable (current_block, lt.Value, lt.Location); ++ ++ if (lt.Value != "_") { ++ report.Error (8184, lt.Location, "A deconstruction cannot mix declarations and expressions on the left-hand-side"); ++ } else { ++ li.Type = InternalType.Discard; ++ } ++ ++ var src = (List) $1; ++ src.Add (new BlockVariable (new TypeExpression (li.Type, lt.Location), li)); ++ $$ = src; ++ } ++ ; ++ + lambda_parameter_list + : lambda_parameter + { +@@ -6008,6 +6095,28 @@ block_variable_declaration + lbag.AddLocation ($$, GetLocation ($7)); + } + } ++ | REF READONLY variable_type identifier_inside_body ++ { ++ if (lang_version < LanguageVersion.V_7_2) { ++ FeatureIsNotAvailable (GetLocation ($2), "readonly references"); ++ } ++ ++ var lt = (LocatedToken) $4; ++ var li = new LocalVariable (current_block, lt.Value, LocalVariable.Flags.ByRef | LocalVariable.Flags.ReadonlyMask, lt.Location); ++ current_block.AddLocalName (li); ++ current_variable = new BlockVariable ((FullNamedExpression) $3, li); ++ } ++ opt_local_variable_initializer opt_variable_declarators SEMICOLON ++ { ++ $$ = current_variable; ++ current_variable = null; ++ if ($6 != null) { ++ lbag.AddLocation ($$, PopLocation (), GetLocation ($8)); ++ } else { ++ report.Error (8174, GetLocation ($3), "A declaration of a by-reference variable must have an initializer"); ++ lbag.AddLocation ($$, GetLocation ($8)); ++ } ++ } + ; + + opt_local_variable_initializer +@@ -7731,7 +7840,7 @@ void Warning_EmptyStatement (Location loc) + + void Error_NamedArgumentExpected (NamedArgument a) + { +- report.Error (1738, a.Location, "Named arguments must appear after the positional arguments"); ++ report.Error (1738, a.Location, "Named arguments must appear after the positional arguments when using language version older than 7.2"); + } + + void Error_MissingInitializer (Location loc) +@@ -8255,6 +8364,7 @@ static string GetTokenName (int token) + case Token.CONTINUE: + return "continue"; + case Token.DEFAULT: ++ case Token.DEFAULT_VALUE: + return "default"; + case Token.DELEGATE: + return "delegate"; +@@ -8334,6 +8444,7 @@ static string GetTokenName (int token) + case Token.STATIC: + return "static"; + case Token.STRUCT: ++ case Token.REF_STRUCT: + return "struct"; + case Token.SWITCH: + return "switch"; +diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs +index d6d00d31400..37edb5c1224 100644 +--- a/mcs/mcs/cs-tokenizer.cs ++++ b/mcs/mcs/cs-tokenizer.cs +@@ -716,9 +716,18 @@ namespace Mono.CSharp + res = Token.EXTERN_ALIAS; + break; + case Token.DEFAULT: +- if (peek_token () == Token.COLON) { +- token (); +- res = Token.DEFAULT_COLON; ++ switch (peek_token ()) { ++ case Token.COLON: ++ // Special case: foo == null ? default : 1; ++ if (current_token != Token.INTERR) { ++ token (); ++ res = Token.DEFAULT_COLON; ++ } ++ break; ++ case Token.OPEN_PARENS: ++ case Token.OPEN_PARENS_CAST: ++ res = Token.DEFAULT_VALUE; ++ break; + } + break; + case Token.WHEN: +@@ -812,10 +821,12 @@ namespace Mono.CSharp + PushPosition (); + + next_token = token (); +- bool ok = (next_token == Token.CLASS) || +- (next_token == Token.STRUCT) || +- (next_token == Token.INTERFACE) || +- (next_token == Token.VOID); ++ bool ok = ++ next_token == Token.CLASS || ++ next_token == Token.STRUCT || ++ next_token == Token.INTERFACE || ++ next_token == Token.VOID || ++ next_token == Token.REF_STRUCT; + + PopPosition (); + +@@ -903,6 +914,12 @@ namespace Mono.CSharp + break; + } + ++ break; ++ case Token.REF: ++ if (peek_token () == Token.STRUCT) { ++ token (); ++ res = Token.REF_STRUCT; ++ } + break; + } + +@@ -1094,6 +1111,7 @@ namespace Mono.CSharp + case Token.UNCHECKED: + case Token.UNSAFE: + case Token.DEFAULT: ++ case Token.DEFAULT_VALUE: + case Token.AWAIT: + + // +@@ -1273,14 +1291,21 @@ namespace Mono.CSharp + + return false; + case Token.OPEN_PARENS: +- if (!parsing_generic_declaration) +- return false; +- ++ int parens_count = 1; + while (true) { + switch (token ()) { + case Token.COMMA: + // tuple declaration after < +- return true; ++ if (parens_count == 1) ++ return true; ++ continue; ++ case Token.OPEN_PARENS: ++ ++parens_count; ++ continue; ++ case Token.CLOSE_PARENS: ++ if (--parens_count <= 0) ++ return false; ++ continue; + case Token.OP_GENERICS_GT: + case Token.EOF: + return false; +@@ -1380,6 +1405,7 @@ namespace Mono.CSharp + case Token.NEW: + case Token.INTERPOLATED_STRING: + case Token.THROW: ++ case Token.DEFAULT_COLON: + next_token = Token.INTERR; + break; + +@@ -3502,6 +3528,7 @@ namespace Mono.CSharp + case Token.SWITCH: + case Token.USING: + case Token.DEFAULT: ++ case Token.DEFAULT_VALUE: + case Token.DELEGATE: + case Token.OP_GENERICS_GT: + case Token.REFVALUE: +@@ -3963,26 +3990,29 @@ namespace Mono.CSharp + { + int d; + +- // Save current position and parse next token. +- PushPosition (); +- int generic_dimension = 0; +- if (parse_less_than (ref generic_dimension)) { +- if (parsing_generic_declaration && (parsing_generic_declaration_doc || token () != Token.DOT)) { +- d = Token.OP_GENERICS_LT_DECL; +- } else { +- if (generic_dimension > 0) { +- val = generic_dimension; +- DiscardPosition (); +- return Token.GENERIC_DIMENSION; +- } ++ if (current_token != Token.OPERATOR) { ++ // Save current position and parse next token. ++ PushPosition (); ++ int generic_dimension = 0; ++ if (parse_less_than (ref generic_dimension)) { ++ if (parsing_generic_declaration && (parsing_generic_declaration_doc || token () != Token.DOT)) { ++ d = Token.OP_GENERICS_LT_DECL; ++ } else { ++ if (generic_dimension > 0) { ++ val = generic_dimension; ++ DiscardPosition (); ++ return Token.GENERIC_DIMENSION; ++ } + +- d = Token.OP_GENERICS_LT; ++ d = Token.OP_GENERICS_LT; ++ } ++ PopPosition (); ++ return d; + } ++ + PopPosition (); +- return d; + } + +- PopPosition (); + parsing_generic_less_than = 0; + + d = peek_char (); +diff --git a/mcs/mcs/delegate.cs b/mcs/mcs/delegate.cs +index 80eb7e265f1..52cee8f3455 100644 +--- a/mcs/mcs/delegate.cs ++++ b/mcs/mcs/delegate.cs +@@ -188,8 +188,8 @@ namespace Mono.CSharp { + + CheckProtectedModifier (); + +- if (Compiler.Settings.StdLib && ret_type.IsSpecialRuntimeType) { +- Method.Error1599 (Location, ret_type, Report); ++ if (ret_type.IsSpecialRuntimeType && Compiler.Settings.StdLib) { ++ Method.Error_ReturnTypeCantBeRefAny (Location, ret_type, Report); + return false; + } + +@@ -338,6 +338,8 @@ namespace Mono.CSharp { + Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder); + } else if (rtype.HasDynamicElement) { + Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder, rtype, Location); ++ } else if (rtype is ReadOnlyReferenceContainer) { ++ Module.PredefinedAttributes.IsReadOnly.EmitAttribute (CreateReturnBuilder ().Builder); + } + + if (rtype.HasNamedTupleElement) { +@@ -603,8 +605,14 @@ namespace Mono.CSharp { + } + + var expr = method_group.InstanceExpression; +- if (expr != null && (expr.Type.IsGenericParameter || !TypeSpec.IsReferenceType (expr.Type))) ++ if (expr != null && (expr.Type.IsGenericParameter || !TypeSpec.IsReferenceType (expr.Type))) { ++ if (expr.Type.IsByRefLike || expr.Type.IsSpecialRuntimeType) { ++ // CSC: Should be better error code ++ Error_ConversionFailed (ec, delegate_method, null); ++ } ++ + method_group.InstanceExpression = new BoxedCast (expr, ec.BuiltinTypes.Object); ++ } + + eclass = ExprClass.Value; + return this; +diff --git a/mcs/mcs/dynamic.cs b/mcs/mcs/dynamic.cs +index fd4662b2fed..f8314b2f3cd 100644 +--- a/mcs/mcs/dynamic.cs ++++ b/mcs/mcs/dynamic.cs +@@ -279,11 +279,19 @@ namespace Mono.CSharp + + protected bool DoResolveCore (ResolveContext rc) + { ++ int i = 0; + foreach (var arg in arguments) { + if (arg.Type == InternalType.VarOutType) { + // Should be special error message about dynamic dispatch + rc.Report.Error (8197, arg.Expr.Location, "Cannot infer the type of implicitly-typed out variable `{0}'", ((DeclarationExpression) arg.Expr).Variable.Name); ++ } else if (arg.Type == InternalType.DefaultType) { ++ rc.Report.Error (8311, arg.Expr.Location, "Cannot use a default literal as an argument to a dynamically dispatched operation"); + } ++ ++ // Forced limitation because Microsoft.CSharp needs to catch up ++ if (i > 0 && arguments [i - 1] is NamedArgument && !(arguments [i] is NamedArgument)) ++ rc.Report.Error (8324, loc, "Named argument specifications must appear after all fixed arguments have been specified in a dynamic invocation"); ++ ++i; + } + + if (rc.CurrentTypeParameters != null && rc.CurrentTypeParameters[0].IsMethodTypeParameter) +diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs +index 34ff9a30dab..20ee9e73b19 100644 +--- a/mcs/mcs/ecore.cs ++++ b/mcs/mcs/ecore.cs +@@ -255,7 +255,7 @@ namespace Mono.CSharp { + + public void Error_ExpressionMustBeConstant (ResolveContext rc, Location loc, string e_name) + { +- rc.Report.Error (133, loc, "The expression being assigned to `{0}' must be constant", e_name); ++ rc.Report.Error (133, loc, "The expression being assigned to `{0}' must be a constant or default value", e_name); + } + + public void Error_ConstantCanBeInitializedWithNullOnly (ResolveContext rc, TypeSpec type, Location loc, string name) +@@ -2957,6 +2957,13 @@ namespace Mono.CSharp { + if ((restrictions & MemberLookupRestrictions.NameOfExcluded) == 0 && Name == "nameof") + return new NameOf (this); + ++ if ((restrictions & MemberLookupRestrictions.ReadAccess) == 0 && Name == "_") { ++ if (rc.Module.Compiler.Settings.Version < LanguageVersion.V_7) ++ rc.Report.FeatureIsNotAvailable (rc.Module.Compiler, loc, "discards"); ++ ++ return new Discard (loc).Resolve (rc); ++ } ++ + if (errorMode) { + if (variable_found) { + rc.Report.Error (841, loc, "A local variable `{0}' cannot be used before it is declared", Name); +@@ -4029,6 +4036,13 @@ namespace Mono.CSharp { + return Methods.First ().GetSignatureForError (); + } + ++ static MethodSpec CandidateDevirtualization (TypeSpec type, MethodSpec method) ++ { ++ // Assumes no generics get involved ++ var filter = new MemberFilter (method.Name, method.Arity, MemberKind.Method, method.Parameters, null); ++ return MemberCache.FindMember (type, filter, BindingRestriction.InstanceOnly | BindingRestriction.OverrideOnly | BindingRestriction.DeclaredOnly) as MethodSpec; ++ } ++ + public override Expression CreateExpressionTree (ResolveContext ec) + { + if (best_candidate == null) { +@@ -4177,6 +4191,22 @@ namespace Mono.CSharp { + } + + InstanceExpression.Resolve (ec, ResolveFlags.VariableOrValue | ResolveFlags.MethodGroup | ResolveFlags.Type); ++ ++ var expr_type = InstanceExpression.Type; ++ if ((expr_type.IsByRefLike || expr_type.IsSpecialRuntimeType) && best_candidate.DeclaringType != expr_type) { ++ MethodSpec devirt = null; ++ if ((best_candidate.Modifiers & (Modifiers.VIRTUAL | Modifiers.ABSTRACT | Modifiers.OVERRIDE)) != 0) { ++ devirt = CandidateDevirtualization (expr_type, best_candidate); ++ } ++ ++ if (devirt == null) { ++ // CSC: Should be better error message ++ ec.Report.Error (29, InstanceExpression.Location, "Cannot implicitly convert type `{0}' to `{1}'", ++ InstanceExpression.Type.GetSignatureForError (), best_candidate.DeclaringType.GetSignatureForError ()); ++ } else { ++ best_candidate = devirt; ++ } ++ } + } + } + +@@ -5419,7 +5449,7 @@ namespace Mono.CSharp { + } + + if (arg_type != parameter) { +- if (arg_type == InternalType.VarOutType) ++ if (arg_type == InternalType.VarOutType || arg_type == InternalType.Discard) + return 0; + + var ref_arg_type = arg_type as ReferenceContainer; +@@ -6028,6 +6058,11 @@ namespace Mono.CSharp { + continue; + } + ++ if (arg_type == InternalType.Discard) { ++ a.Expr.Type = pt; ++ continue; ++ } ++ + var ref_arg_type = arg_type as ReferenceContainer; + if (ref_arg_type != null) { + if (ref_arg_type.Element != pt) +@@ -6061,9 +6096,15 @@ namespace Mono.CSharp { + else + ec.Report.SymbolRelatedToPreviousError (member); + +- ec.Report.Error (1744, na.Location, +- "Named argument `{0}' cannot be used for a parameter which has positional argument specified", +- na.Name); ++ if (name_index > a_idx) { ++ ec.Report.Error (8323, na.Location, ++ "Named argument `{0}' is used out of position but is followed by positional argument", ++ na.Name); ++ } else { ++ ec.Report.Error (1744, na.Location, ++ "Named argument `{0}' cannot be used for a parameter which has positional argument specified", ++ na.Name); ++ } + } + } + +@@ -7350,6 +7391,9 @@ namespace Mono.CSharp { + if (!ResolveGetter (ec)) + return null; + ++ if (type.Kind == MemberKind.ByRef) ++ return ByRefDereference.Create (this).Resolve (ec); ++ + return this; + } + +@@ -7359,12 +7403,11 @@ namespace Mono.CSharp { + Error_NullPropagatingLValue (rc); + + if (right_side == EmptyExpression.OutAccess) { +- if (best_candidate?.MemberType.Kind == MemberKind.ByRef) { +- if (Arguments?.ContainsEmitWithAwait () == true) { +- rc.Report.Error (8178, loc, "`await' cannot be used in an expression containing a call to `{0}' because it returns by reference", +- GetSignatureForError ()); +- } ++ if (OverloadResolve (rc, null) == null) ++ return null; + ++ if (best_candidate?.MemberType.Kind == MemberKind.ByRef) { ++ getter = CandidateToBaseOverride (rc, best_candidate.Get); + return this; + } + +@@ -7396,7 +7439,7 @@ namespace Mono.CSharp { + + if (best_candidate.MemberType.Kind == MemberKind.ByRef) { + getter = CandidateToBaseOverride (rc, best_candidate.Get); +- return ByRefDereference.Create(this).Resolve(rc); ++ return ByRefDereference.Create (this).Resolve (rc); + } + + rc.Report.Error (200, loc, "Property or indexer `{0}' cannot be assigned to (it is read-only)", +diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs +index 60e0c6d64a0..075697bb1df 100644 +--- a/mcs/mcs/eval.cs ++++ b/mcs/mcs/eval.cs +@@ -788,6 +788,7 @@ namespace Mono.CSharp + return null; + } + ++ module.CloseContainerEarlyForReflectionEmit (); + module.CloseContainer (); + if (host != null) + host.CloseContainer (); +diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs +index 732ee3ee934..518ccc8ef43 100644 +--- a/mcs/mcs/expression.cs ++++ b/mcs/mcs/expression.cs +@@ -1220,6 +1220,7 @@ namespace Mono.CSharp + expr = expr.ResolveLValue (ec, expr); + } else { + ec.Report.Error (1059, loc, "The operand of an increment or decrement operator must be a variable, property or indexer"); ++ return null; + } + + // +@@ -1477,6 +1478,11 @@ namespace Mono.CSharp + return null; + } + ++ if (expr.Type == InternalType.DefaultType) { ++ Error_OperatorCannotBeApplied (rc, loc, OperatorName, expr.Type); ++ return null; ++ } ++ + return this; + } + +@@ -4304,9 +4310,32 @@ namespace Mono.CSharp + CheckOutOfRangeComparison (ec, rc, left.Type); + } + +- if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic || right.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) ++ var ltype = left.Type; ++ var rtype = right.Type; ++ if (ltype.BuiltinType == BuiltinTypeSpec.Type.Dynamic || rtype.BuiltinType == BuiltinTypeSpec.Type.Dynamic) + return DoResolveDynamic (ec); + ++ // ++ // Only default with == and != is explicitly allowed ++ // ++ if (ltype == InternalType.DefaultType || rtype == InternalType.DefaultType) { ++ if ((Oper & Operator.EqualityMask) == 0) { ++ ec.Report.Error (8310, loc, "Operator `{0}' cannot be applied to operand `default'", OperName (Oper)); ++ return null; ++ } ++ ++ if (ltype == rtype) { ++ ec.Report.Error (8315, loc, "Operator `{0}' is ambiguous on operands `default' and `default'", OperName (Oper)); ++ return null; ++ } ++ ++ if (rtype == InternalType.DefaultType) { ++ right = new DefaultValueExpression (new TypeExpression (ltype, right.Location), right.Location).Resolve (ec); ++ } else { ++ left = new DefaultValueExpression (new TypeExpression (rtype, left.Location), left.Location).Resolve (ec); ++ } ++ } ++ + return DoResolveCore (ec, left, right); + } + +@@ -6744,10 +6773,14 @@ namespace Mono.CSharp + ec.Report.Error (1764, loc, + "Cannot use fixed variable `{0}' inside an anonymous method, lambda expression or query expression", + GetSignatureForError ()); +- } else if (local_info.IsByRef) { +- ec.Report.Error (8175, loc, +- "Cannot use by-reference variable `{0}' inside an anonymous method, lambda expression, or query expression", +- GetSignatureForError ()); ++ } else if (local_info.IsByRef || local_info.Type.IsByRefLike) { ++ if (ec.CurrentAnonymousMethod is StateMachineInitializer) { ++ // It's reported later as 4012/4013 ++ } else { ++ ec.Report.Error (8175, loc, ++ "Cannot use by-reference variable `{0}' inside an anonymous method, lambda expression, or query expression", ++ GetSignatureForError ()); ++ } + } + + if (ec.IsVariableCapturingRequired) { +@@ -6783,7 +6816,9 @@ namespace Mono.CSharp + local_info.SetIsUsed (); + + if (local_info.IsReadonly && !ec.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.UsingInitializerScope)) { +- if (rhs == EmptyExpression.LValueMemberAccess) { ++ if (local_info.IsByRef) { ++ // OK because it cannot be reassigned ++ } else if (rhs == EmptyExpression.LValueMemberAccess) { + // CS1654 already reported + } else { + int code; +@@ -7175,8 +7210,7 @@ namespace Mono.CSharp + { + var sn = expr as SimpleName; + if (sn != null && sn.Name == "var" && sn.Arity == 0 && arguments?.Count > 1) { +- var targets = new List (arguments.Count); +- var variables = new List (arguments.Count); ++ var variables = new List (arguments.Count); + foreach (var arg in arguments) { + var arg_sn = arg.Expr as SimpleName; + if (arg_sn == null || arg_sn.Arity != 0) { +@@ -7186,12 +7220,10 @@ namespace Mono.CSharp + + var lv = new LocalVariable (rc.CurrentBlock, arg_sn.Name, arg.Expr.Location); + rc.CurrentBlock.AddLocalName (lv); +- variables.Add (lv); +- +- targets.Add (new LocalVariableReference (lv, arg_sn.Location)); ++ variables.Add (new BlockVariable (new VarExpr (lv.Location), lv)); + } + +- var res = new TupleDeconstruct (targets, variables, right_side, loc); ++ var res = new TupleDeconstruct (variables, right_side, loc); + return res.Resolve (rc); + } + +@@ -7306,15 +7338,8 @@ namespace Mono.CSharp + + eclass = ExprClass.Value; + +- if (type.Kind == MemberKind.ByRef) { +- if (rhs == null && arguments?.ContainsEmitWithAwait () == true) { +- ec.Report.Error (8178, loc, "`await' cannot be used in an expression containing a call to `{0}' because it returns by reference", +- GetSignatureForError ()); +- } +- +- if (rhs != EmptyExpression.OutAccess) +- return ByRefDereference.Create (this).Resolve (ec); +- } ++ if (type.Kind == MemberKind.ByRef && rhs != EmptyExpression.OutAccess) ++ return ByRefDereference.Create (this).Resolve (ec); + + return this; + } +@@ -9034,7 +9059,7 @@ namespace Mono.CSharp + if (eclass == ExprClass.Unresolved) + ResolveBase (ec); + +- if (type.IsClass || type.IsReadOnly) { ++ if (type.IsClass || (type.IsReadOnly && !ec.HasSet (ResolveContext.Options.ConstructorScope))) { + if (right_side == EmptyExpression.UnaryAddress) + ec.Report.Error (459, loc, "Cannot take the address of `this' because it is read-only"); + else if (right_side == EmptyExpression.OutAccess) +@@ -9908,7 +9933,7 @@ namespace Mono.CSharp + public static bool IsValidDotExpression (TypeSpec type) + { + const MemberKind dot_kinds = MemberKind.Class | MemberKind.Struct | MemberKind.Delegate | MemberKind.Enum | +- MemberKind.Interface | MemberKind.TypeParameter | MemberKind.ArrayType; ++ MemberKind.Interface | MemberKind.TypeParameter | MemberKind.ArrayType | MemberKind.ByRef; + + return (type.Kind & dot_kinds) != 0 || type.BuiltinType == BuiltinTypeSpec.Type.Dynamic; + } +@@ -11614,7 +11639,7 @@ namespace Mono.CSharp + } + + if (single_spec != null && single_spec.Dimension > 0) { +- if (type.IsSpecialRuntimeType) { ++ if (type.IsSpecialRuntimeType || type.IsByRefLike) { + ec.Module.Compiler.Report.Error (611, loc, "Array elements cannot be of type `{0}'", type.GetSignatureForError ()); + } else if (type.IsStatic) { + ec.Module.Compiler.Report.SymbolRelatedToPreviousError (type); +@@ -11650,6 +11675,13 @@ namespace Mono.CSharp + class ReferenceTypeExpr : TypeExpr + { + FullNamedExpression element; ++ readonly bool readOnly; ++ ++ public ReferenceTypeExpr (FullNamedExpression element, bool readOnly, Location loc) ++ : this (element, loc) ++ { ++ this.readOnly = readOnly; ++ } + + public ReferenceTypeExpr (FullNamedExpression element, Location loc) + { +@@ -11664,14 +11696,17 @@ namespace Mono.CSharp + return null; + + eclass = ExprClass.Type; +- type = ReferenceContainer.MakeType (mc.Module, type); ++ type = readOnly ? ++ ReadOnlyReferenceContainer.MakeType (mc.Module, type) : ++ ReferenceContainer.MakeType (mc.Module, type); + + return type; + } + + public override string GetSignatureForError () + { +- return "ref " + element.GetSignatureForError (); ++ var prefix = readOnly ? "ref " : "ref readonly "; ++ return prefix + element.GetSignatureForError (); + } + + public override object Accept (StructuralVisitor visitor) +@@ -11783,6 +11818,7 @@ namespace Mono.CSharp + TypeSpec otype; + Expression texpr; + Expression count; ++ MethodSpec ctor; + + public StackAlloc (Expression type, Expression count, Location l) + { +@@ -11852,6 +11888,11 @@ namespace Mono.CSharp + int size = BuiltinTypeSpec.GetSize (otype); + + count.Emit (ec); ++ bool count_on_stack = false; ++ if (ctor != null && !ExpressionAnalyzer.IsInexpensiveLoad (count)) { ++ ec.Emit (OpCodes.Dup); ++ count_on_stack = true; ++ } + + if (size == 0) + ec.Emit (OpCodes.Sizeof, otype); +@@ -11860,6 +11901,19 @@ namespace Mono.CSharp + + ec.Emit (OpCodes.Mul_Ovf_Un); + ec.Emit (OpCodes.Localloc); ++ ++ if (ctor != null) { ++ if (!count_on_stack) ++ count.Emit (ec); ++ ec.Emit (OpCodes.Newobj, ctor); ++ } ++ } ++ ++ public override void Error_ValueCannotBeConverted (ResolveContext rc, TypeSpec target, bool expl) ++ { ++ var etype = ((PointerContainer)type).Element; ++ rc.Report.Error (8346, loc, "Cannot convert a stackalloc expression of type `{0}' to type `{1}'", ++ etype.GetSignatureForError (), target.GetSignatureForError ()); + } + + protected override void CloneTo (CloneContext clonectx, Expression t) +@@ -11873,6 +11927,16 @@ namespace Mono.CSharp + { + return visitor.Visit (this); + } ++ ++ public bool ResolveSpanConversion (ResolveContext rc, TypeSpec spanType) ++ { ++ ctor = MemberCache.FindMember (spanType, MemberFilter.Constructor (ParametersCompiled.CreateFullyResolved (PointerContainer.MakeType (rc.Module, rc.Module.Compiler.BuiltinTypes.Void), rc.Module.Compiler.BuiltinTypes.Int)), BindingRestriction.DeclaredOnly) as MethodSpec; ++ if (ctor == null) ++ return false; ++ ++ this.type = spanType; ++ return true; ++ } + } + + // +@@ -13093,6 +13157,12 @@ namespace Mono.CSharp + expr.Emit (ec); + } + ++ public override Expression CreateExpressionTree (ResolveContext rc) ++ { ++ rc.Report.Error (8153, Location, "An expression tree lambda cannot contain a call to a method, property, or indexer that returns by reference"); ++ return null; ++ } ++ + public void Emit (EmitContext ec, bool leave_copy) + { + Emit (ec); +@@ -13133,6 +13203,11 @@ namespace Mono.CSharp + + public override Expression DoResolveLValue (ResolveContext rc, Expression right_side) + { ++ if (expr.ContainsEmitWithAwait ()) { ++ rc.Report.Error (8178, loc, "`await' cannot be used in an expression containing a call to `{0}' because it returns by reference", ++ expr.GetSignatureForError ()); ++ } ++ + return DoResolve (rc); + } + +@@ -13149,4 +13224,98 @@ namespace Mono.CSharp + return visitor.Visit (this); + } + } ++ ++ class DefaultLiteralExpression : Expression ++ { ++ public DefaultLiteralExpression (Location loc) ++ { ++ this.loc = loc; ++ } ++ ++ public override Expression CreateExpressionTree (ResolveContext ec) ++ { ++ throw new NotImplementedException (); ++ } ++ ++ protected override Expression DoResolve (ResolveContext rc) ++ { ++ type = InternalType.DefaultType; ++ eclass = ExprClass.Value; ++ return this; ++ } ++ ++ public override void Emit (EmitContext ec) ++ { ++ throw new NotSupportedException (); ++ } ++ } ++ ++ class Discard : Expression, IAssignMethod, IMemoryLocation ++ { ++ public Discard (Location loc) ++ { ++ this.loc = loc; ++ } ++ ++ public override Expression CreateExpressionTree (ResolveContext rc) ++ { ++ rc.Report.Error (8207, loc, "An expression tree cannot contain a discard"); ++ return null; ++ } ++ ++ protected override Expression DoResolve (ResolveContext rc) ++ { ++ type = InternalType.Discard; ++ eclass = ExprClass.Variable; ++ return this; ++ } ++ ++ public override Expression DoResolveLValue (ResolveContext rc, Expression right_side) ++ { ++ if (right_side.Type == InternalType.DefaultType) { ++ rc.Report.Error (8183, loc, "Cannot infer the type of implicitly-typed discard"); ++ type = InternalType.ErrorType; ++ return this; ++ } ++ ++ if (right_side.Type.Kind == MemberKind.Void) { ++ rc.Report.Error (8209, loc, "Cannot assign void to a discard"); ++ type = InternalType.ErrorType; ++ return this; ++ } ++ ++ if (right_side != EmptyExpression.OutAccess) { ++ type = right_side.Type; ++ } ++ ++ return this; ++ } ++ ++ public override void Emit (EmitContext ec) ++ { ++ throw new NotImplementedException (); ++ } ++ ++ public void Emit (EmitContext ec, bool leave_copy) ++ { ++ throw new NotImplementedException (); ++ } ++ ++ public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound) ++ { ++ if (leave_copy) ++ source.Emit (ec); ++ else ++ source.EmitSideEffect (ec); ++ } ++ ++ public void AddressOf (EmitContext ec, AddressOp mode) ++ { ++ var temp = ec.GetTemporaryLocal (type); ++ ec.Emit (OpCodes.Ldloca, temp); ++ ++ // TODO: Should free it on next statement but don't have mechanism for that yet ++ // ec.FreeTemporaryLocal (temp, type); ++ } ++ } + } +diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs +index 625cd0c773f..ec2965df63b 100644 +--- a/mcs/mcs/generic.cs ++++ b/mcs/mcs/generic.cs +@@ -693,6 +693,11 @@ namespace Mono.CSharp { + GetSignatureForError (), mc.GetSignatureForError (), input_variance, gtype_variance, parameters); + } + ++ public TypeSpec GetAsyncMethodBuilder () ++ { ++ return null; ++ } ++ + public TypeSpec GetAttributeCoClass () + { + return null; +@@ -2292,7 +2297,7 @@ namespace Mono.CSharp { + ok = false; + } + +- if (te.IsPointer || te.IsSpecialRuntimeType) { ++ if (te.IsPointer || te.IsSpecialRuntimeType || te.IsByRefLike) { + ec.Module.Compiler.Report.Error (306, args[i].Location, + "The type `{0}' may not be used as a type argument", + te.GetSignatureForError ()); +@@ -3102,7 +3107,7 @@ namespace Mono.CSharp { + // + // Some types cannot be used as type arguments + // +- if ((bound.Type.Kind == MemberKind.Void && !voidAllowed) || bound.Type.IsPointer || bound.Type.IsSpecialRuntimeType || ++ if ((bound.Type.Kind == MemberKind.Void && !voidAllowed) || bound.Type.IsPointer || bound.Type.IsSpecialRuntimeType || bound.Type.IsByRefLike || + bound.Type == InternalType.MethodGroup || bound.Type == InternalType.AnonymousMethod || bound.Type == InternalType.VarOutType || + bound.Type == InternalType.ThrowExpr) + return; +@@ -3110,6 +3115,9 @@ namespace Mono.CSharp { + if (bound.Type.IsTupleType && TupleLiteral.ContainsNoTypeElement (bound.Type)) + return; + ++ if (bound.Type == InternalType.DefaultType) ++ return; ++ + var a = bounds [index]; + if (a == null) { + a = new List (2); +diff --git a/mcs/mcs/import.cs b/mcs/mcs/import.cs +index 1cddf7c01f4..f7c4fd74b08 100644 +--- a/mcs/mcs/import.cs ++++ b/mcs/mcs/import.cs +@@ -975,6 +975,10 @@ namespace Mono.CSharp + mod |= Modifiers.READONLY; + } + ++ if (HasAttribute (CustomAttributeData.GetCustomAttributes (type), "IsByRefLikeAttribute", CompilerServicesNamespace)) { ++ mod |= Modifiers.REF; ++ } ++ + break; + } + } +@@ -1401,6 +1405,7 @@ namespace Mono.CSharp + public string DefaultIndexerName; + public bool? CLSAttributeValue; + public TypeSpec CoClass; ++ public TypeSpec AsyncMethodBuilder; + + static bool HasMissingType (ConstructorInfo ctor) + { +@@ -1522,6 +1527,20 @@ namespace Mono.CSharp + bag.CoClass = importer.ImportType ((MetaType) a.ConstructorArguments[0].Value); + continue; + } ++ ++ if (name == "AsyncMethodBuilderAttribute") { ++ if (dt.Namespace != "System.Runtime.CompilerServices") ++ continue; ++ ++ if (HasMissingType (a.Constructor)) ++ continue; ++ ++ if (bag == null) ++ bag = new AttributesBag (); ++ ++ bag.AsyncMethodBuilder = importer.ImportType ((MetaType)a.ConstructorArguments [0].Value); ++ continue; ++ } + } + } + +@@ -2129,6 +2148,14 @@ namespace Mono.CSharp + } + } + ++ public TypeSpec GetAsyncMethodBuilder () ++ { ++ if (cattrs == null) ++ ReadAttributes (); ++ ++ return cattrs.AsyncMethodBuilder; ++ } ++ + public TypeSpec GetAttributeCoClass () + { + if (cattrs == null) +@@ -2445,6 +2472,11 @@ namespace Mono.CSharp + + #endregion + ++ public TypeSpec GetAsyncMethodBuilder () ++ { ++ return null; ++ } ++ + public TypeSpec GetAttributeCoClass () + { + return null; +diff --git a/mcs/mcs/membercache.cs b/mcs/mcs/membercache.cs +index eebf71b844b..ca05d2d7afc 100644 +--- a/mcs/mcs/membercache.cs ++++ b/mcs/mcs/membercache.cs +@@ -309,7 +309,6 @@ namespace Mono.CSharp { + // + if (!BuiltinTypeSpec.IsPrimitiveType (dt) || dt.BuiltinType == BuiltinTypeSpec.Type.Char) { + switch (dt.BuiltinType) { +- case BuiltinTypeSpec.Type.String: + case BuiltinTypeSpec.Type.Delegate: + case BuiltinTypeSpec.Type.MulticastDelegate: + break; +@@ -317,6 +316,9 @@ namespace Mono.CSharp { + if (name == Operator.GetMetadataName (Operator.OpType.Implicit) || name == Operator.GetMetadataName (Operator.OpType.Explicit)) { + state |= StateFlags.HasConversionOperator; + } else { ++ if (dt.BuiltinType == BuiltinTypeSpec.Type.String) ++ break; ++ + state |= StateFlags.HasUserOperator; + } + +diff --git a/mcs/mcs/method.cs b/mcs/mcs/method.cs +index ccd4898e91c..1fca10dd6d0 100644 +--- a/mcs/mcs/method.cs ++++ b/mcs/mcs/method.cs +@@ -701,6 +701,10 @@ namespace Mono.CSharp { + if (MemberType.IsStatic) { + Error_StaticReturnType (); + } ++ ++ if (MemberType.IsSpecialRuntimeType && Compiler.Settings.StdLib) { ++ Error_ReturnTypeCantBeRefAny (Location, ReturnType, Report); ++ } + } + + public override void Emit () +@@ -716,6 +720,8 @@ namespace Mono.CSharp { + Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder); + } else if (ReturnType.HasDynamicElement) { + Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder, ReturnType, Location); ++ } else if (ReturnType is ReadOnlyReferenceContainer) { ++ Module.PredefinedAttributes.IsReadOnly.EmitAttribute (CreateReturnBuilder ().Builder); + } + + if (ReturnType.HasNamedTupleElement) { +@@ -764,6 +770,11 @@ namespace Mono.CSharp { + GetSignatureForError ()); + } + ++ public static void Error_ReturnTypeCantBeRefAny (Location loc, TypeSpec t, Report Report) ++ { ++ Report.Error (1599, loc, "The return type of `{0}' is not allowed", t.GetSignatureForError ()); ++ } ++ + public bool IsPartialDefinition { + get { + return (ModFlags & Modifiers.PARTIAL) != 0 && Block == null; +@@ -1231,11 +1242,6 @@ namespace Mono.CSharp { + "Introducing `Finalize' method can interfere with destructor invocation. Did you intend to declare a destructor?"); + } + +- if (Compiler.Settings.StdLib && ReturnType.IsSpecialRuntimeType) { +- Error1599 (Location, ReturnType, Report); +- return false; +- } +- + if (CurrentTypeParameters == null) { + if (base_method != null && !IsExplicitImpl) { + if (parameters.Count == 1 && ParameterTypes[0].BuiltinType == BuiltinTypeSpec.Type.Object && MemberName.Name == "Equals") +@@ -1261,8 +1267,9 @@ namespace Mono.CSharp { + if ((ModFlags & Modifiers.ASYNC) != 0) { + if (ReturnType.Kind != MemberKind.Void && + ReturnType != Module.PredefinedTypes.Task.TypeSpec && +- !ReturnType.IsGenericTask) { +- Report.Error (1983, Location, "The return type of an async method must be void, Task, or Task"); ++ !ReturnType.IsGenericTask && ++ !ReturnType.IsCustomTaskType ()) { ++ Report.Error (1983, Location, "The return type of an async method must be void or task type"); + } + + block = (ToplevelBlock) block.ConvertToAsyncTask (this, Parent.PartialContainer, parameters, ReturnType, null, Location); +@@ -1396,11 +1403,6 @@ namespace Mono.CSharp { + return base.EnableOverloadChecks (overload); + } + +- public static void Error1599 (Location loc, TypeSpec t, Report Report) +- { +- Report.Error (1599, loc, "Method or delegate cannot return type `{0}'", t.GetSignatureForError ()); +- } +- + protected override bool ResolveMemberType () + { + if (CurrentTypeParameters != null) { +@@ -2467,6 +2469,8 @@ namespace Mono.CSharp { + Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder); + } else if (ReturnType.HasDynamicElement) { + Module.PredefinedAttributes.Dynamic.EmitAttribute (CreateReturnBuilder ().Builder, ReturnType, Location); ++ } else if (ReturnType is ReadOnlyReferenceContainer) { ++ Module.PredefinedAttributes.IsReadOnly.EmitAttribute (CreateReturnBuilder ().Builder); + } + + if (ReturnType.HasNamedTupleElement) { +diff --git a/mcs/mcs/modifiers.cs b/mcs/mcs/modifiers.cs +index bfae5985a03..926ab5d1848 100644 +--- a/mcs/mcs/modifiers.cs ++++ b/mcs/mcs/modifiers.cs +@@ -53,6 +53,7 @@ namespace Mono.CSharp + DEBUGGER_HIDDEN = 0x400000, + DEBUGGER_STEP_THROUGH = 0x800000, + AutoProperty = 0x1000000, ++ REF = 0x2000000, + + AccessibilityMask = PUBLIC | PROTECTED | INTERNAL | PRIVATE, + AllowedExplicitImplFlags = UNSAFE | EXTERN, +diff --git a/mcs/mcs/module.cs b/mcs/mcs/module.cs +index 00afac6c604..2293d825b36 100644 +--- a/mcs/mcs/module.cs ++++ b/mcs/mcs/module.cs +@@ -265,6 +265,7 @@ namespace Mono.CSharp + readonly Dictionary array_types; + readonly Dictionary pointer_types; + readonly Dictionary reference_types; ++ readonly Dictionary readonly_reference_types; + readonly Dictionary attrs_cache; + readonly Dictionary awaiters; + readonly Dictionary type_info_cache; +@@ -301,6 +302,7 @@ namespace Mono.CSharp + array_types = new Dictionary (); + pointer_types = new Dictionary (); + reference_types = new Dictionary (); ++ readonly_reference_types = new Dictionary (); + attrs_cache = new Dictionary (); + awaiters = new Dictionary (); + type_info_cache = new Dictionary (); +@@ -427,6 +429,12 @@ namespace Mono.CSharp + } + } + ++ internal Dictionary ReadonlyReferenceTypesCache { ++ get { ++ return readonly_reference_types; ++ } ++ } ++ + internal Dictionary TypeInfoCache { + get { + return type_info_cache; +diff --git a/mcs/mcs/parameter.cs b/mcs/mcs/parameter.cs +index 2bd2a498a91..cc10eee162b 100644 +--- a/mcs/mcs/parameter.cs ++++ b/mcs/mcs/parameter.cs +@@ -1447,7 +1447,7 @@ namespace Mono.CSharp { + + expr = Child; + +- if (!(expr is Constant || expr is DefaultValueExpression || (expr is New && ((New) expr).IsGeneratedStructConstructor))) { ++ if (!(expr is Constant || expr is DefaultValueExpression || expr is DefaultLiteralExpression || (expr is New && ((New) expr).IsGeneratedStructConstructor))) { + if (!(expr is ErrorExpression)) { + rc.Report.Error (1736, Location, + "The expression being assigned to optional parameter `{0}' must be a constant or default value", +diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs +index 58ba2795e4b..9c51128548f 100644 +--- a/mcs/mcs/statement.cs ++++ b/mcs/mcs/statement.cs +@@ -1160,7 +1160,8 @@ namespace Mono.CSharp { + // + if (ec.CurrentAnonymousMethod is AsyncInitializer) { + var storey = (AsyncTaskStorey) ec.CurrentAnonymousMethod.Storey; +- if (storey.ReturnType == ec.Module.PredefinedTypes.Task.TypeSpec) { ++ var s_return_type = storey.ReturnType; ++ if (s_return_type == ec.Module.PredefinedTypes.Task.TypeSpec) { + // + // Extra trick not to emit ret/leave inside awaiter body + // +@@ -1168,8 +1169,8 @@ namespace Mono.CSharp { + return true; + } + +- if (storey.ReturnType.IsGenericTask) +- block_return_type = storey.ReturnType.TypeArguments[0]; ++ if (s_return_type.IsGenericTask || (s_return_type.Arity == 1 && s_return_type.IsCustomTaskType ())) ++ block_return_type = s_return_type.TypeArguments[0]; + } + + if (ec.CurrentIterator != null) { +@@ -1220,7 +1221,7 @@ namespace Mono.CSharp { + return false; + } + +- if (!async_type.IsGenericTask) { ++ if (!async_type.IsGeneric) { + if (this is ContextualReturn) + return true; + +@@ -2368,7 +2369,12 @@ namespace Mono.CSharp { + if (initializer == null) + return null; + +- var c = initializer as Constant; ++ Constant c; ++ if (initializer.Type == InternalType.DefaultType) ++ c = New.Constantify (li.Type, initializer.Location); ++ else ++ c = initializer as Constant; ++ + if (c == null) { + initializer.Error_ExpressionMustBeConstant (bc, initializer.Location, li.Name); + return null; +@@ -2407,14 +2413,14 @@ namespace Mono.CSharp { + AddressTaken = 1 << 2, + CompilerGenerated = 1 << 3, + Constant = 1 << 4, +- ForeachVariable = 1 << 5, +- FixedVariable = 1 << 6, +- UsingVariable = 1 << 7, ++ ForeachVariable = 1 << 5 | ReadonlyMask, ++ FixedVariable = 1 << 6 | ReadonlyMask, ++ UsingVariable = 1 << 7 | ReadonlyMask, + IsLocked = 1 << 8, + SymbolFileHidden = 1 << 9, + ByRef = 1 << 10, + +- ReadonlyMask = ForeachVariable | FixedVariable | UsingVariable ++ ReadonlyMask = 1 << 20 + } + + TypeSpec type; +@@ -2534,7 +2540,7 @@ namespace Mono.CSharp { + + public bool IsFixed { + get { +- return (flags & Flags.FixedVariable) != 0; ++ return (flags & Flags.FixedVariable) == Flags.FixedVariable; + } + set { + flags = value ? flags | Flags.FixedVariable : flags & ~Flags.FixedVariable; +@@ -2672,7 +2678,7 @@ namespace Mono.CSharp { + + public string GetReadOnlyContext () + { +- switch (flags & Flags.ReadonlyMask) { ++ switch (flags & (Flags.ForeachVariable | Flags.FixedVariable | Flags.UsingVariable)) { + case Flags.FixedVariable: + return "fixed variable"; + case Flags.ForeachVariable: +@@ -8191,7 +8197,9 @@ namespace Mono.CSharp { + } + + if (iface_candidate == null) { +- if (expr.Type != InternalType.ErrorType) { ++ if (expr.Type == InternalType.DefaultType) { ++ rc.Report.Error (8312, loc, "Use of default literal is not valid in this context"); ++ } else if (expr.Type != InternalType.ErrorType) { + rc.Report.Error (1579, loc, + "foreach statement cannot operate on variables of type `{0}' because it does not contain a definition for `{1}' or is inaccessible", + expr.Type.GetSignatureForError (), "GetEnumerator"); +diff --git a/mcs/mcs/tuples.cs b/mcs/mcs/tuples.cs +index bb7faf734df..901efdc9541 100644 +--- a/mcs/mcs/tuples.cs ++++ b/mcs/mcs/tuples.cs +@@ -432,7 +432,7 @@ namespace Mono.CSharp + { + Expression source; + List targetExprs; +- List variablesToInfer; ++ List variables; + Expression instance; + + public TupleDeconstruct (List targetExprs, Expression source, Location loc) +@@ -442,10 +442,11 @@ namespace Mono.CSharp + this.loc = loc; + } + +- public TupleDeconstruct (List targetExprs, List variables, Expression source, Location loc) +- : this (targetExprs, source, loc) ++ public TupleDeconstruct (List variables, Expression source, Location loc) + { +- this.variablesToInfer = variables; ++ this.source = source; ++ this.variables = variables; ++ this.loc = loc; + } + + public override Expression CreateExpressionTree (ResolveContext ec) +@@ -469,9 +470,18 @@ namespace Mono.CSharp + var src_type = src.Type; + + if (src_type.IsTupleType) { +- if (src_type.Arity != targetExprs.Count) { ++ int target_count; ++ ++ if (targetExprs == null) { ++ target_count = variables.Count; ++ targetExprs = new List (target_count); ++ } else { ++ target_count = targetExprs.Count; ++ } ++ ++ if (src_type.Arity != target_count) { + rc.Report.Error (8132, loc, "Cannot deconstruct a tuple of `{0}' elements into `{1}' variables", +- src_type.Arity.ToString (), targetExprs.Count.ToString ()); ++ src_type.Arity.ToString (CultureInfo.InvariantCulture), target_count.ToString (CultureInfo.InvariantCulture)); + return null; + } + +@@ -482,27 +492,44 @@ namespace Mono.CSharp + instance = expr_variable.CreateReferenceExpression (rc, loc); + } + +- for (int i = 0; i < targetExprs.Count; ++i) { ++ for (int i = 0; i < target_count; ++i) { + var tle = src_type.TypeArguments [i]; + +- var lv = variablesToInfer? [i]; +- if (lv != null) { +- if (InternalType.HasNoType (tle)) { +- rc.Report.Error (8130, Location, "Cannot infer the type of implicitly-typed deconstruction variable `{0}'", lv.Name); +- lv.Type = InternalType.ErrorType; ++ if (variables != null) { ++ var variable = variables [i].Variable; ++ ++ if (variable.Type == InternalType.Discard) { ++ variables [i] = null; ++ targetExprs.Add (EmptyExpressionStatement.Instance); + continue; + } + +- lv.Type = tle; +- lv.PrepareAssignmentAnalysis ((BlockContext) rc); +- } ++ var variable_type = variables [i].TypeExpression; ++ ++ targetExprs.Add (new LocalVariableReference (variable, variable.Location)); ++ ++ if (variable_type is VarExpr) { ++ if (InternalType.HasNoType (tle)) { ++ rc.Report.Error (8130, Location, "Cannot infer the type of implicitly-typed deconstruction variable `{0}'", variable.Name); ++ tle = InternalType.ErrorType; ++ } + ++ variable.Type = tle; ++ } else { ++ variable.Type = variable_type.ResolveAsType (rc); ++ } ++ ++ variable.PrepareAssignmentAnalysis ((BlockContext)rc); ++ } + + var element_src = tupleLiteral == null ? new MemberAccess (instance, NamedTupleSpec.GetElementPropertyName (i)) : tupleLiteral.Elements [i].Expr; + targetExprs [i] = new SimpleAssign (targetExprs [i], element_src).Resolve (rc); + } + + eclass = ExprClass.Value; ++ ++ // TODO: The type is same only if there is no target element conversion ++ // var res = (/*byte*/ b, /*short*/ s) = (2, 4); + type = src.Type; + return this; + } +@@ -527,11 +554,24 @@ namespace Mono.CSharp + + public override void Emit (EmitContext ec) + { +- throw new NotImplementedException (); ++ if (instance != null) ++ ((ExpressionStatement)source).EmitStatement (ec); ++ ++ foreach (ExpressionStatement expr in targetExprs) ++ expr.Emit (ec); ++ ++ var ctor = MemberCache.FindMember (type, MemberFilter.Constructor (null), BindingRestriction.DeclaredOnly | BindingRestriction.InstanceOnly) as MethodSpec; ++ ec.Emit (OpCodes.Newobj, ctor); + } + + public override void EmitStatement (EmitContext ec) + { ++ if (variables != null) { ++ foreach (var lv in variables) { ++ lv?.Variable.CreateBuilder (ec); ++ } ++ } ++ + if (instance != null) + ((ExpressionStatement) source).EmitStatement (ec); + +@@ -549,9 +589,6 @@ namespace Mono.CSharp + if (leave_copy) + throw new NotImplementedException (); + +- foreach (var lv in variablesToInfer) +- lv.CreateBuilder (ec); +- + EmitStatement (ec); + } + +@@ -563,11 +600,11 @@ namespace Mono.CSharp + + public void SetGeneratedFieldAssigned (FlowAnalysisContext fc) + { +- if (variablesToInfer == null) ++ if (variables == null) + return; + +- foreach (var lv in variablesToInfer) +- fc.SetVariableAssigned (lv.VariableInfo); ++ foreach (var lv in variables) ++ fc.SetVariableAssigned (lv.Variable.VariableInfo); + } + } + } +\ No newline at end of file +diff --git a/mcs/mcs/typemanager.cs b/mcs/mcs/typemanager.cs +index b6aff14e1c0..7a16cda2774 100644 +--- a/mcs/mcs/typemanager.cs ++++ b/mcs/mcs/typemanager.cs +@@ -242,6 +242,7 @@ namespace Mono.CSharp + + // C# 7.0 + public readonly PredefinedType[] Tuples; ++ public readonly PredefinedType SpanGeneric; + + public PredefinedTypes (ModuleContainer module) + { +@@ -301,6 +302,8 @@ namespace Mono.CSharp + FormattableString = new PredefinedType (module, MemberKind.Class, "System", "FormattableString"); + FormattableStringFactory = new PredefinedType (module, MemberKind.Class, "System.Runtime.CompilerServices", "FormattableStringFactory"); + ++ SpanGeneric = new PredefinedType (module, MemberKind.Struct, "System", "Span", 1); ++ + // + // Define types which are used for comparison. It does not matter + // if they don't exist as no error report is needed +@@ -348,6 +351,8 @@ namespace Mono.CSharp + if (pt.Define ()) + pt.TypeSpec.IsTupleType = true; + } ++ ++ SpanGeneric.Define (); + } + } + +@@ -430,6 +435,7 @@ namespace Mono.CSharp + ArrayEmpty = new PredefinedMember (module, types.Array, + MemberFilter.Method ("Empty", 1, ParametersCompiled.EmptyReadOnlyParameters, null)); + ++ // TODO: Must me static + AsyncTaskMethodBuilderCreate = new PredefinedMember (module, types.AsyncTaskMethodBuilder, + MemberFilter.Method ("Create", 0, ParametersCompiled.EmptyReadOnlyParameters, types.AsyncTaskMethodBuilder.TypeSpec)); + +@@ -485,6 +491,7 @@ namespace Mono.CSharp + AsyncTaskMethodBuilderTask = new PredefinedMember (module, types.AsyncTaskMethodBuilder, + MemberFilter.Property ("Task", null)); + ++ // TODO: Must me static + AsyncTaskMethodBuilderGenericCreate = new PredefinedMember (module, types.AsyncTaskMethodBuilderGeneric, + MemberFilter.Method ("Create", 0, ParametersCompiled.EmptyReadOnlyParameters, types.AsyncVoidMethodBuilder.TypeSpec)); + +@@ -542,6 +549,7 @@ namespace Mono.CSharp + AsyncTaskMethodBuilderGenericTask = new PredefinedMember (module, types.AsyncTaskMethodBuilderGeneric, + MemberFilter.Property ("Task", null)); + ++ // TODO: Must me static + AsyncVoidMethodBuilderCreate = new PredefinedMember (module, types.AsyncVoidMethodBuilder, + MemberFilter.Method ("Create", 0, ParametersCompiled.EmptyReadOnlyParameters, types.AsyncVoidMethodBuilder.TypeSpec)); + +@@ -1006,9 +1014,6 @@ namespace Mono.CSharp + + public T Resolve (Location loc) + { +- if (member != null) +- return member; +- + if (Get () != null) + return member; + +diff --git a/mcs/mcs/typespec.cs b/mcs/mcs/typespec.cs +index d14e1ead3e3..a58a0fe5178 100644 +--- a/mcs/mcs/typespec.cs ++++ b/mcs/mcs/typespec.cs +@@ -225,6 +225,8 @@ namespace Mono.CSharp + } + } + ++ public bool IsByRefLike => (modifiers & Modifiers.REF) != 0; ++ + // + // Returns true for instances of System.Threading.Tasks.Task + // +@@ -1452,6 +1454,7 @@ namespace Mono.CSharp + int TypeParametersCount { get; } + TypeParameterSpec[] TypeParameters { get; } + ++ TypeSpec GetAsyncMethodBuilder (); + TypeSpec GetAttributeCoClass (); + string GetAttributeDefaultMember (); + AttributeUsageAttribute GetAttributeUsage (PredefinedAttribute pa); +@@ -1461,6 +1464,29 @@ namespace Mono.CSharp + + class InternalType : TypeSpec, ITypeDefinition + { ++ sealed class InternalTypeAssembly : IAssemblyDefinition ++ { ++ public static readonly InternalTypeAssembly Instance = new InternalTypeAssembly (); ++ ++ public string FullName => throw new NotImplementedException (); ++ ++ public bool IsCLSCompliant => false; ++ ++ public bool IsMissing => false; ++ ++ public string Name => throw new NotImplementedException (); ++ ++ public byte [] GetPublicKeyToken () ++ { ++ throw new NotImplementedException (); ++ } ++ ++ public bool IsFriendAssemblyTo (IAssemblyDefinition assembly) ++ { ++ return false; ++ } ++ } ++ + public static readonly InternalType AnonymousMethod = new InternalType ("anonymous method"); + public static readonly InternalType Arglist = new InternalType ("__arglist"); + public static readonly InternalType MethodGroup = new InternalType ("method group"); +@@ -1470,6 +1496,8 @@ namespace Mono.CSharp + public static readonly InternalType ErrorType = new InternalType (""); + public static readonly InternalType VarOutType = new InternalType ("var out"); + public static readonly InternalType ThrowExpr = new InternalType ("throw expression"); ++ public static readonly InternalType DefaultType = new InternalType ("default"); ++ public static readonly InternalType Discard = new InternalType ("discard"); + + readonly string name; + +@@ -1494,7 +1522,7 @@ namespace Mono.CSharp + + IAssemblyDefinition ITypeDefinition.DeclaringAssembly { + get { +- throw new NotImplementedException (); ++ return InternalTypeAssembly.Instance; + } + } + +@@ -1561,6 +1589,11 @@ namespace Mono.CSharp + + #region ITypeDefinition Members + ++ TypeSpec ITypeDefinition.GetAsyncMethodBuilder () ++ { ++ return null; ++ } ++ + TypeSpec ITypeDefinition.GetAttributeCoClass () + { + return null; +@@ -1614,7 +1647,7 @@ namespace Mono.CSharp + + public static bool HasNoType (TypeSpec type) + { +- return type == AnonymousMethod || type == MethodGroup || type == NullLiteral || type == ThrowExpr; ++ return type == AnonymousMethod || type == MethodGroup || type == NullLiteral || type == ThrowExpr || type == DefaultType; + } + } + +@@ -1749,6 +1782,11 @@ namespace Mono.CSharp + } + } + ++ public TypeSpec GetAsyncMethodBuilder () ++ { ++ return null; ++ } ++ + public TypeSpec GetAttributeCoClass () + { + return Element.MemberDefinition.GetAttributeCoClass (); +@@ -1996,9 +2034,10 @@ namespace Mono.CSharp + [System.Diagnostics.DebuggerDisplay("{DisplayDebugInfo()}")] + class ReferenceContainer : ElementTypeSpec + { +- ReferenceContainer (TypeSpec element) ++ protected ReferenceContainer (TypeSpec element) + : base (MemberKind.ByRef, element, null) + { ++ cache = null; + } + + public override IList Interfaces { +@@ -2039,6 +2078,39 @@ namespace Mono.CSharp + + return pc; + } ++ ++ protected override void InitializeMemberCache(bool onlyTypes) ++ { ++ cache = Element.MemberCache; ++ } ++ } ++ ++ [System.Diagnostics.DebuggerDisplay ("{DisplayDebugInfo()}")] ++ class ReadOnlyReferenceContainer : ReferenceContainer ++ { ++ public ReadOnlyReferenceContainer (TypeSpec element) ++ : base (element) ++ { ++ } ++ ++ string DisplayDebugInfo () ++ { ++ return "ref readonly " + GetSignatureForError (); ++ } ++ ++ public new static ReferenceContainer MakeType (ModuleContainer module, TypeSpec element) ++ { ++ if (element.Kind == MemberKind.ByRef) ++ throw new ArgumentException (); ++ ++ ReadOnlyReferenceContainer pc; ++ if (!module.ReadonlyReferenceTypesCache.TryGetValue (element, out pc)) { ++ pc = new ReadOnlyReferenceContainer (element); ++ module.ReadonlyReferenceTypesCache.Add (element, pc); ++ } ++ ++ return pc; ++ } + } + + class PointerContainer : ElementTypeSpec +diff --git a/mcs/tests/gtest-409.cs b/mcs/tests/gtest-409.cs +index 8db59d7e48d..606ae3685d1 100644 +--- a/mcs/tests/gtest-409.cs ++++ b/mcs/tests/gtest-409.cs +@@ -1,3 +1,4 @@ ++// Compiler options: -langversion:latest + using System; + + // +@@ -175,6 +176,11 @@ public class ConditionalParsing + var x = args ?.2f : -.2f; + } + ++ void Test_23 (string args) ++ { ++ var x = args == null ? default : 1; ++ } ++ + static void Helper (T arg) + { + } +diff --git a/mcs/tests/test-948.cs b/mcs/tests/test-948.cs +new file mode 100644 +index 00000000000..34b3ab9a0c4 +--- /dev/null ++++ b/mcs/tests/test-948.cs +@@ -0,0 +1,16 @@ ++// Compiler options: -langversion:7.2 -unsafe ++ ++using System; ++ ++class X ++{ ++ public static void Main () ++ { ++ Span stackSpan = stackalloc int[100]; ++ } ++ ++ unsafe void Foo () ++ { ++ ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-async-94.cs b/mcs/tests/test-async-94.cs +new file mode 100644 +index 00000000000..ce9a30409bb +--- /dev/null ++++ b/mcs/tests/test-async-94.cs +@@ -0,0 +1,127 @@ ++using System; ++using System.Threading.Tasks; ++using System.Runtime.CompilerServices; ++ ++[AsyncMethodBuilder (typeof(MyTaskMethodBuilder<>))] ++class MyTask ++{ ++} ++ ++[AsyncMethodBuilder (typeof(MyTaskMethodBuilder))] ++class MyTask ++{ ++} ++ ++class MyTaskMethodBuilder ++{ ++ public static MyTaskMethodBuilder Create() ++ { ++ return null; ++ } ++ ++ public MyTask Task { ++ get { ++ return null; ++ } ++ } ++ ++ public void SetException (Exception exception) ++ { ++ ++ } ++ ++ public void SetResult () ++ { ++ ++ } ++ ++ public void AwaitOnCompleted (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine ++ { ++ ++ } ++ ++ public void AwaitUnsafeOnCompleted (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine ++ { ++ ++ } ++ ++ public void Start (ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine ++ { ++ ++ } ++ ++ public void SetStateMachine (IAsyncStateMachine stateMachine) ++ { ++ ++ } ++} ++ ++class MyTaskMethodBuilder ++{ ++ public static MyTaskMethodBuilder Create() ++ { ++ return null; ++ } ++ ++ public MyTask Task { ++ get { ++ return null; ++ } ++ } ++ ++ public void SetException (Exception exception) ++ { ++ ++ } ++ ++ public void SetResult (T result) ++ { ++ ++ } ++ ++ public void AwaitOnCompleted (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine ++ { ++ ++ } ++ ++ public void AwaitUnsafeOnCompleted (ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine ++ { ++ ++ } ++ ++ public void Start (ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine ++ { ++ ++ } ++ ++ public void SetStateMachine (IAsyncStateMachine stateMachine) ++ { ++ ++ } ++} ++ ++class X ++{ ++ public async MyTask Test () ++ { ++ await Task.Delay (1); ++ } ++ ++ public async MyTask Test2 () ++ { ++ await Task.Delay (1); ++ return 2; ++ } ++ ++ public async ValueTask Test3 () ++ { ++ await Task.Delay (1); ++ return "as"; ++ } ++ ++ public static void Main () ++ { ++ var x = new X (); ++ var r1 = x.Test3 ().Result; ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-default-01.cs b/mcs/tests/test-default-01.cs +new file mode 100644 +index 00000000000..823e33c451b +--- /dev/null ++++ b/mcs/tests/test-default-01.cs +@@ -0,0 +1,52 @@ ++// Compiler options: -langversion:latest ++ ++static class X ++{ ++ const int c1 = default; ++ const int c2 = default (int); ++ ++ public static void Main () ++ { ++ int a = default; ++ var b = (int) default; ++ const int c = default; ++ var d = new[] { 1, default }; ++ dynamic e = default; ++ int f = checked (default); ++ (int a, int b) g = (1, default); ++ var h = 1 != default; ++ var i = default == M4 (); ++ } ++ ++ static int M1 () ++ { ++ return default; ++ } ++ ++ static void M2 () ++ { ++ try { ++ throw new System.Exception (); ++ } catch (System.Exception) when (default) { ++ } ++ ++ if (default) { ++ } ++ } ++ ++ static void M3 (int x = default) ++ { ++ } ++ ++ static System.Func M4 () ++ { ++ return () => default; ++ } ++} ++/* ++enum E ++{ ++ A = default, ++ B = default + 1 ++} ++*/ +\ No newline at end of file +diff --git a/mcs/tests/test-default-02.cs b/mcs/tests/test-default-02.cs +new file mode 100644 +index 00000000000..0039782e5f2 +--- /dev/null ++++ b/mcs/tests/test-default-02.cs +@@ -0,0 +1,33 @@ ++// Compiler options: -langversion:latest ++ ++class C ++{ ++ static void Main() ++ { ++ M (default, 1); ++ ++ M2 (default); ++ M2 (null); ++ ++ var res = Test (default); ++ } ++ ++ ++ static void M (T x, T y) ++ { ++ } ++ ++ static void M2 (params object[] x) ++ { ++ } ++ ++ static byte[] Test (S x) ++ { ++ return null; ++ } ++} ++ ++struct S ++{ ++ ++} +\ No newline at end of file +diff --git a/mcs/tests/test-discards-01.cs b/mcs/tests/test-discards-01.cs +new file mode 100644 +index 00000000000..54cf29779c6 +--- /dev/null ++++ b/mcs/tests/test-discards-01.cs +@@ -0,0 +1,36 @@ ++using System; ++ ++class X ++{ ++ public static void Main () ++ { ++ string s = null; ++ ++ _ = 1; ++ { ++ char _ = '4'; ++ } ++ ++ _ = TestValue (); ++ ++ _ = _ = s; ++ ++ byte k1; ++ var s1 = (k1, _) = (1, s); ++ ++ Func l1 = () => _ = (_, _) = (1, s); ++ ++ TryGetValue (out _); ++ } ++ ++ static bool TryGetValue (out int arg) ++ { ++ arg = 3; ++ return true; ++ } ++ ++ static int TestValue () ++ { ++ return 4; ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-named-11.cs b/mcs/tests/test-named-11.cs +new file mode 100644 +index 00000000000..a01d2883b9c +--- /dev/null ++++ b/mcs/tests/test-named-11.cs +@@ -0,0 +1,13 @@ ++// Compiler options: -langversion:7.2 ++ ++class X ++{ ++ public static void Main () ++ { ++ Test (arg: 1, ""); ++ } ++ ++ static void Test (int arg, string str) ++ { ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-readonly-02.cs b/mcs/tests/test-readonly-02.cs +new file mode 100644 +index 00000000000..231b8cd8fda +--- /dev/null ++++ b/mcs/tests/test-readonly-02.cs +@@ -0,0 +1,27 @@ ++// Compiler options: -langversion:latest ++using System; ++ ++public delegate ref readonly int D (int x); ++ ++class X ++{ ++ public static void Main () ++ { ++ ++ } ++ ++ Guid g; ++ ++ ref readonly Guid TestMethod () ++ { ++ return ref g; ++ } ++ ++ ref readonly Guid TestProp { ++ get { ++ ref readonly var rg = ref g; ++ return ref rg; ++ } ++ } ++ ++} +\ No newline at end of file +diff --git a/mcs/tests/test-readonly-03.cs b/mcs/tests/test-readonly-03.cs +new file mode 100644 +index 00000000000..14cb958b41a +--- /dev/null ++++ b/mcs/tests/test-readonly-03.cs +@@ -0,0 +1,16 @@ ++// Compiler options: -langversion:latest ++using System; ++ ++readonly struct S ++{ ++ static S shared = new S (); ++ ++ public S (int arg) ++ { ++ this = shared; ++ } ++ ++ public static void Main () ++ { ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-ref-07.cs b/mcs/tests/test-ref-07.cs +new file mode 100644 +index 00000000000..4aa16579752 +--- /dev/null ++++ b/mcs/tests/test-ref-07.cs +@@ -0,0 +1,30 @@ ++// Compiler options: -langversion:latest ++ ++public readonly partial ref struct Test ++{ ++ public static void Main () ++ { ++ var m = new Test (); ++ m.Method (); ++ } ++ ++ Test Method () ++ { ++ return new Test (); ++ } ++} ++ ++ref struct Second ++{ ++ Test field; ++} ++ ++public abstract class P ++{ ++ public abstract Test Span { get; } ++} ++ ++public interface II ++{ ++ Test Span { get; } ++} +diff --git a/mcs/tests/test-ref-08.cs b/mcs/tests/test-ref-08.cs +new file mode 100644 +index 00000000000..f4ff50f4c5c +--- /dev/null ++++ b/mcs/tests/test-ref-08.cs +@@ -0,0 +1,101 @@ ++using System; ++ ++namespace ClassLibrary1 ++{ ++ public class C ++ { ++ ++ class B ++ { ++ int v; ++ public ref int this[int index] ++ { ++ get ++ { ++ return ref v; ++ } ++ } ++ } ++ ++ ++ class Gen where T : struct ++ { ++ T v; ++ public ref T this[int index] ++ { ++ get ++ { ++ return ref v; ++ } ++ } ++ } ++ ++ struct Val ++ { ++ } ++ ++ class BB ++ { ++ Val v; ++ public ref Val this[int index] ++ { ++ get ++ { ++ return ref v; ++ } ++ } ++ } ++ ++ void MM () ++ { ++ var bbb = new BB(); ++ Val v1 = bbb[0]; ++ bbb[1] = v1; ++ ++ ref Val v2 = ref bbb[2]; ++ bbb[2] = v2; ++ } ++ ++ static int[] a = new int[1]; ++ public static void Main() ++ { ++ var bb = new B(); ++ int b = 1; ++ bb[0] = b; ++ a[0] = Add2(ref b, 2); ++ ++ var bbb = new BB(); ++ bbb[0] = new Val(); ++ ++ var v = new Val(); ++ bbb[1] = v; ++ ++ var v2 = bbb[2]; ++ ++ bbb[3] = v2; ++ ++ ++ bbb[3] = bbb[2]; ++ ++ ++ ++ var ggg = new Gen(); ++ ggg[0] = new Val(); ++ ++ var g = new Val(); ++ ggg[1] = v; ++ ++ var g2 = ggg[2]; ++ ++ ggg[3] = v2; ++ ++ ++ ggg[3] = ggg[2]; ++ } ++ ++ public static ref int Add2(ref int a, int b) ++ { ++ return ref a; ++ } ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-ref-09.cs b/mcs/tests/test-ref-09.cs +new file mode 100644 +index 00000000000..5d0e89e5c1a +--- /dev/null ++++ b/mcs/tests/test-ref-09.cs +@@ -0,0 +1,12 @@ ++struct rigidbody { public float x; } ++ ++class Program ++{ ++ static rigidbody a; ++ static ref rigidbody property_returning_struct_by_ref => ref a; ++ ++ static void Main() ++ { ++ System.Console.WriteLine (property_returning_struct_by_ref.x); ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-ref-10.cs b/mcs/tests/test-ref-10.cs +new file mode 100644 +index 00000000000..88e201d3174 +--- /dev/null ++++ b/mcs/tests/test-ref-10.cs +@@ -0,0 +1,24 @@ ++// Compiler options: -langversion:latest ++ ++using System; ++ ++ref struct ValueStringBuilder ++{ ++ public override string ToString () ++ { ++ return "aaa"; ++ } ++} ++ ++ ++class X ++{ ++ public static int Main () ++ { ++ var s = new ValueStringBuilder (); ++ if (s.ToString () != "aaa") ++ return 1; ++ ++ return 0; ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-tuple-07.cs b/mcs/tests/test-tuple-07.cs +new file mode 100644 +index 00000000000..cc7ce5837ce +--- /dev/null ++++ b/mcs/tests/test-tuple-07.cs +@@ -0,0 +1,16 @@ ++using System; ++using System.Collections.Generic; ++ ++// Parser tests ++ ++class ParserTest ++{ ++ IEnumerable<(Object vertex, int distance)> Test () ++ { ++ return null; ++ } ++ ++ public static void Main () ++ { ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-tuple-09.cs b/mcs/tests/test-tuple-09.cs +new file mode 100644 +index 00000000000..3f15cae6cf1 +--- /dev/null ++++ b/mcs/tests/test-tuple-09.cs +@@ -0,0 +1,19 @@ ++using System; ++ ++class TupleDeconstructionDeclaration ++{ ++ public static int Main () ++ { ++ (string s, long l) = GetValues (); ++ (var vs, var vl) = GetValues (); ++ (object o, var vl2) = GetValues (); ++ (string ds, _) = GetValues (); ++ ++ return 0; ++ } ++ ++ static (string, long) GetValues () ++ { ++ return ("a", 3); ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/ver-il-net_4_x.xml b/mcs/tests/ver-il-net_4_x.xml +index c2c98123305..4dbc7042a8a 100644 +--- a/mcs/tests/ver-il-net_4_x.xml ++++ b/mcs/tests/ver-il-net_4_x.xml +@@ -14659,6 +14659,9 @@ + + 24 + ++ ++ 16 ++ + + + +@@ -52808,6 +52811,19 @@ + + + ++ ++ ++ ++ 16 ++ ++ ++ 2 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -66893,6 +66909,117 @@ + + + ++ ++ ++ ++ 7 ++ ++ ++ ++ ++ 7 ++ ++ ++ ++ ++ 10 ++ ++ ++ 10 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 7 ++ ++ ++ ++ ++ 10 ++ ++ ++ 10 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 7 ++ ++ ++ ++ ++ 33 ++ ++ ++ 33 ++ ++ ++ 33 ++ ++ ++ 23 ++ ++ ++ 7 ++ ++ ++ ++ ++ 157 ++ ++ ++ 13 ++ ++ ++ ++ ++ 165 ++ ++ ++ 13 ++ ++ ++ ++ ++ 169 ++ ++ ++ 13 ++ ++ ++ + + + +@@ -68527,6 +68654,47 @@ + + + ++ ++ ++ ++ 53 ++ ++ ++ 10 ++ ++ ++ 31 ++ ++ ++ 2 ++ ++ ++ 38 ++ ++ ++ 9 ++ ++ ++ ++ ++ ++ ++ 36 ++ ++ ++ 2 ++ ++ ++ 2 ++ ++ ++ 7 ++ ++ ++ 10 ++ ++ ++ + + + +@@ -68610,6 +68778,30 @@ + + + ++ ++ ++ ++ 63 ++ ++ ++ 13 ++ ++ ++ 10 ++ ++ ++ 7 ++ ++ ++ ++ ++ 25 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -70689,6 +70881,19 @@ + + + ++ ++ ++ ++ 13 ++ ++ ++ 2 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -72778,6 +72983,49 @@ + + + ++ ++ ++ ++ 0 ++ ++ ++ 0 ++ ++ ++ 0 ++ ++ ++ 0 ++ ++ ++ ++ ++ 2 ++ ++ ++ 15 ++ ++ ++ 17 ++ ++ ++ 7 ++ ++ ++ ++ ++ ++ ++ 2 ++ ++ ++ 13 ++ ++ ++ 15 ++ ++ ++ + + + +@@ -72906,6 +73154,95 @@ + + + ++ ++ ++ ++ 18 ++ ++ ++ 18 ++ ++ ++ ++ ++ 0 ++ ++ ++ 7 ++ ++ ++ ++ ++ ++ ++ 60 ++ ++ ++ 245 ++ ++ ++ 10 ++ ++ ++ 7 ++ ++ ++ 12 ++ ++ ++ ++ ++ 15 ++ ++ ++ 7 ++ ++ ++ ++ ++ 15 ++ ++ ++ 7 ++ ++ ++ ++ ++ 15 ++ ++ ++ 7 ++ ++ ++ ++ ++ ++ ++ 13 ++ ++ ++ 17 ++ ++ ++ 7 ++ ++ ++ ++ ++ ++ ++ 14 ++ ++ ++ ++ ++ 47 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -73374,6 +73711,56 @@ + + + ++ ++ ++ ++ 10 ++ ++ ++ 2 ++ ++ ++ 7 ++ ++ ++ ++ ++ ++ ++ 19 ++ ++ ++ 41 ++ ++ ++ 21 ++ ++ ++ 7 ++ ++ ++ ++ ++ 212 ++ ++ ++ 13 ++ ++ ++ ++ ++ ++ ++ 99 ++ ++ ++ 21 ++ ++ ++ 7 ++ ++ ++ + + + From patchwork Mon Dec 16 17:26:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34950 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A3CB627BBEA; Mon, 16 Dec 2024 17:30:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ED0C227BBE2 for ; Mon, 16 Dec 2024 17:30:19 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEuk-0000gv-9J; Mon, 16 Dec 2024 12:29:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuE-0000QV-JH for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:19 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEuC-0001wu-Iy for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=VDf/8UkXc+p3GKMqepoIH4k81RMdyKX8NFGV4C0gtew=; b=BUpePPm9FDdkt31xvzfB4gtAe3yzk4LYQ39tOJXu+r0UW7jq49jLTNgsIKFErgSCoTEbRmVCjjF1VcAguqruRNnaVvu1mlGGFCDU2ndlwltj78aX1VuIVFOj6gS9n9iT+vXS/Rm+diudIXhPa1ebmIi6/KNtZBFMFkxuKuiSKLmUznoR3mGNlzafHBE0mXAmZaU7yPDo1Pnq4mLwkfwGNpmxVVOxz0/D6DqgV7UCo/CRAaOWDePxVPMy31zl/Jr2IAX1BpN8VEpr+CzaLPEf4RbnZYxOc6h5O6147fnK11bG0iVdPdnXP5E9oNGbEfVKWMDp34RdQot4oS/O7XTwNw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEuC-0006Mi-6Y for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:16 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 19/21] gnu: Add mono-5.10.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:16 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437014724338 (code B ref 74609); Mon, 16 Dec 2024 17:29:16 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:29:07 +0000 Received: from localhost ([127.0.0.1]:55885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEu2-0006KI-P2 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:29:06 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:44509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtp-0006IS-Si for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:28:54 -0500 Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-385d7f19f20so2223665f8f.1 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370073; x=1734974873; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=VDf/8UkXc+p3GKMqepoIH4k81RMdyKX8NFGV4C0gtew=; b=Rs4e3ebrMZ5FvY7FRZvGiY1tf9IIkjM6MvKvCP0ptW6tlss+jFRMfy0akY+CJ0Shw6 E1k4T81sylnSSO1MZteNsliaB2cMoIo7YLBR80cN1lUGUh5WOpnKIagKMBi2R6rbtw7A OOyMF2I8Q+6Qy2hj5yjbCo1/JTutwSd4xLXfm/Ktdhjkn1A4UfzQVSUd67wchPBGRqsi PjW25HHoMShXrZH6HIS2HSuXgHWuJOmt8RT8RyXsD58fWvTwa721SkHcy7fg114mU+YA HN4Gqe0RmVr+ZPZGQw8SPqsXgSthiUrjIxLk+i16tJ0jXkFs6nbKzuP1aO1CQHFn+lcy U1Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370073; x=1734974873; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=VDf/8UkXc+p3GKMqepoIH4k81RMdyKX8NFGV4C0gtew=; b=rRnf7ma8zRN8cGTeyM8+CM1Yez03OeH/4+D2tSxSSHke3JzA0F9cHtSylubHuDntx1 0CsLbyyBMwGJ5I4dzY7fLGvzSUJfcpOAofnZWzv//B/OeS8sNLZlIL99FO1x/Ki4LWyF YrJCAYcL4S3MWqMgINLOkLceB17cNErmpFaQ7C4uebiY942cvDu8MnH2qqsJJwx4/+UA Oy3lMSvMzbrv66Kk8RPhFUs5AeFMmbOL1kd3FhLV5gTfdoKIjQ3cTDQU74Ahj01LLnpd ylaaJRmK/jNdJrXdv12To2eiJ5dXpr1lExwCW5EwuqJq7tvrmJOfC1Tv+7wbbuYxn2QA rIwQ== X-Gm-Message-State: AOJu0Yw3LO5RskPSSs5LL5z7AM+u5CWwTN6txW+HZ0Ec8V8jHVBffpM+ tOBPNs1ZPLpD25fNqU2KmcKIAbB6CSwqfd9/NXSEv46X9HvjHCYCkKPgGaJB X-Gm-Gg: ASbGncu2NBolPgrFxrBfzCOTGtcWGvJGuczv5Eu2mTpmlAstttxdcZVrXuIGEqJ2IJT FSjE8GmSeaTWptimMBorIG9cefJ+oofqL+UUJwnDzWGZsRsvK1uVojBiLQ7GBGPnWTlYzDJ27qx 8sV1TOOiKqYIGklZDsoTaKE7xeoBUZ8CL84hLFbVhkEG8BqjbUSvQPd8sK1z5pFsNVnb0+Tyw3b rPoiabGe6PHq14S2a71dRFYRTPDPx3EvYCbyeeFbo57v/hRIETTX3dku1d+GA== X-Google-Smtp-Source: AGHT+IHUpk+rQBVQKDosBM2O8XMtNiFbEt06YyNtcBWB7swJJRMsTlI8W3GOPPp3K6QFZ1wkRBwrPg== X-Received: by 2002:adf:e190:0:b0:385:ec89:2f07 with SMTP id ffacd0b85a97d-388da3aec66mr441953f8f.32.1734370072325; Mon, 16 Dec 2024 09:27:52 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c806b84esm8669799f8f.108.2024.12.16.09.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:51 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:42 +0200 Message-ID: <923e7eea2cf4aeada71c8dc11d3734dacf27b397.1734369315.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (mono-5.10.0-external-repo-specs, mono-5.10.0): New variables. * gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register new patch. Change-Id: Ic5e123c2cd12f9b77d012cd7d73f9be0b5a608ec --- gnu/local.mk | 1 + gnu/packages/dotnet.scm | 119 + .../mono-5.10.0-later-mcs-changes.patch | 4601 +++++++++++++++++ 3 files changed, 4721 insertions(+) create mode 100644 gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch diff --git a/gnu/local.mk b/gnu/local.mk index c58bfe73cdb..35a2d7e55a7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1829,6 +1829,7 @@ dist_patch_DATA = \ %D%/packages/patches/mono-4.9.0-fix-runtimemetadataversion.patch \ %D%/packages/patches/mono-5.4.0-patches.patch \ %D%/packages/patches/mono-5.8.0-patches.patch \ + %D%/packages/patches/mono-5.10.0-later-mcs-changes.patch \ %D%/packages/patches/mono-mcs-patches-from-5.10.0.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 414e955340f..fc5585ecc7e 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1471,3 +1471,122 @@ (define-public mono-pre-5.10.0 (search-patches "mono-mcs-patches-from-5.10.0.patch")))) (native-inputs (modify-inputs (package-native-inputs mono-5.8.0) (replace "mono" mono-5.8.0)))))) + +(define mono-5.10.0-external-repo-specs + '(("api-doc-tools" "d03e819838c6241f92f90655cb448cc47c9e8791" + "1riki79f3ig3cxigviss81dz601hn92a1gifglm0mzjbs76sf3fj" + #:recursive? #t) + ("api-snapshot" "da8bb8c7b970383ce26c9b09ce3689d843a6222e" + "00kxw09yirdh0bzkvs0v3h6bkdjv9d4g9agn3b8640awvpym3yqw") + ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + (("reference-assemblies" "binary-reference-assemblies") + "e048fe4a88d237d105ae02fe0363a68296099362" + "0i87i3x694f4g8s2flflv0ah88blxds7gbiyrwrmscqdjsifhy49") + ("bockbuild" "1908d43ec630544189bd11630a59ec4ef571db28" + "1h13lgic2dwnbzc58nqhjhagn0f100nl5mhzryjdmypgrf3cr1b3") + ("boringssl" "3e0770e18835714708860ba9fe1af04a932971ff" + "139a0gl91a52k2r6na6ialzkqykaj1rk88zjrkaz3sdxx7nmmg6y") + ("cecil" "dfee11e80d59e1a3d6d9c914c3f277c726bace52" + "1y2f59v988y2llqpqi0zl9ly0lkym8zw0a4vkav7cpp6m5mkq208") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "e327d2855ed74dac96f684797e4820345297a690" + "11pinnn8zwf4hi0gfj98cyqkmh7wrmd5mhcdm84gkl9s2g18iaq0") + ("corert" "aa64b376c1a2238b1a768e158d1b11dac77d722a" + "1gg4m49s0ry5yx96dwjary7r395ypzzg4ssz1ajld2x5g7ggvwgg") + ("ikdasm" "465c0815558fd43c0110f8d00fc186ac0044ac6a" + "0xir7pcgq04hb7s8g9wsqdrypb6l29raj3iz5rcqzdm0056k75w2") + (("ikvm-fork" "ikvm") "847e05fced5c9a41ff0f24f1f9d40d5a8a5772c1" + "1fl9bm3lmzf8iqv3x4iqkz9fc54mwdvrxisxg2nvwwcsi4saffpi") + ("linker" "84d37424cde6e66bbf997110a4dbdba7e60038e9" + "07ffkc9ijzsdvbkrc1fn5sb25sgxyabs54kzyblwkzparwj047qr") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "b2c30bc81b2a7733a4eeb252a55f6b4d50cfc3a1" + "01vajrfx6y12f525xdiwfbn9qzmym2s65rbiqpy9d9xw0pnq7gbl") + (("NUnitLite" "nunit-lite") "70bb70b0ffd0109aadaa6e4ea178972d4fb63ea3" + "0ln7rn1960cdwmfqcscp2d2ncpwnknhq9rf8v53ay8g2c3g6gh4q") + ;; ("roslyn-binaries" "00da53c4746250988a92055ef3ac653ccf84fc40" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv") + ;; ("xunit-binaries" "c5a907be25c201cda38bec99f6c82548ab3d9b5a" + ;; "") + )) + +(define-public mono-5.10.0 + (package + (inherit mono-pre-5.10.0) + (version "5.10.0.179") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit "mono-5.10.0.179"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1zvib164w4mzrsk06ym9my0208ccdanja2fx6x6mlyib358h3626")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-5.10.0-external-repo-specs) + #$@prepare-mono-source-0)) + (patches + (search-patches "mono-5.10.0-later-mcs-changes.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-pre-5.10.0) + (replace "mono" mono-pre-5.10.0) + (append (default-python)))) + (arguments + (substitute-keyword-arguments (package-arguments mono-pre-5.10.0) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + ;; Build now relies on these being built before any mcs is built; + ;; have to use the input mcs. + (delete 'build-reference-assemblies) + (add-before 'build 'build-reference-assemblies + (lambda* (#:key make-flags #:allow-other-keys) + (let ((top (getcwd))) + (with-directory-excursion + "external/binary-reference-assemblies" + (substitute* (find-files "." "^Makefile$") + (("CSC_COMMON_ARGS := " all) + (string-append all "-delaysign+ ")) + (("IBM\\.Data\\.DB2_REFS := " all) + (string-append all "System.Xml ")) + (("Mono\\.Data\\.Sqlite_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Data\\.DataSetExtensions_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Data\\.OracleClient_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.IdentityModel_REFS := " all) + (string-append all "System.Configuration ")) + (("System\\.Design_REFS := " all) + (string-append all "Accessibility ")) + (("System\\.Web\\.Extensions\\.Design_REFS := " all) + (string-append all "System.Windows.Forms System.Web ")) + (("System\\.ServiceModel\\.Routing_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Web\\.Abstractions_REFS := " all) + (string-append all "System ")) + (("System\\.Reactive\\.Windows\\.Forms_REFS := " all) + (string-append all "System ")) + (("System\\.Windows\\.Forms\\.DataVisualization_REFS := " all) + (string-append all "Accessibility ")) + (("Facades/System\\.ServiceModel\\.Primitives_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Dynamic\\.Runtime_REFS := " all) + (string-append all "System ")) + (("Facades/System\\.Xml\\.XDocument_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Runtime\\.Serialization.Xml_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Data\\.Common_REFS := " all) + (string-append all "System System.Xml "))) + (apply invoke "make" "CSC=mcs" make-flags))))))))))) diff --git a/gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch b/gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch new file mode 100644 index 00000000000..d8f5991f482 --- /dev/null +++ b/gnu/packages/patches/mono-5.10.0-later-mcs-changes.patch @@ -0,0 +1,4601 @@ +The result of cherry-picking every commit (except ones that seemed to not +affect the compiler itself) from mono-5.10.0.179 to mono-6.12.0.206 that +touched ./mcs/mcs. + +Mono seems to consistently, almost as a rule, depend on C# features before +they implement them. This is extremely awkward for building using previous +versions, so hopefully this will allow us to jump straight to a high version. + +Includes the following commits, in order of most-recent to least-recent: + +b3911589b37 +6700dd220fe +2a7dfb28e07 +eea6f11a3e6 +3fc047c6f3a +ac6666f5b0b +927b27bb9d8 +4ab24d4c059 +aa836b46a23 +ee7dccfb320 +23510f26915 +d9f26547d88 +9dc1c885a0f +ef558ead89a +2cb7909b13c +0390ea2e78c +b4f6659bdc0 +e92d6070eaf +4c5b3fbd4f4 +e6507f2da8a +656a4b1120c +9bd2fa4cf33 +be2d1aeffe0 +454a76cfa4a +60c1ee454d4 +53f1ef506ea +d3487bfebb3 +92f6e5b1a81 + +diff --git a/.gitignore b/.gitignore +index c6ef19a849b..c37d4fce3f0 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -40,6 +40,7 @@ Ankh.NoLoad + *.gpState + .vscode/ + *.exp ++.vs/ + + # Tooling + _ReSharper*/ +diff --git a/mcs/class/Commons.Xml.Relaxng/Makefile b/mcs/class/Commons.Xml.Relaxng/Makefile +index 1febae4eb1e..f9b57fea265 100644 +--- a/mcs/class/Commons.Xml.Relaxng/Makefile ++++ b/mcs/class/Commons.Xml.Relaxng/Makefile +@@ -22,7 +22,7 @@ EXTRA_DISTFILES = \ + $(RESOURCE_FILES) + + Commons.Xml.Relaxng.Rnc/RncParser.cs: Commons.Xml.Relaxng.Rnc/RncParser.jay $(topdir)/jay/skeleton.cs +- $(topdir)/jay/jay -ctv < $(topdir)/jay/skeleton.cs $(CURDIR)/Commons.Xml.Relaxng.Rnc/RncParser.jay > Commons.Xml.Relaxng.Rnc/RncParser.cs ++ $(topdir)/jay/jay -ctv -o Commons.Xml.Relaxng.Rnc/RncParser.cs $< < $(topdir)/jay/skeleton.cs + + BUILT_SOURCES = Commons.Xml.Relaxng.Rnc/RncParser.cs + +diff --git a/mcs/class/Microsoft.Build/Makefile b/mcs/class/Microsoft.Build/Makefile +index 2dcbefdf7f9..1a711069b0b 100644 +--- a/mcs/class/Microsoft.Build/Makefile ++++ b/mcs/class/Microsoft.Build/Makefile +@@ -26,7 +26,7 @@ EXTRA_DISTFILES = \ + EXPR_PARSER = Microsoft.Build.Internal/ExpressionParser + + $(EXPR_PARSER).cs: $(EXPR_PARSER).jay $(topdir)/jay/skeleton.cs +- (cd Microsoft.Build.Internal; $(topdir)/../jay/jay -ctv < $(topdir)/../jay/skeleton.cs ExpressionParser.jay > ExpressionParser.cs) ++ (cd Microsoft.Build.Internal; $(topdir)/../jay/jay -ctv -o ExpressionParser.cs ExpressionParser.jay < $(topdir)/../jay/skeleton.cs ) + + BUILT_SOURCES = $(EXPR_PARSER).cs + +diff --git a/mcs/class/Mono.CSharp/Makefile b/mcs/class/Mono.CSharp/Makefile +index 7b1986b78e5..3615532853d 100644 +--- a/mcs/class/Mono.CSharp/Makefile ++++ b/mcs/class/Mono.CSharp/Makefile +@@ -24,7 +24,7 @@ LIB_MCS_FLAGS += $(REFERENCE_SOURCES_FLAGS) + BUILT_SOURCES = $(PROFILE)-parser.cs + + $(PROFILE)-parser.cs: $(topdir)/mcs/cs-parser.jay $(topdir)/jay/skeleton.cs +- $(topdir)/jay/jay -c < $(topdir)/jay/skeleton.cs $< > $(PROFILE)-jay-tmp.out && mv $(PROFILE)-jay-tmp.out $@ ++ $(topdir)/jay/jay -c -o $(PROFILE)-jay-tmp.out $< < $(topdir)/jay/skeleton.cs && mv $(PROFILE)-jay-tmp.out $@ + + include ../../build/library.make + +diff --git a/mcs/class/Mono.Xml.Ext/Makefile b/mcs/class/Mono.Xml.Ext/Makefile +index dc49f816fee..16498215a38 100644 +--- a/mcs/class/Mono.Xml.Ext/Makefile ++++ b/mcs/class/Mono.Xml.Ext/Makefile +@@ -29,13 +29,13 @@ Mono.Xml.XPath2/XQueryParser.jay: Mono.Xml.XPath2/ParserBase.jay $(SKELETON) + Mono.Xml.XPath2/XPath2Parser.cs: Mono.Xml.XPath2/XPath2Parser.jay + echo "#define XPATH2_PARSER" > $@ + echo "#if NET_2_0" >> $@ +- $(topdir)/jay/jay -ct < $(SKELETON) $(CURDIR)/$< >>$@ ++ $(topdir)/jay/jay -ct $(CURDIR)/$< < $(SKELETON) >>$@ + echo "#endif" >> $@ + + Mono.Xml.XPath2/XQueryParser.cs: Mono.Xml.XPath2/XQueryParser.jay $(SKELETON) + echo "#define XQUERY_PARSER" > $@ + echo "#if NET_2_0" >> $@ +- $(topdir)/jay/jay -ct < $(SKELETON) $(CURDIR)/$< >>$@ ++ $(topdir)/jay/jay -ct $(CURDIR)/$< < $(SKELETON) >>$@ + echo "#endif" >> $@ + + Mono.Xml.XPath2/XPath2Tokenizer.cs: Mono.Xml.XPath2/TokenizerBase.cs +diff --git a/mcs/class/corlib/System/RuntimeArgumentHandle.cs b/mcs/class/corlib/System/RuntimeArgumentHandle.cs +index 216c4ea3924..c10d3f174d1 100644 +--- a/mcs/class/corlib/System/RuntimeArgumentHandle.cs ++++ b/mcs/class/corlib/System/RuntimeArgumentHandle.cs +@@ -31,13 +31,9 @@ + // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + // + +-using System; +-using System.Runtime.InteropServices; +- + namespace System + { +- [ComVisible (true)] +- public struct RuntimeArgumentHandle ++ public ref struct RuntimeArgumentHandle + { + #pragma warning disable 649 + internal IntPtr args; +diff --git a/mcs/class/referencesource/mscorlib/system/typedreference.cs b/mcs/class/referencesource/mscorlib/system/typedreference.cs +index 80bef5ab852..a30541f4399 100644 +--- a/mcs/class/referencesource/mscorlib/system/typedreference.cs ++++ b/mcs/class/referencesource/mscorlib/system/typedreference.cs +@@ -19,7 +19,11 @@ namespace System { + [CLSCompliant(false)] + [System.Runtime.InteropServices.ComVisible(true)] + [System.Runtime.Versioning.NonVersionable] // This only applies to field layout +- public struct TypedReference ++ public ++#if MONO ++ ref ++#endif ++ struct TypedReference + { + #if MONO + #pragma warning disable 169 +diff --git a/mcs/errors/cs0151-4.cs b/mcs/errors/cs0151-4.cs +index 0e45b1a9049..c9e05589e4d 100644 +--- a/mcs/errors/cs0151-4.cs ++++ b/mcs/errors/cs0151-4.cs +@@ -1,5 +1,6 @@ + // CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type +-// Line: 24 ++// Line: 25 ++// Compiler options: -langversion:5 + + using System; + +diff --git a/mcs/errors/cs0273-2.cs b/mcs/errors/cs0273-2.cs +new file mode 100644 +index 00000000000..b0bdbef9e75 +--- /dev/null ++++ b/mcs/errors/cs0273-2.cs +@@ -0,0 +1,9 @@ ++// CS0273: The accessibility modifier of the `C.S2.set' accessor must be more restrictive than the modifier of the property or indexer `C.S2' ++// Line: 7 ++// Compiler options: -langversion:7.2 ++ ++ class C ++ { ++ private string S2 { get; private protected set; } ++ } ++ +diff --git a/mcs/errors/cs0280.cs b/mcs/errors/cs0280.cs +new file mode 100644 +index 00000000000..62be8e39585 +--- /dev/null ++++ b/mcs/errors/cs0280.cs +@@ -0,0 +1,22 @@ ++// CS0280: `C.Fixable.GetPinnableReference(int)' has the wrong signature to be used in extensible fixed statement ++// Line: 11 ++// Compiler options: -unsafe -langversion:latest -warnaserror ++ ++using System; ++ ++unsafe class C ++{ ++ public static void Main () ++ { ++ fixed (int* p = new Fixable ()) { ++ } ++ } ++ ++ struct Fixable ++ { ++ public ref int GetPinnableReference (int i = 1) ++ { ++ throw new NotImplementedException (); ++ } ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0826-9.cs b/mcs/errors/cs0826-9.cs +deleted file mode 100644 +index 4e098969b8c..00000000000 +--- a/mcs/errors/cs0826-9.cs ++++ /dev/null +@@ -1,16 +0,0 @@ +-// CS0826: The type of an implicitly typed array cannot be inferred from the initializer. Try specifying array type explicitly +-// Line: 8 +- +-class C +-{ +- static void Main() +- { +- object o = 1; +- dynamic d = 1; +- +- var a = new[] { +- new { X = o }, +- new { X = d } +- }; +- } +-} +diff --git a/mcs/errors/cs1013-1.cs b/mcs/errors/cs1013-1.cs +new file mode 100644 +index 00000000000..01827df4995 +--- /dev/null ++++ b/mcs/errors/cs1013-1.cs +@@ -0,0 +1,8 @@ ++// CS1013: Invalid number ++// Line : 6 ++ ++class X ++{ ++ static int i = 0b; ++ static void Main () {} ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1013-2.cs b/mcs/errors/cs1013-2.cs +new file mode 100644 +index 00000000000..c868cb2a769 +--- /dev/null ++++ b/mcs/errors/cs1013-2.cs +@@ -0,0 +1,7 @@ ++// CS1013: Invalid number ++// Line : 6 ++ ++class X ++{ ++ static int i = 0x0_; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1013-3.cs b/mcs/errors/cs1013-3.cs +new file mode 100644 +index 00000000000..3145b1ba596 +--- /dev/null ++++ b/mcs/errors/cs1013-3.cs +@@ -0,0 +1,7 @@ ++// CS1013: Invalid number ++// Line : 6 ++ ++class X ++{ ++ static int i = 1_; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1013-4.cs b/mcs/errors/cs1013-4.cs +new file mode 100644 +index 00000000000..3a5e744ff4f +--- /dev/null ++++ b/mcs/errors/cs1013-4.cs +@@ -0,0 +1,7 @@ ++// CS1013: Invalid number ++// Line : 6 ++ ++class X ++{ ++ static double i = 1_.2; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1013-5.cs b/mcs/errors/cs1013-5.cs +new file mode 100644 +index 00000000000..8082743c0b5 +--- /dev/null ++++ b/mcs/errors/cs1013-5.cs +@@ -0,0 +1,7 @@ ++// CS1013: Invalid number ++// Line : 6 ++ ++class X ++{ ++ static int i = 1_e1; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1013-6.cs b/mcs/errors/cs1013-6.cs +new file mode 100644 +index 00000000000..d2cea2c72dd +--- /dev/null ++++ b/mcs/errors/cs1013-6.cs +@@ -0,0 +1,7 @@ ++// CS1013: Invalid number ++// Line : 6 ++ ++class X ++{ ++ static float i = 1_f; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1013-7.cs b/mcs/errors/cs1013-7.cs +new file mode 100644 +index 00000000000..8030d6ed095 +--- /dev/null ++++ b/mcs/errors/cs1013-7.cs +@@ -0,0 +1,7 @@ ++// CS1013: Invalid number ++// Line : 6 ++ ++class X ++{ ++ static int i = 0x_1; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1013-8.cs b/mcs/errors/cs1013-8.cs +new file mode 100644 +index 00000000000..d26c7acacb7 +--- /dev/null ++++ b/mcs/errors/cs1013-8.cs +@@ -0,0 +1,7 @@ ++// CS1013: Invalid number ++// Line : 6 ++ ++class X ++{ ++ static int i = 0b_1; ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1021-4.cs b/mcs/errors/cs1021-4.cs +new file mode 100644 +index 00000000000..75c2ff70360 +--- /dev/null ++++ b/mcs/errors/cs1021-4.cs +@@ -0,0 +1,8 @@ ++// CS1021: Integral constant is too large ++// Line: 6 ++ ++class X { ++ public static void Main() { ++ int h = 0b11111111111111111111111111111111111111111111111111111111111111111; ++ } ++} +diff --git a/mcs/errors/cs1061-18.cs b/mcs/errors/cs1061-18.cs +new file mode 100644 +index 00000000000..3ac82b7f2d3 +--- /dev/null ++++ b/mcs/errors/cs1061-18.cs +@@ -0,0 +1,10 @@ ++// CS1061: Type `int' does not contain a definition for `__0' and no extension method `__0' of type `int' could be found. Are you missing an assembly reference? ++// Line: 8 ++ ++static class C ++{ ++ static void Main () ++ { ++ int c = 0.__0; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1525-27.cs b/mcs/errors/cs1525-27.cs +index dc184931667..d4c1f326be2 100644 +--- a/mcs/errors/cs1525-27.cs ++++ b/mcs/errors/cs1525-27.cs +@@ -1,4 +1,4 @@ +-// CS1525: Unexpected symbol `fe', expecting `class', `delegate', `enum', `interface', `partial', or `struct' ++// CS1525: Unexpected symbol `fe', expecting `class', `delegate', `enum', `interface', `partial', `ref', or `struct' + // Line: 6 + + namespace X +diff --git a/mcs/errors/cs1525-43.cs b/mcs/errors/cs1525-43.cs +index d83d4d847fa..26f466a2528 100644 +--- a/mcs/errors/cs1525-43.cs ++++ b/mcs/errors/cs1525-43.cs +@@ -1,4 +1,4 @@ +-// CS1525: Unexpected symbol `)', expecting `(', `[', `out', `params', `ref', `this', or `type' ++// CS1525: Unexpected symbol `)' + // Line: 6 + + class TestClass +diff --git a/mcs/errors/cs1527-2.cs b/mcs/errors/cs1527-2.cs +index d38945f3c89..0256ee2b354 100644 +--- a/mcs/errors/cs1527-2.cs ++++ b/mcs/errors/cs1527-2.cs +@@ -1,4 +1,4 @@ +-// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal ++// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected + // Line: 4 + + protected interface IFoo { +diff --git a/mcs/errors/cs1527-3.cs b/mcs/errors/cs1527-3.cs +index 763c75958ee..469d74cbb99 100644 +--- a/mcs/errors/cs1527-3.cs ++++ b/mcs/errors/cs1527-3.cs +@@ -1,4 +1,4 @@ +-// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal ++// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected + // Line: 4 + + protected internal enum E { +diff --git a/mcs/errors/cs1527.cs b/mcs/errors/cs1527.cs +index 189cc472f4c..e847fd14e11 100644 +--- a/mcs/errors/cs1527.cs ++++ b/mcs/errors/cs1527.cs +@@ -1,4 +1,5 @@ +-// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal +-// Line: ++// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected ++// Line: 4 ++ + private class X { + } +diff --git a/mcs/errors/cs1611-2.cs b/mcs/errors/cs1611-2.cs +new file mode 100644 +index 00000000000..882231378f0 +--- /dev/null ++++ b/mcs/errors/cs1611-2.cs +@@ -0,0 +1,8 @@ ++// CS1611: The params parameter cannot be declared as ref, out or in ++// Line: 6 ++// Compiler options: -langversion:latest ++ ++class Test ++{ ++ public static void Error (params in int args) {} ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1611.cs b/mcs/errors/cs1611.cs +index 8df10fac0ce..469e083ec3c 100644 +--- a/mcs/errors/cs1611.cs ++++ b/mcs/errors/cs1611.cs +@@ -1,4 +1,4 @@ +-// CS1611: The params parameter cannot be declared as ref or out ++// CS1611: The params parameter cannot be declared as ref, out or in + // Line: 6 + + class Test +diff --git a/mcs/errors/cs1644-61.cs b/mcs/errors/cs1644-61.cs +new file mode 100644 +index 00000000000..d58ba64c7ec +--- /dev/null ++++ b/mcs/errors/cs1644-61.cs +@@ -0,0 +1,11 @@ ++// CS1644: Feature `digit separators' cannot be used because it is not part of the C# 6.0 language specification ++// Line: 9 ++// Compiler options: -langversion:6 ++ ++class X ++{ ++ int Test () ++ { ++ var i = 1_0; ++ } ++} +diff --git a/mcs/errors/cs1644-62.cs b/mcs/errors/cs1644-62.cs +new file mode 100644 +index 00000000000..5a29839610d +--- /dev/null ++++ b/mcs/errors/cs1644-62.cs +@@ -0,0 +1,10 @@ ++// CS1644: Feature `private protected' cannot be used because it is not part of the C# 6.0 language specification ++// Line: 7 ++// Compiler options: -langversion:6 ++ ++class C ++{ ++ private protected enum E ++ { ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1644-63.cs b/mcs/errors/cs1644-63.cs +new file mode 100644 +index 00000000000..ce61d5ce046 +--- /dev/null ++++ b/mcs/errors/cs1644-63.cs +@@ -0,0 +1,22 @@ ++// CS1644: Feature `extensible fixed statement' cannot be used because it is not part of the C# 7.2 language specification ++// Line: 11 ++// Compiler options: -unsafe -langversion:7.2 ++ ++using System; ++ ++unsafe class C ++{ ++ public static void Main () ++ { ++ fixed (int* p = new Fixable ()) { ++ } ++ } ++ ++ struct Fixable ++ { ++ public ref int GetPinnableReference () ++ { ++ throw new NotImplementedException (); ++ } ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1644-64.cs b/mcs/errors/cs1644-64.cs +new file mode 100644 +index 00000000000..88917a0a5d5 +--- /dev/null ++++ b/mcs/errors/cs1644-64.cs +@@ -0,0 +1,13 @@ ++// CS1644: Feature `expression body property accessor' cannot be used because it is not part of the C# 6.0 language specification ++// Line: 11 ++// Compiler options: -langversion:6 ++ ++using System; ++ ++class C ++{ ++ public int Integer ++ { ++ get => 0; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1644-65.cs b/mcs/errors/cs1644-65.cs +new file mode 100644 +index 00000000000..dea648b7846 +--- /dev/null ++++ b/mcs/errors/cs1644-65.cs +@@ -0,0 +1,13 @@ ++// CS1644: Feature `expression body property accessor' cannot be used because it is not part of the C# 6.0 language specification ++// Line: 11 ++// Compiler options: -langversion:6 ++ ++using System; ++ ++class C ++{ ++ public int this[int i] ++ { ++ get => i; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1644-66.cs b/mcs/errors/cs1644-66.cs +new file mode 100644 +index 00000000000..3f393b50d30 +--- /dev/null ++++ b/mcs/errors/cs1644-66.cs +@@ -0,0 +1,17 @@ ++// CS1644: Feature `expression body event accessor' cannot be used because it is not part of the C# 6.0 language specification ++// Line: 11 ++// Compiler options: -langversion:6 ++ ++using System; ++ ++class C ++{ ++ public event EventHandler Event ++ { ++ add => Ignore (); ++ } ++ ++ static void Ignore () ++ { ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs1763-2.cs b/mcs/errors/cs1763-2.cs +index 72f5370949a..7e4d091fc72 100644 +--- a/mcs/errors/cs1763-2.cs ++++ b/mcs/errors/cs1763-2.cs +@@ -1,4 +1,4 @@ +-// CS1763: Optional parameter `o' of type `object' can only be initialized with `null' ++// CS1763: Optional parameter `o' of type `object' can only be initialized with default value + // Line: 6 + + class C +diff --git a/mcs/errors/cs1763.cs b/mcs/errors/cs1763.cs +index d10a7bf2c20..03b5f28a19d 100644 +--- a/mcs/errors/cs1763.cs ++++ b/mcs/errors/cs1763.cs +@@ -1,4 +1,4 @@ +-// CS1763: Optional parameter `o' of type `object' can only be initialized with `null' ++// CS1763: Optional parameter `o' of type `object' can only be initialized with default value + // Line: 6 + + class C +diff --git a/mcs/errors/cs8326.cs b/mcs/errors/cs8326.cs +new file mode 100644 +index 00000000000..efd3a84fea7 +--- /dev/null ++++ b/mcs/errors/cs8326.cs +@@ -0,0 +1,13 @@ ++// CS8326: Both ref conditional operators must be ref values ++// Line: 11 ++ ++class Program ++{ ++ static int x, y; ++ ++ public static void Main () ++ { ++ bool b = false; ++ ref int targetBucket = ref b ? x : y; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs8327.cs b/mcs/errors/cs8327.cs +new file mode 100644 +index 00000000000..8d0ccd86a70 +--- /dev/null ++++ b/mcs/errors/cs8327.cs +@@ -0,0 +1,14 @@ ++// CS8327: The ref conditional expression types `int' and `byte' have to match ++// Line: 12 ++ ++class Program ++{ ++ static int x; ++ static byte y; ++ ++ public static void Main () ++ { ++ bool b = false; ++ ref int targetBucket = ref b ? ref x : ref y; ++ } ++} +\ No newline at end of file +diff --git a/mcs/errors/cs0428-2.cs b/mcs/errors/cs8385-2.cs +similarity index 50% +rename from mcs/errors/cs0428-2.cs +rename to mcs/errors/cs8385-2.cs +index 5f468fd519a..cc7860faa62 100644 +--- a/mcs/errors/cs0428-2.cs ++++ b/mcs/errors/cs8385-2.cs +@@ -1,4 +1,4 @@ +-// CS0428: Cannot convert method group `Main' to non-delegate type `void*'. Consider using parentheses to invoke the method ++// CS8385: The given expression cannot be used in a fixed statement + // Line: 9 + // Compiler options: -unsafe + +diff --git a/mcs/errors/cs0213-2.cs b/mcs/errors/cs8385.cs +similarity index 54% +rename from mcs/errors/cs0213-2.cs +rename to mcs/errors/cs8385.cs +index ae72e4cd9aa..5fa9f794ccf 100644 +--- a/mcs/errors/cs0213-2.cs ++++ b/mcs/errors/cs8385.cs +@@ -1,4 +1,4 @@ +-// CS0213: You cannot use the fixed statement to take the address of an already fixed expression ++// CS8385: The given expression cannot be used in a fixed statement + // Line: 9 + // Compiler options: -unsafe + +diff --git a/mcs/errors/known-issues-net_4_x b/mcs/errors/known-issues-net_4_x +index c9ed9317350..54902e03e7b 100644 +--- a/mcs/errors/known-issues-net_4_x ++++ b/mcs/errors/known-issues-net_4_x +@@ -14,6 +14,9 @@ + # Parser problems + cs0080.cs + ++# Undocumented switch governing rules ++cs0151-4.cs NO ERROR ++ + # Operators + cs0457-2.cs + cs0457.cs +diff --git a/mcs/ilasm/Makefile b/mcs/ilasm/Makefile +index 090d1cc3231..4ca11545781 100644 +--- a/mcs/ilasm/Makefile ++++ b/mcs/ilasm/Makefile +@@ -13,7 +13,7 @@ EXTRA_DISTFILES = \ + $(wildcard tests/*.il) + + ILParser.cs: parser/ILParser.jay $(topdir)/jay/skeleton.cs +- $(topdir)/jay/jay -ct < $(topdir)/jay/skeleton.cs $(CURDIR)/$< >$@ ++ $(topdir)/jay/jay -ct -o $@ $(CURDIR)/$< < $(topdir)/jay/skeleton.cs + + include ../build/executable.make + +diff --git a/mcs/jay/defs.h b/mcs/jay/defs.h +index 2aade48dac2..3bd3c5859ce 100644 +--- a/mcs/jay/defs.h ++++ b/mcs/jay/defs.h +@@ -236,12 +236,14 @@ extern char *input_file_name; + extern char *prolog_file_name; + extern char *local_file_name; + extern char *verbose_file_name; ++extern char *output_file_name; + + extern FILE *action_file; + extern FILE *input_file; + extern FILE *prolog_file; + extern FILE *local_file; + extern FILE *verbose_file; ++extern FILE *output_file; + + extern int nitems; + extern int nrules; +diff --git a/mcs/jay/main.c b/mcs/jay/main.c +index fcac218b1df..7fb5e6c8ccb 100644 +--- a/mcs/jay/main.c ++++ b/mcs/jay/main.c +@@ -63,6 +63,7 @@ char *input_file_name = ""; + char *prolog_file_name; + char *local_file_name; + char *verbose_file_name; ++char *output_file_name = 0; + + FILE *action_file; /* a temp file, used to save actions associated */ + /* with rules until the parser is written */ +@@ -70,6 +71,7 @@ FILE *input_file; /* the input file */ + FILE *prolog_file; /* temp files, used to save text until all */ + FILE *local_file; /* symbols have been defined */ + FILE *verbose_file; /* y.output */ ++FILE *output_file; /* defaults to stdout */ + + int nitems; + int nrules; +@@ -106,6 +108,7 @@ int k; + if (action_file) { fclose(action_file); unlink(action_file_name); } + if (prolog_file) { fclose(prolog_file); unlink(prolog_file_name); } + if (local_file) { fclose(local_file); unlink(local_file_name); } ++ if (output_file && (output_file != stdout)) { fclose(output_file); if (k != 0) unlink(output_file_name); } + exit(k); + } + +@@ -137,7 +140,7 @@ set_signals() + + usage() + { +- fprintf(stderr, "usage: %s [-tvcp] [-b file_prefix] filename\n", myname); ++ fprintf(stderr, "usage: %s [-tvcp] [-b file_prefix] [-o output_filename] input_filename\n", myname); + exit(1); + } + +@@ -167,9 +170,9 @@ char *argv[]; + if (i + 1 < argc) usage(); + return; + +- case '-': +- ++i; +- goto no_more_options; ++ case '-': ++ ++i; ++ goto no_more_options; + + case 'b': + if (*++s) +@@ -180,13 +183,22 @@ char *argv[]; + usage(); + continue; + +- case 't': +- tflag = 1; +- break; ++ case 'o': ++ if (*++s) ++ output_file_name = s; ++ else if (++i < argc) ++ output_file_name = argv[i]; ++ else ++ usage(); ++ continue; ++ ++ case 't': ++ tflag = 1; ++ break; + + case 'p': +- print_skel_dir (); +- break; ++ print_skel_dir (); ++ break; + + case 'c': + csharp = 1; +@@ -217,12 +229,12 @@ char *argv[]; + vflag = 1; + break; + +- case 'p': +- print_skel_dir (); +- break; ++ case 'p': ++ print_skel_dir (); ++ break; + +- case 'c': +- csharp = 1; ++ case 'c': ++ csharp = 1; + line_format = "#line %d \"%s\"\n"; + default_line_format = "#line default\n"; + +@@ -355,6 +367,17 @@ open_files() + if (verbose_file == 0) + open_error(verbose_file_name); + } ++ ++ if (output_file == 0) ++ { ++ if (output_file_name != 0) { ++ output_file = fopen(output_file_name, "w"); ++ if (output_file == 0) ++ open_error(output_file_name); ++ } else { ++ output_file = stdout; ++ } ++ } + } + + +diff --git a/mcs/jay/output.c b/mcs/jay/output.c +index d1e2c14a1b2..ab9b2043be9 100644 +--- a/mcs/jay/output.c ++++ b/mcs/jay/output.c +@@ -73,7 +73,7 @@ output () { + fprintf(stderr, "jay: line %d is too long\n", lno), done(1); + switch (buf[0]) { + case '#': continue; +- case 't': if (!tflag) fputs("//t", stdout); ++ case 't': if (!tflag) fputs("//t", output_file); + case '.': break; + default: + cp = strtok(buf, " \t\r\n"); +@@ -93,7 +93,7 @@ output () { + fprintf(stderr, "jay: unknown call (%s) in line %d\n", cp, lno); + continue; + } +- fputs(buf+1, stdout), ++ outline; ++ fputs(buf+1, output_file), ++ outline; + } + free_parser(); + } +@@ -103,19 +103,19 @@ output_rule_data() + register int i; + register int j; + +- printf("/*\n All more than 3 lines long rules are wrapped into a method\n*/\n"); ++ fprintf(output_file, "/*\n All more than 3 lines long rules are wrapped into a method\n*/\n"); + + for (i = 0; i < nmethods; ++i) + { +- printf("%s", methods[i]); ++ fprintf(output_file, "%s", methods[i]); + FREE(methods[i]); +- printf("\n\n"); ++ fprintf(output_file, "\n\n"); + } + FREE(methods); + +- printf(default_line_format, ++outline + 1); ++ fprintf(output_file, default_line_format, ++outline + 1); + +- printf(" %s static %s short [] yyLhs = {%16d,", ++ fprintf(output_file, " %s static %s short [] yyLhs = {%16d,", + csharp ? "" : " protected", + csharp ? "readonly" : "final", + symbol_value[start_symbol]); +@@ -126,18 +126,18 @@ output_rule_data() + if (j >= 10) + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + else + ++j; + +- printf("%5d,", symbol_value[rlhs[i]]); ++ fprintf(output_file, "%5d,", symbol_value[rlhs[i]]); + } + outline += 2; +- printf("\n };\n"); ++ fprintf(output_file, "\n };\n"); + +- printf(" %s static %s short [] yyLen = {%12d,", ++ fprintf(output_file, " %s static %s short [] yyLen = {%12d,", + csharp ? "" : "protected", + csharp ? "readonly" : "final", + 2); +@@ -148,16 +148,16 @@ output_rule_data() + if (j >= 10) + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + else + j++; + +- printf("%5d,", rrhs[i + 1] - rrhs[i] - 1); ++ fprintf(output_file, "%5d,", rrhs[i + 1] - rrhs[i] - 1); + } + outline += 2; +- printf("\n };\n"); ++ fprintf(output_file, "\n };\n"); + } + + +@@ -165,7 +165,7 @@ output_yydefred() + { + register int i, j; + +- printf(" %s static %s short [] yyDefRed = {%13d,", ++ fprintf(output_file, " %s static %s short [] yyDefRed = {%13d,", + csharp ? "" : "protected", + csharp ? "readonly" : "final", + (defred[0] ? defred[0] - 2 : 0)); +@@ -178,15 +178,15 @@ output_yydefred() + else + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + +- printf("%5d,", (defred[i] ? defred[i] - 2 : 0)); ++ fprintf(output_file, "%5d,", (defred[i] ? defred[i] - 2 : 0)); + } + + outline += 2; +- printf("\n };\n"); ++ fprintf(output_file, "\n };\n"); + } + + +@@ -309,7 +309,7 @@ goto_actions() + state_count = NEW2(nstates, short); + + k = default_goto(start_symbol + 1); +- printf(" protected static %s short [] yyDgoto = {%14d,", csharp ? "readonly" : "final", k); ++ fprintf(output_file, " protected static %s short [] yyDgoto = {%14d,", csharp ? "readonly" : "final", k); + save_column(start_symbol + 1, k); + + j = 10; +@@ -318,19 +318,19 @@ goto_actions() + if (j >= 10) + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + else + ++j; + + k = default_goto(i); +- printf("%5d,", k); ++ fprintf(output_file, "%5d,", k); + save_column(i, k); + } + + outline += 2; +- printf("\n };\n"); ++ fprintf(output_file, "\n };\n"); + FREE(state_count); + } + +@@ -633,7 +633,7 @@ output_base() + { + register int i, j; + +- printf(" protected static %s short [] yySindex = {%13d,", csharp? "readonly":"final", base[0]); ++ fprintf(output_file, " protected static %s short [] yySindex = {%13d,", csharp? "readonly":"final", base[0]); + + j = 10; + for (i = 1; i < nstates; i++) +@@ -641,17 +641,17 @@ output_base() + if (j >= 10) + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + else + ++j; + +- printf("%5d,", base[i]); ++ fprintf(output_file, "%5d,", base[i]); + } + + outline += 2; +- printf("\n };\n protected static %s short [] yyRindex = {%13d,", ++ fprintf(output_file, "\n };\n protected static %s short [] yyRindex = {%13d,", + csharp ? "readonly" : "final", + base[nstates]); + +@@ -661,17 +661,17 @@ output_base() + if (j >= 10) + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + else + ++j; + +- printf("%5d,", base[i]); ++ fprintf(output_file, "%5d,", base[i]); + } + + outline += 2; +- printf("\n };\n protected static %s short [] yyGindex = {%13d,", ++ fprintf(output_file, "\n };\n protected static %s short [] yyGindex = {%13d,", + csharp ? "readonly" : "final", + base[2*nstates]); + +@@ -681,17 +681,17 @@ output_base() + if (j >= 10) + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + else + ++j; + +- printf("%5d,", base[i]); ++ fprintf(output_file, "%5d,", base[i]); + } + + outline += 2; +- printf("\n };\n"); ++ fprintf(output_file, "\n };\n"); + FREE(base); + } + +@@ -702,7 +702,7 @@ output_table() + register int i; + register int j; + +- printf(" protected static %s short [] yyTable = {%14d,", csharp ? "readonly" : "final", table[0]); ++ fprintf(output_file, " protected static %s short [] yyTable = {%14d,", csharp ? "readonly" : "final", table[0]); + + j = 10; + for (i = 1; i <= high; i++) +@@ -710,17 +710,17 @@ output_table() + if (j >= 10) + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + else + ++j; + +- printf("%5d,", table[i]); ++ fprintf(output_file, "%5d,", table[i]); + } + + outline += 2; +- printf("\n };\n"); ++ fprintf(output_file, "\n };\n"); + FREE(table); + } + +@@ -731,7 +731,7 @@ output_check() + register int i; + register int j; + +- printf(" protected static %s short [] yyCheck = {%14d,", ++ fprintf(output_file, " protected static %s short [] yyCheck = {%14d,", + csharp ? "readonly" : "final", + check[0]); + +@@ -741,17 +741,17 @@ output_check() + if (j >= 10) + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + j = 1; + } + else + ++j; + +- printf("%5d,", check[i]); ++ fprintf(output_file, "%5d,", check[i]); + } + + outline += 2; +- printf("\n };\n"); ++ fprintf(output_file, "\n };\n"); + FREE(check); + } + +@@ -801,30 +801,30 @@ char *prefix; + if (is_C_identifier(s)) + { + if (prefix) +- printf(" %s ", prefix); ++ fprintf(output_file, " %s ", prefix); + c = *s; + if (c == '"') + { + while ((c = *++s) != '"') + { +- putchar(c); ++ putc(c, output_file); + } + } + else + { + do + { +- putchar(c); ++ putc(c, output_file); + } + while (c = *++s); + } + ++outline; +- printf(" = %d%s\n", symbol_value[i], csharp ? ";" : ";"); ++ fprintf(output_file, " = %d%s\n", symbol_value[i], csharp ? ";" : ";"); + } + } + + ++outline; +- printf(" %s yyErrorCode = %d%s\n", prefix ? prefix : "", symbol_value[1], csharp ? ";" : ";"); ++ fprintf(output_file, " %s yyErrorCode = %d%s\n", prefix ? prefix : "", symbol_value[1], csharp ? ";" : ";"); + } + + +@@ -842,14 +842,14 @@ char *name; + if ((c = getc(in)) != EOF) { + if (c == '\n') + ++outline; +- putchar(c); ++ putc(c, output_file); + while ((c = getc(in)) != EOF) + { + if (c == '\n') + ++outline; +- putchar(c); ++ putc(c, output_file); + } +- printf(default_line_format, ++outline + 1); ++ fprintf(output_file, default_line_format, ++outline + 1); + } + fclose(in); + } +@@ -862,67 +862,67 @@ output_debug() + char * prefix = tflag ? "" : "//t"; + + ++outline; +- printf(" protected %s int yyFinal = %d;\n", csharp ? "const" : "static final", final_state); ++ fprintf(output_file, " protected %s int yyFinal = %d;\n", csharp ? "const" : "static final", final_state); + + ++outline; +- printf ("%s // Put this array into a separate class so it is only initialized if debugging is actually used\n", prefix); +- printf ("%s // Use MarshalByRefObject to disable inlining\n", prefix); +- printf("%s class YYRules %s {\n", prefix, csharp ? ": MarshalByRefObject" : ""); +- printf("%s public static %s string [] yyRule = {\n", prefix, csharp ? "readonly" : "final"); ++ fprintf(output_file, "%s // Put this array into a separate class so it is only initialized if debugging is actually used\n", prefix); ++ fprintf(output_file, "%s // Use MarshalByRefObject to disable inlining\n", prefix); ++ fprintf(output_file, "%s class YYRules %s {\n", prefix, csharp ? ": MarshalByRefObject" : ""); ++ fprintf(output_file, "%s public static %s string [] yyRule = {\n", prefix, csharp ? "readonly" : "final"); + for (i = 2; i < nrules; ++i) + { +- printf("%s \"%s :", prefix, symbol_name[rlhs[i]]); ++ fprintf(output_file, "%s \"%s :", prefix, symbol_name[rlhs[i]]); + for (j = rrhs[i]; ritem[j] > 0; ++j) + { + s = symbol_name[ritem[j]]; + if (s[0] == '"') + { +- printf(" \\\""); ++ fprintf(output_file, " \\\""); + while (*++s != '"') + { + if (*s == '\\') + { + if (s[1] == '\\') +- printf("\\\\\\\\"); ++ fprintf(output_file, "\\\\\\\\"); + else +- printf("\\\\%c", s[1]); ++ fprintf(output_file, "\\\\%c", s[1]); + ++s; + } + else +- putchar(*s); ++ putc(*s, output_file); + } +- printf("\\\""); ++ fprintf(output_file, "\\\""); + } + else if (s[0] == '\'') + { + if (s[1] == '"') +- printf(" '\\\"'"); ++ fprintf(output_file, " '\\\"'"); + else if (s[1] == '\\') + { + if (s[2] == '\\') +- printf(" '\\\\\\\\"); ++ fprintf(output_file, " '\\\\\\\\"); + else +- printf(" '\\\\%c", s[2]); ++ fprintf(output_file, " '\\\\%c", s[2]); + s += 2; + while (*++s != '\'') +- putchar(*s); +- putchar('\''); ++ putc(*s, output_file); ++ putc('\'', output_file); + } + else +- printf(" '%c'", s[1]); ++ fprintf(output_file, " '%c'", s[1]); + } + else +- printf(" %s", s); ++ fprintf(output_file, " %s", s); + } + ++outline; +- printf("\",\n"); ++ fprintf(output_file, "\",\n"); + } + ++ outline; +- printf("%s };\n", prefix); +- printf ("%s public static string getRule (int index) {\n", prefix); +- printf ("%s return yyRule [index];\n", prefix); +- printf ("%s }\n", prefix); +- printf ("%s}\n", prefix); ++ fprintf(output_file, "%s };\n", prefix); ++ fprintf(output_file, "%s public static string getRule (int index) {\n", prefix); ++ fprintf(output_file, "%s return yyRule [index];\n", prefix); ++ fprintf(output_file, "%s }\n", prefix); ++ fprintf(output_file, "%s}\n", prefix); + + max = 0; + for (i = 2; i < ntokens; ++i) +@@ -931,7 +931,7 @@ output_debug() + + /* need yyNames for yyExpecting() */ + +- printf(" protected static %s string [] yyNames = {", csharp ? "readonly" : "final"); ++ fprintf(output_file, " protected static %s string [] yyNames = {", csharp ? "readonly" : "final"); + symnam = (char **) MALLOC((max+1)*sizeof(char *)); + if (symnam == 0) no_space(); + +@@ -943,7 +943,7 @@ output_debug() + symnam[symbol_value[i]] = symbol_name[i]; + symnam[0] = "end-of-file"; + +- j = 70; fputs(" ", stdout); ++ j = 70; fputs(" ", output_file); + for (i = 0; i <= max; ++i) + { + if (s = symnam[i]) +@@ -965,25 +965,25 @@ output_debug() + if (j > 70) + { + ++outline; +- printf("\n "); ++ fprintf(output_file, "\n "); + j = k; + } +- printf("\"\\\""); ++ fprintf(output_file, "\"\\\""); + s = symnam[i]; + while (*++s != '"') + { + if (*s == '\\') + { +- printf("\\\\"); ++ fprintf(output_file, "\\\\"); + if (*++s == '\\') +- printf("\\\\"); ++ fprintf(output_file, "\\\\"); + else +- putchar(*s); ++ putc(*s, output_file); + } + else +- putchar(*s); ++ putc(*s, output_file); + } +- printf("\\\"\","); ++ fprintf(output_file, "\\\"\","); + } + else if (s[0] == '\'') + { +@@ -993,10 +993,10 @@ output_debug() + if (j > 70) + { + ++outline; +- printf("\n "); ++ fprintf(output_file, "\n "); + j = 7; + } +- printf("\"'\\\"'\","); ++ fprintf(output_file, "\"'\\\"'\","); + } + else + { +@@ -1015,25 +1015,25 @@ output_debug() + if (j > 70) + { + ++outline; +- printf("\n "); ++ fprintf(output_file, "\n "); + j = k; + } +- printf("\"'"); ++ fprintf(output_file, "\"'"); + s = symnam[i]; + while (*++s != '\'') + { + if (*s == '\\') + { +- printf("\\\\"); ++ fprintf(output_file, "\\\\"); + if (*++s == '\\') +- printf("\\\\"); ++ fprintf(output_file, "\\\\"); + else +- putchar(*s); ++ putc(*s, output_file); + } + else +- putchar(*s); ++ putc(*s, output_file); + } +- printf("'\","); ++ fprintf(output_file, "'\","); + } + } + else +@@ -1043,12 +1043,12 @@ output_debug() + if (j > 70) + { + ++outline; +- printf("\n "); ++ fprintf(output_file, "\n "); + j = k; + } +- putchar('"'); +- do { putchar(*s); } while (*++s); +- printf("\","); ++ putc('"', output_file); ++ do { putc(*s, output_file); } while (*++s); ++ fprintf(output_file, "\","); + } + } + else +@@ -1057,14 +1057,14 @@ output_debug() + if (j > 70) + { + ++outline; +- printf("\n "); ++ fprintf(output_file, "\n "); + j = 5; + } +- printf("null,"); ++ fprintf(output_file, "null,"); + } + } + outline += 2; +- printf("\n };\n"); ++ fprintf(output_file, "\n };\n"); + FREE(symnam); + } + +@@ -1084,19 +1084,19 @@ output_trailing_text() + if ((c = getc(in)) == EOF) + return; + ++outline; +- printf(line_format, lineno, input_file_name); ++ fprintf(output_file, line_format, lineno, input_file_name); + if (c == '\n') + ++outline; +- putchar(c); ++ putc(c, output_file); + last = c; + } + else + { + ++outline; +- printf(line_format, lineno, input_file_name); +- do { putchar(c); } while ((c = *++cptr) != '\n'); ++ fprintf(output_file, line_format, lineno, input_file_name); ++ do { putc(c, output_file); } while ((c = *++cptr) != '\n'); + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + last = '\n'; + } + +@@ -1104,16 +1104,16 @@ output_trailing_text() + { + if (c == '\n') + ++outline; +- putchar(c); ++ putc(c, output_file); + last = c; + } + + if (last != '\n') + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + } +- printf(default_line_format, ++outline + 1); ++ fprintf(output_file, default_line_format, ++outline + 1); + } + + +@@ -1132,22 +1132,22 @@ output_semantic_actions() + last = c; + if (c == '\n') + ++outline; +- putchar(c); ++ putc(c, output_file); + while ((c = getc(action_file)) != EOF) + { + if (c == '\n') + ++outline; +- putchar(c); ++ putc(c, output_file); + last = c; + } + + if (last != '\n') + { + ++outline; +- putchar('\n'); ++ putc('\n', output_file); + } + +- printf(default_line_format, ++outline + 1); ++ fprintf(output_file, default_line_format, ++outline + 1); + } + + +diff --git a/mcs/mcs/Makefile b/mcs/mcs/Makefile +index dbd71a3d581..dbf040afdd6 100644 +--- a/mcs/mcs/Makefile ++++ b/mcs/mcs/Makefile +@@ -32,7 +32,7 @@ BUILT_SOURCES = cs-parser.cs + CLEAN_FILES += y.output + + %-parser.cs: %-parser.jay $(topdir)/jay/skeleton.cs +- $(topdir)/jay/jay $(JAY_FLAGS) < $(topdir)/jay/skeleton.cs $< > jay-tmp.out && mv jay-tmp.out $@ ++ $(topdir)/jay/jay $(JAY_FLAGS) -o jay-tmp.out $< < $(topdir)/jay/skeleton.cs && mv jay-tmp.out $@ + + KEEP_OUTPUT_FILE_COPY = yes + +diff --git a/mcs/mcs/argument.cs b/mcs/mcs/argument.cs +index 5b1003dbadf..4c75e41a9e5 100644 +--- a/mcs/mcs/argument.cs ++++ b/mcs/mcs/argument.cs +@@ -38,6 +38,8 @@ namespace Mono.CSharp + // Conditional instance expression inserted as the first argument + ExtensionTypeConditionalAccess = 5 | ConditionalAccessFlag, + ++ Readonly = 6, ++ + ConditionalAccessFlag = 1 << 7 + } + +diff --git a/mcs/mcs/assembly.cs b/mcs/mcs/assembly.cs +index aa4c54317a2..96e43e70d99 100644 +--- a/mcs/mcs/assembly.cs ++++ b/mcs/mcs/assembly.cs +@@ -554,7 +554,8 @@ namespace Mono.CSharp + if (prop != null) { + AttributeEncoder encoder = new AttributeEncoder (); + encoder.EncodeNamedPropertyArgument (prop, new BoolLiteral (Compiler.BuiltinTypes, true, Location.Null)); +- SetCustomAttribute (pa.Constructor, encoder.ToArray ()); ++ SetCustomAttribute (pa.Constructor, encoder.ToArray (out var references)); ++ module.AddAssemblyReferences (references); + } + } + } +diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs +index 83d403118ad..faf2cfaa1d8 100644 +--- a/mcs/mcs/attribute.cs ++++ b/mcs/mcs/attribute.cs +@@ -1064,8 +1064,10 @@ namespace Mono.CSharp { + } + + byte[] cdata; ++ List references; + if (pos_args == null && named_values == null) { + cdata = AttributeEncoder.Empty; ++ references = null; + } else { + AttributeEncoder encoder = new AttributeEncoder (); + +@@ -1138,7 +1140,7 @@ namespace Mono.CSharp { + encoder.EncodeEmptyNamedArguments (); + } + +- cdata = encoder.ToArray (); ++ cdata = encoder.ToArray (out references); + } + + if (!IsConditionallyExcluded (ctor.DeclaringType)) { +@@ -1157,6 +1159,8 @@ namespace Mono.CSharp { + Error_AttributeEmitError (e.Message); + return; + } ++ ++ context.Module.AddAssemblyReferences (references); + } + + if (!usage_attr.AllowMultiple && allEmitted != null) { +@@ -1415,6 +1419,7 @@ namespace Mono.CSharp { + byte[] buffer; + int pos; + const ushort Version = 1; ++ List imports; + + static AttributeEncoder () + { +@@ -1594,7 +1599,15 @@ namespace Mono.CSharp { + public void EncodeTypeName (TypeSpec type) + { + var old_type = type.GetMetaInfo (); +- Encode (type.MemberDefinition.IsImported ? old_type.AssemblyQualifiedName : old_type.FullName); ++ if (type.MemberDefinition.IsImported) { ++ if (imports == null) ++ imports = new List (); ++ ++ imports.Add (old_type.Assembly); ++ Encode (old_type.AssemblyQualifiedName); ++ } else { ++ Encode (old_type.FullName); ++ } + } + + public void EncodeTypeName (TypeContainer type) +@@ -1675,8 +1688,10 @@ namespace Mono.CSharp { + Encode (value); + } + +- public byte[] ToArray () ++ public byte[] ToArray (out List assemblyReferences) + { ++ assemblyReferences = imports; ++ + byte[] buf = new byte[pos]; + Array.Copy (buffer, buf, pos); + return buf; +@@ -1990,7 +2005,8 @@ namespace Mono.CSharp { + encoder.Encode ((int) state); + encoder.EncodeEmptyNamedArguments (); + +- builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray ()); ++ builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray (out var references)); ++ module.AddAssemblyReferences (references); + } + } + +@@ -2024,7 +2040,8 @@ namespace Mono.CSharp { + encoder.Encode ((int) modes); + encoder.EncodeEmptyNamedArguments (); + +- builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray ()); ++ builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray (out var references)); ++ module.AddAssemblyReferences (references); + } + } + +@@ -2050,7 +2067,8 @@ namespace Mono.CSharp { + encoder.Encode ((uint) bits[0]); + encoder.EncodeEmptyNamedArguments (); + +- builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray ()); ++ builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray (out var references)); ++ module.AddAssemblyReferences (references); + } + + public void EmitAttribute (FieldBuilder builder, decimal value, Location loc) +@@ -2068,7 +2086,8 @@ namespace Mono.CSharp { + encoder.Encode ((uint) bits[0]); + encoder.EncodeEmptyNamedArguments (); + +- builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray ()); ++ builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray (out var references)); ++ module.AddAssemblyReferences (references); + } + } + +@@ -2092,7 +2111,8 @@ namespace Mono.CSharp { + encoder.EncodeTypeName (type); + encoder.EncodeEmptyNamedArguments (); + +- builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray ()); ++ builder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray (out var references)); ++ module.AddAssemblyReferences (references); + } + } + +diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs +index 6b1adc297a3..dc61f6dc627 100644 +--- a/mcs/mcs/class.cs ++++ b/mcs/mcs/class.cs +@@ -2117,7 +2117,8 @@ namespace Mono.CSharp + encoder.Encode (GetAttributeDefaultMember ()); + encoder.EncodeEmptyNamedArguments (); + +- TypeBuilder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray ()); ++ TypeBuilder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray (out var references)); ++ Module.AddAssemblyReferences (references); + } + + public override void VerifyMembers () +@@ -3962,7 +3963,10 @@ namespace Mono.CSharp + Report.Error (4013, Location, + "Local variables of type `{0}' cannot be used inside anonymous methods, lambda expressions or query expressions", + MemberType.GetSignatureForError ()); +- } else if (MemberType.IsByRefLike) { ++ } else if (MemberType.IsSpecialRuntimeType) { ++ Report.Error (610, Location, ++ "Field or property cannot be of type `{0}'", MemberType.GetSignatureForError ()); ++ } else { + if ((ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) != 0) + return; + +@@ -3975,9 +3979,6 @@ namespace Mono.CSharp + Report.Error (8345, Location, + "Field or auto-implemented property cannot be of type `{0}' unless it is an instance member of a ref struct", + MemberType.GetSignatureForError ()); +- } else { +- Report.Error (610, Location, +- "Field or property cannot be of type `{0}'", MemberType.GetSignatureForError ()); + } + } + } +diff --git a/mcs/mcs/convert.cs b/mcs/mcs/convert.cs +index ae153fc49e8..2c8d2a0204c 100644 +--- a/mcs/mcs/convert.cs ++++ b/mcs/mcs/convert.cs +@@ -1232,6 +1232,13 @@ namespace Mono.CSharp { + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); + } + ++ if (source_type_expr == source && source_type.IsNullableType) { ++ operators = MemberCache.GetUserOperator (source_type.TypeArguments [0], Operator.OpType.Implicit, declared_only); ++ if (operators != null) { ++ FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); ++ } ++ } ++ + if (!implicitOnly) { + operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Explicit, declared_only); + if (operators != null) { +diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay +index 4d6fcb44c0d..4ca3bf74f3d 100644 +--- a/mcs/mcs/cs-parser.jay ++++ b/mcs/mcs/cs-parser.jay +@@ -34,13 +34,16 @@ namespace Mono.CSharp + Params = 1 << 4, + Arglist = 1 << 5, + DefaultValue = 1 << 6, ++ ReadOnly = 1 << 7, + +- All = Ref | Out | This | Params | Arglist | DefaultValue, ++ All = Ref | Out | This | Params | Arglist | DefaultValue | ReadOnly, + PrimaryConstructor = Ref | Out | Params | DefaultValue + } + + static readonly object ModifierNone = 0; +- ++ static readonly object RefStructToken = new object (); ++ static readonly object RefPartialStructToken = new object (); ++ + NamespaceContainer current_namespace; + TypeContainer current_container; + TypeDefinition current_type; +@@ -338,6 +341,7 @@ namespace Mono.CSharp + %token OPEN_BRACKET_EXPR + %token OPEN_PARENS_DECONSTRUCT + %token REF_STRUCT ++%token REF_PARTIAL + + // Make the parser go into eval mode parsing (statements and compilation units). + %token EVAL_STATEMENT_PARSER +@@ -648,8 +652,8 @@ namespace_or_type_declaration + TypeContainer ds = (TypeContainer)$1; + + if ((ds.ModFlags & (Modifiers.PRIVATE | Modifiers.PROTECTED)) != 0){ +- report.Error (1527, ds.Location, +- "Namespace elements cannot be explicitly declared as private, protected or protected internal"); ++ report.Error (1527, ds.Location, ++ "Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected"); + } + + // Here is a trick, for explicit attributes we don't know where they belong to until +@@ -1028,7 +1032,15 @@ struct_keyword + FeatureIsNotAvailable (GetLocation ($1), "ref structs"); + } + +- $$ = this; ++ $$ = RefStructToken; ++ } ++ | REF_PARTIAL STRUCT ++ { ++ if (lang_version < LanguageVersion.V_7_2) { ++ FeatureIsNotAvailable (GetLocation ($1), "ref structs"); ++ } ++ ++ $$ = RefPartialStructToken; + } + ; + +@@ -1043,8 +1055,13 @@ struct_declaration + if ((mods & Modifiers.READONLY) != 0 && lang_version < LanguageVersion.V_7_2) { + FeatureIsNotAvailable (GetLocation ($4), "readonly structs"); + } +- if ($4 != null) ++ if ($4 != null) { + mods |= Modifiers.REF; ++ if ($4 == RefPartialStructToken) { ++ mods |= Modifiers.PARTIAL; ++ $3 = $4; ++ } ++ } + + lexer.ConstraintsParsing = true; + valid_param_mod = ParameterModifierType.PrimaryConstructor; +@@ -1469,7 +1486,7 @@ method_header + OPEN_PARENS + { + lexer.parsing_generic_declaration = false; +- valid_param_mod = ParameterModifierType.All; ++ valid_param_mod = ParameterModifierType.All; + } + opt_formal_parameter_list CLOSE_PARENS + { +@@ -1569,7 +1586,7 @@ constructor_body + expression SEMICOLON + { + lexer.parsing_block = 0; +- current_block.AddStatement (new ContextualReturn ((Expression) $3)); ++ current_block.AddStatement (CreateExpressionBodiedStatement ((Expression) $3)); + var b = end_block (GetLocation ($4)); + b.IsCompilerGenerated = true; + $$ = b; +@@ -1590,7 +1607,7 @@ expression_block + lambda_arrow_expression SEMICOLON + { + lexer.parsing_block = 0; +- current_block.AddStatement (new ContextualReturn ((Expression) $3)); ++ current_block.AddStatement (CreateExpressionBodiedStatement ((Expression) $3)); + var b = end_block (GetLocation ($4)); + b.IsCompilerGenerated = true; + $$ = b; +@@ -1794,7 +1811,9 @@ parameter_modifiers + Parameter.Modifier mod = (Parameter.Modifier)$1 | p2; + if (((Parameter.Modifier)$1 & p2) == p2) { + Error_DuplicateParameterModifier (lexer.Location, p2); +- } else { ++ } else if ((mod & ~(Parameter.Modifier.This | Parameter.Modifier.ReadOnly)) == 0) { ++ // ok ++ } else { + switch (mod & ~Parameter.Modifier.This) { + case Parameter.Modifier.REF: + report.Error (1101, lexer.Location, "The parameter modifiers `this' and `ref' cannot be used altogether"); +@@ -1836,6 +1855,13 @@ parameter_modifier + + $$ = Parameter.Modifier.This; + } ++ | IN ++ { ++ if (lang_version < LanguageVersion.V_7_2) ++ FeatureIsNotAvailable (GetLocation ($1), "readonly references"); ++ ++ $$ = Parameter.Modifier.ReadOnly; ++ } + ; + + parameter_array +@@ -1871,7 +1897,7 @@ params_modifier + if ((mod & Parameter.Modifier.This) != 0) { + report.Error (1104, GetLocation ($1), "The parameter modifiers `this' and `params' cannot be used altogether"); + } else { +- report.Error (1611, GetLocation ($1), "The params parameter cannot be declared as ref or out"); ++ report.Error (1611, GetLocation ($1), "The params parameter cannot be declared as ref, out or in"); + } + } + | PARAMS params_modifier +@@ -2004,7 +2030,7 @@ indexer_declaration + : opt_attributes opt_modifiers + ref_member_type indexer_declaration_name OPEN_BRACKET + { +- valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue; ++ valid_param_mod = ParameterModifierType.Params | ParameterModifierType.DefaultValue | ParameterModifierType.ReadOnly; + } + opt_formal_parameter_list CLOSE_BRACKET + { +@@ -2181,6 +2207,11 @@ set_accessor_declaration + accessor_body + : block + | expression_block ++ { ++ if (lang_version < LanguageVersion.V_7) { ++ FeatureIsNotAvailable (GetLocation ($1), "expression body property accessor"); ++ } ++ } + | SEMICOLON + { + // TODO: lbag +@@ -2331,7 +2362,7 @@ operator_type + operator_declarator + : operator_type OPERATOR overloadable_operator OPEN_PARENS + { +- valid_param_mod = ParameterModifierType.DefaultValue; ++ valid_param_mod = ParameterModifierType.DefaultValue | ParameterModifierType.ReadOnly; + if ((Operator.OpType) $3 == Operator.OpType.Is) + valid_param_mod |= ParameterModifierType.Out; + } +@@ -2418,7 +2449,7 @@ overloadable_operator + conversion_operator_declarator + : IMPLICIT OPERATOR type OPEN_PARENS + { +- valid_param_mod = ParameterModifierType.DefaultValue; ++ valid_param_mod = ParameterModifierType.DefaultValue | ParameterModifierType.ReadOnly; + } + opt_formal_parameter_list CLOSE_PARENS + { +@@ -2441,7 +2472,7 @@ conversion_operator_declarator + } + | EXPLICIT OPERATOR type OPEN_PARENS + { +- valid_param_mod = ParameterModifierType.DefaultValue; ++ valid_param_mod = ParameterModifierType.DefaultValue | ParameterModifierType.ReadOnly; + } + opt_formal_parameter_list CLOSE_PARENS + { +@@ -2850,6 +2881,11 @@ event_accessor_block + } + | block + | expression_block ++ { ++ if (lang_version < LanguageVersion.V_7) { ++ FeatureIsNotAvailable (GetLocation ($1), "expression body event accessor"); ++ } ++ } + ; + + attributes_without_members +@@ -3014,7 +3050,7 @@ delegate_declaration + ref_member_type type_declaration_name + OPEN_PARENS + { +- valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue; ++ valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.Params | ParameterModifierType.DefaultValue | ParameterModifierType.ReadOnly; + } + opt_formal_parameter_list CLOSE_PARENS + { +@@ -3927,7 +3963,15 @@ non_simple_argument + { + $$ = new Argument (new Arglist (GetLocation ($1))); + lbag.AddLocation ($$, GetLocation ($2), GetLocation ($3)); +- } ++ } ++ | IN variable_reference ++ { ++ if (lang_version < LanguageVersion.V_7_2) ++ FeatureIsNotAvailable (GetLocation ($1), "readonly references"); ++ ++ $$ = new Argument ((Expression) $2, Argument.AType.Readonly); ++ lbag.AddLocation ($$, GetLocation ($1)); ++ } + ; + + out_variable_declaration +@@ -4408,7 +4452,7 @@ opt_anonymous_method_signature + anonymous_method_signature + : OPEN_PARENS + { +- valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; ++ valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.ReadOnly; + } + opt_formal_parameter_list CLOSE_PARENS + { +@@ -5014,36 +5058,47 @@ null_coalescing_expression + } + ; + ++ ++conditional_oper_expr ++ : expression ++ | stackalloc_expression ++ ; ++ + conditional_expression + : null_coalescing_expression +- | null_coalescing_expression INTERR expression COLON expression ++ | null_coalescing_expression INTERR conditional_oper_expr COLON conditional_oper_expr + { + $$ = new Conditional (new BooleanExpression ((Expression) $1), (Expression) $3, (Expression) $5, GetLocation ($2)); + lbag.AddLocation ($$, GetLocation ($4)); + } +- | null_coalescing_expression INTERR expression COLON THROW prefixed_unary_expression ++ | null_coalescing_expression INTERR conditional_oper_expr COLON THROW prefixed_unary_expression + { + if (lang_version < LanguageVersion.V_7) +- FeatureIsNotAvailable (lexer.Location, "throw expression"); ++ FeatureIsNotAvailable (GetLocation ($5), "throw expression"); + + var expr = new ThrowExpression ((Expression) $6, GetLocation ($5)); + $$ = new Conditional (new BooleanExpression ((Expression) $1), (Expression) $3, expr, GetLocation ($2)); + lbag.AddLocation ($$, GetLocation ($4)); + } +- | null_coalescing_expression INTERR expression error ++ | null_coalescing_expression INTERR reference_expression COLON reference_expression ++ { ++ $$ = new Conditional (new BooleanExpression ((Expression) $1), (Expression) $3, (Expression) $5, GetLocation ($2)); ++ lbag.AddLocation ($$, GetLocation ($4)); ++ } ++ | null_coalescing_expression INTERR conditional_oper_expr error + { + Error_SyntaxError (yyToken); + + $$ = new Conditional (new BooleanExpression ((Expression) $1), (Expression) $3, null, GetLocation ($2)); + } +- | null_coalescing_expression INTERR expression COLON error ++ | null_coalescing_expression INTERR conditional_oper_expr COLON error + { + Error_SyntaxError (yyToken); + + $$ = new Conditional (new BooleanExpression ((Expression) $1), (Expression) $3, null, GetLocation ($2)); + lbag.AddLocation ($$, GetLocation ($4)); + } +- | null_coalescing_expression INTERR expression COLON CLOSE_BRACE ++ | null_coalescing_expression INTERR conditional_oper_expr COLON CLOSE_BRACE + { + Error_SyntaxError (Token.CLOSE_BRACE); + +@@ -5308,7 +5363,7 @@ lambda_expression + } + | OPEN_PARENS_LAMBDA + { +- valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; ++ valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.ReadOnly; + } + opt_lambda_parameter_list CLOSE_PARENS ARROW + { +@@ -5322,7 +5377,7 @@ lambda_expression + } + | ASYNC OPEN_PARENS_LAMBDA + { +- valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; ++ valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.ReadOnly; + } + opt_lambda_parameter_list CLOSE_PARENS ARROW + { +@@ -5522,10 +5577,17 @@ modifiers + if ((m1 & m2) != 0) { + report.Error (1004, lexer.Location - ModifiersExtensions.Name (m2).Length, + "Duplicate `{0}' modifier", ModifiersExtensions.Name (m2)); +- } else if ((m2 & Modifiers.AccessibilityMask) != 0 && (m1 & Modifiers.AccessibilityMask) != 0 && +- ((m2 | m1 & Modifiers.AccessibilityMask) != (Modifiers.PROTECTED | Modifiers.INTERNAL))) { +- report.Error (107, lexer.Location - ModifiersExtensions.Name (m2).Length, +- "More than one protection modifier specified"); ++ } else if ((m2 & Modifiers.AccessibilityMask) != 0 && (m1 & Modifiers.AccessibilityMask) != 0) { ++ var accessibility = (m2 | m1 & Modifiers.AccessibilityMask); ++ ++ if (accessibility == (Modifiers.PRIVATE | Modifiers.PROTECTED)) { ++ if (lang_version < LanguageVersion.V_7_2) { ++ FeatureIsNotAvailable (lexer.Location, "private protected"); ++ } ++ } else if (accessibility != (Modifiers.PROTECTED | Modifiers.INTERNAL)) { ++ report.Error (107, lexer.Location - ModifiersExtensions.Name (m2).Length, ++ "More than one protection modifier specified"); ++ } + } + + $$ = m1 | m2; +@@ -6223,11 +6285,28 @@ block_variable_initializer + | STACKALLOC simple_type + { + report.Error (1575, GetLocation ($1), "A stackalloc expression requires [] after type"); +- $$ = new StackAlloc ((Expression) $2, null, GetLocation ($1)); ++ $$ = new StackAlloc ((Expression) $2, null, GetLocation ($1)); + } + | reference_expression + ; + ++stackalloc_expression ++ : STACKALLOC simple_type OPEN_BRACKET_EXPR expression CLOSE_BRACKET ++ { ++ if (lang_version < LanguageVersion.V_7_2) { ++ FeatureIsNotAvailable (GetLocation ($1), "ref structs"); ++ } ++ ++ $$ = new SpanStackAlloc ((Expression) $2, (Expression) $4, GetLocation ($1)); ++ lbag.AddLocation ($$, GetLocation ($3), GetLocation ($5)); ++ } ++ | STACKALLOC simple_type ++ { ++ report.Error (1575, GetLocation ($1), "A stackalloc expression requires [] after type"); ++ $$ = new StackAlloc ((Expression) $2, null, GetLocation ($1)); ++ } ++ ; ++ + reference_expression + : REF expression + { +@@ -7699,7 +7778,7 @@ doc_cref + } + | doc_type_declaration_name DOT THIS OPEN_BRACKET + { +- valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; ++ valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.ReadOnly; + } + opt_doc_parameters CLOSE_BRACKET + { +@@ -7743,7 +7822,7 @@ opt_doc_method_sig + : /* empty */ + | OPEN_PARENS + { +- valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out; ++ valid_param_mod = ParameterModifierType.Ref | ParameterModifierType.Out | ParameterModifierType.ReadOnly; + } + opt_doc_parameters CLOSE_PARENS + { +@@ -7951,6 +8030,14 @@ static bool IsUnaryOperator (Operator.OpType op) + return false; + } + ++static Statement CreateExpressionBodiedStatement (Expression expr) ++{ ++ if (expr is ThrowExpression te) ++ return new StatementExpression (te); ++ ++ return new ContextualReturn (expr); ++} ++ + void syntax_error (Location l, string msg) + { + report.Error (1003, l, "Syntax error, " + msg); +@@ -8430,6 +8517,8 @@ static string GetTokenName (int token) + case Token.READONLY: + return "readonly"; + case Token.REF: ++ case Token.REF_STRUCT: ++ case Token.REF_PARTIAL: + return "ref"; + case Token.RETURN: + return "return"; +@@ -8444,7 +8533,6 @@ static string GetTokenName (int token) + case Token.STATIC: + return "static"; + case Token.STRUCT: +- case Token.REF_STRUCT: + return "struct"; + case Token.SWITCH: + return "switch"; +diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs +index 37edb5c1224..db5ba1f1f1b 100644 +--- a/mcs/mcs/cs-tokenizer.cs ++++ b/mcs/mcs/cs-tokenizer.cs +@@ -825,8 +825,7 @@ namespace Mono.CSharp + next_token == Token.CLASS || + next_token == Token.STRUCT || + next_token == Token.INTERFACE || +- next_token == Token.VOID || +- next_token == Token.REF_STRUCT; ++ next_token == Token.VOID; + + PopPosition (); + +@@ -916,14 +915,20 @@ namespace Mono.CSharp + + break; + case Token.REF: +- if (peek_token () == Token.STRUCT) { ++ var pp = peek_token (); ++ switch (pp) { ++ case Token.STRUCT: + token (); + res = Token.REF_STRUCT; ++ break; ++ case Token.PARTIAL: ++ token (); ++ res = Token.REF_PARTIAL; ++ break; + } + break; + } + +- + return res; + } + +@@ -1212,6 +1217,7 @@ namespace Mono.CSharp + + case Token.REF: + case Token.OUT: ++ case Token.IN: + can_be_type = is_type = false; + continue; + +@@ -1406,6 +1412,8 @@ namespace Mono.CSharp + case Token.INTERPOLATED_STRING: + case Token.THROW: + case Token.DEFAULT_COLON: ++ case Token.REF: ++ case Token.STACKALLOC: + next_token = Token.INTERR; + break; + +@@ -1567,28 +1575,53 @@ namespace Mono.CSharp + { + int d; + bool seen_digits = false; +- +- if (c != -1){ ++ bool digit_separator = false; ++ int prev = c; ++ var loc = Location; ++ ++ if (prev != -1){ + if (number_pos == MaxNumberLength) + Error_NumericConstantTooLong (); +- number_builder [number_pos++] = (char) c; ++ number_builder [number_pos++] = (char) prev; + } +- ++ + // + // We use peek_char2, because decimal_digits needs to do a + // 2-character look-ahead (5.ToString for example). + // + while ((d = peek_char2 ()) != -1){ +- if (d >= '0' && d <= '9'){ ++ if (d >= '0' && d <= '9') { + if (number_pos == MaxNumberLength) + Error_NumericConstantTooLong (); +- number_builder [number_pos++] = (char) d; +- get_char (); ++ number_builder [number_pos++] = (char)d; ++ prev = get_char (); + seen_digits = true; +- } else +- break; ++ continue; ++ } else if (d == '_') { ++ if (!digit_separator) { ++ if (context.Settings.Version < LanguageVersion.V_7) ++ Report.FeatureIsNotAvailable (context, Location, "digit separators"); ++ ++ digit_separator = true; ++ } ++ ++ if (prev == '.') ++ break; ++ ++ if (prev == 'e' || prev == 'E') ++ Error_InvalidNumber (); ++ ++ prev = get_char(); ++ continue; ++ } ++ ++ break; + } + ++ if (prev == '_') { ++ Error_InvalidNumber (); ++ } ++ + return seen_digits; + } + +@@ -1716,9 +1749,8 @@ namespace Mono.CSharp + } catch (OverflowException) { + Error_NumericConstantTooLong (); + return new IntLiteral (context.BuiltinTypes, 0, loc); +- } +- catch (FormatException) { +- Report.Error (1013, Location, "Invalid number"); ++ } catch (FormatException) { ++ Error_InvalidNumber (); + return new IntLiteral (context.BuiltinTypes, 0, loc); + } + } +@@ -1757,14 +1789,41 @@ namespace Mono.CSharp + { + int d; + ulong ul; +- +- get_char (); ++ bool digit_separator = false; ++ int prev = get_char (); ++ + while ((d = peek_char ()) != -1){ + if (is_hex (d)){ + number_builder [number_pos++] = (char) d; + get_char (); +- } else +- break; ++ ++ prev = d; ++ continue; ++ } ++ ++ if (d == '_') { ++ if (prev == 'x' || prev == 'X') ++ Error_InvalidNumber (); ++ ++ get_char (); ++ ++ if (!digit_separator) { ++ if (context.Settings.Version < LanguageVersion.V_7) ++ Report.FeatureIsNotAvailable (context, Location, "digit separators"); ++ ++ digit_separator = true; ++ } ++ ++ prev = d; ++ continue; ++ } ++ ++ break; ++ } ++ ++ if (number_pos == 0 || prev == '_') { ++ Error_InvalidNumber (); ++ return new IntLiteral (context.BuiltinTypes, 0, loc); + } + + string s = new String (number_builder, 0, number_pos); +@@ -1779,13 +1838,65 @@ namespace Mono.CSharp + } catch (OverflowException){ + Error_NumericConstantTooLong (); + return new IntLiteral (context.BuiltinTypes, 0, loc); +- } +- catch (FormatException) { +- Report.Error (1013, Location, "Invalid number"); ++ } catch (FormatException) { ++ Error_InvalidNumber (); + return new IntLiteral (context.BuiltinTypes, 0, loc); + } + } + ++ ILiteralConstant handle_binary (Location loc) ++ { ++ int d; ++ ulong ul = 0; ++ bool digit_separator = false; ++ int digits = 0; ++ int prev = get_char (); ++ ++ while ((d = peek_char ()) != -1){ ++ ++ if (d == '0' || d == '1') { ++ ul = (ul << 1); ++ digits++; ++ if (d == '1') ++ ul |= 1; ++ get_char (); ++ if (digits > 64) { ++ Error_NumericConstantTooLong (); ++ return new IntLiteral (context.BuiltinTypes, 0, loc); ++ } ++ ++ prev = d; ++ continue; ++ } ++ ++ if (d == '_') { ++ if (prev == 'b' || prev == 'B') ++ Error_InvalidNumber (); ++ ++ get_char (); ++ ++ if (!digit_separator) { ++ if (context.Settings.Version < LanguageVersion.V_7) ++ Report.FeatureIsNotAvailable (context, Location, "digit separators"); ++ ++ digit_separator = true; ++ } ++ ++ prev = d; ++ continue; ++ } ++ ++ break; ++ } ++ ++ if (digits == 0 || prev == '_') { ++ Error_InvalidNumber (); ++ return new IntLiteral (context.BuiltinTypes, 0, loc); ++ } ++ ++ return integer_type_suffix (ul, peek_char (), loc); ++ } ++ + // + // Invoked if we know we have .digits or digits + // +@@ -1817,7 +1928,20 @@ namespace Mono.CSharp + + return Token.LITERAL; + } ++ ++ if (peek == 'b' || peek == 'B'){ ++ if (context.Settings.Version < LanguageVersion.V_7) ++ Report.FeatureIsNotAvailable (context, Location, "binary literals"); ++ ++ val = res = handle_binary (loc); ++#if FULL_AST ++ res.ParsedValue = reader.ReadChars (read_start, reader.Position - 1); ++#endif ++ ++ return Token.LITERAL; ++ } + } ++ + decimal_digits (c); + c = peek_char (); + } +@@ -1869,7 +1993,7 @@ namespace Mono.CSharp + Error_NumericConstantTooLong (); + number_builder [number_pos++] = '+'; + } +- ++ + decimal_digits (c); + c = peek_char (); + } +@@ -2944,6 +3068,11 @@ namespace Mono.CSharp + { + Report.Error (1021, Location, "Integral constant is too large"); + } ++ ++ void Error_InvalidNumber () ++ { ++ Report.Error (1013, Location, "Invalid number"); ++ } + + void Error_InvalidDirective () + { +diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs +index 20ee9e73b19..d5926bf4d1f 100644 +--- a/mcs/mcs/ecore.cs ++++ b/mcs/mcs/ecore.cs +@@ -241,7 +241,7 @@ namespace Mono.CSharp { + + protected void CheckExpressionVariable (ResolveContext rc) + { +- if (rc.HasAny (ResolveContext.Options.BaseInitializer | ResolveContext.Options.FieldInitializerScope)) { ++ if (rc.HasAny (ResolveContext.Options.BaseInitializer | ResolveContext.Options.FieldInitializerScope) && rc.CurrentAnonymousMethod == null) { + rc.Report.Error (8200, loc, "Out variable and pattern variable declarations are not allowed within constructor initializers, field initializers, or property initializers"); + } else if (rc.HasSet (ResolveContext.Options.QueryClauseScope)) { + rc.Report.Error (8201, loc, "Out variable and pattern variable declarations are not allowed within a query clause"); +diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs +index 518ccc8ef43..87db14a0ce7 100644 +--- a/mcs/mcs/expression.cs ++++ b/mcs/mcs/expression.cs +@@ -920,7 +920,7 @@ namespace Mono.CSharp + + public override bool ContainsEmitWithAwait () + { +- throw new NotImplementedException (); ++ return false; + } + + public override Expression CreateExpressionTree (ResolveContext ec) +@@ -2051,7 +2051,11 @@ namespace Mono.CSharp + + if (d.BuiltinType == BuiltinTypeSpec.Type.Dynamic) + return this; +- ++ ++ // TODO: Requires custom optimized version with variable store ++ if (Variable != null) ++ return this; ++ + // + // Turn is check into simple null check for implicitly convertible reference types + // +@@ -2757,6 +2761,12 @@ namespace Mono.CSharp + } + } + ++ public override bool IsNull { ++ get { ++ return TypeSpec.IsReferenceType (type); ++ } ++ } ++ + public override bool ContainsEmitWithAwait () + { + return false; +@@ -5669,6 +5679,12 @@ namespace Mono.CSharp + ConvCast.Emit (ec, enum_conversion); + } + ++ public override void EmitPrepare (EmitContext ec) ++ { ++ Left.EmitPrepare (ec); ++ Right.EmitPrepare (ec); ++ } ++ + public override void EmitSideEffect (EmitContext ec) + { + if ((oper & Operator.LogicalMask) != 0 || +@@ -6385,7 +6401,7 @@ namespace Mono.CSharp + } + } + +- if (conv_false_expr != null) { ++ if (conv_false_expr != null && false_type != InternalType.ErrorType && true_type != InternalType.ErrorType) { + ec.Report.Error (172, true_expr.Location, + "Type of conditional expression cannot be determined as `{0}' and `{1}' convert implicitly to each other", + true_type.GetSignatureForError (), false_type.GetSignatureForError ()); +@@ -6398,7 +6414,7 @@ namespace Mono.CSharp + } else if ((conv = Convert.ImplicitConversion (ec, false_expr, true_type, loc)) != null) { + false_expr = conv; + } else { +- if (false_type != InternalType.ErrorType) { ++ if (false_type != InternalType.ErrorType && true_type != InternalType.ErrorType) { + ec.Report.Error (173, true_expr.Location, + "Type of conditional expression cannot be determined because there is no implicit conversion between `{0}' and `{1}'", + true_type.GetSignatureForError (), false_type.GetSignatureForError ()); +@@ -6427,6 +6443,30 @@ namespace Mono.CSharp + return this; + } + ++ public override Expression DoResolveLValue (ResolveContext rc, Expression right_side) ++ { ++ expr = expr.Resolve (rc); ++ true_expr = true_expr.Resolve (rc); ++ false_expr = false_expr.Resolve (rc); ++ ++ if (true_expr == null || false_expr == null || expr == null) ++ return null; ++ ++ if (!(true_expr is ReferenceExpression && false_expr is ReferenceExpression)) { ++ rc.Report.Error (8326, expr.Location, "Both ref conditional operators must be ref values"); ++ return null; ++ } ++ ++ if (!TypeSpecComparer.IsEqual (true_expr.Type, false_expr.Type)) { ++ rc.Report.Error (8327, true_expr.Location, "The ref conditional expression types `{0}' and `{1}' have to match", ++ true_expr.Type.GetSignatureForError (), false_expr.Type.GetSignatureForError ()); ++ } ++ ++ eclass = ExprClass.Value; ++ type = true_expr.Type; ++ return this; ++ } ++ + public override void Emit (EmitContext ec) + { + Label false_target = ec.DefineLabel (); +@@ -6774,7 +6814,7 @@ namespace Mono.CSharp + "Cannot use fixed variable `{0}' inside an anonymous method, lambda expression or query expression", + GetSignatureForError ()); + } else if (local_info.IsByRef || local_info.Type.IsByRefLike) { +- if (ec.CurrentAnonymousMethod is StateMachineInitializer) { ++ if (local_info.Type.IsSpecialRuntimeType || ec.CurrentAnonymousMethod is StateMachineInitializer) { + // It's reported later as 4012/4013 + } else { + ec.Report.Error (8175, loc, +@@ -11877,12 +11917,17 @@ namespace Mono.CSharp + if (!TypeManager.VerifyUnmanaged (ec.Module, otype, loc)) + return null; + +- type = PointerContainer.MakeType (ec.Module, otype); ++ ResolveExpressionType (ec, otype); + eclass = ExprClass.Value; + + return this; + } + ++ protected virtual void ResolveExpressionType (ResolveContext rc, TypeSpec elementType) ++ { ++ type = PointerContainer.MakeType (rc.Module, elementType); ++ } ++ + public override void Emit (EmitContext ec) + { + int size = BuiltinTypeSpec.GetSize (otype); +@@ -11931,14 +11976,36 @@ namespace Mono.CSharp + public bool ResolveSpanConversion (ResolveContext rc, TypeSpec spanType) + { + ctor = MemberCache.FindMember (spanType, MemberFilter.Constructor (ParametersCompiled.CreateFullyResolved (PointerContainer.MakeType (rc.Module, rc.Module.Compiler.BuiltinTypes.Void), rc.Module.Compiler.BuiltinTypes.Int)), BindingRestriction.DeclaredOnly) as MethodSpec; +- if (ctor == null) ++ if (ctor == null) { ++ this.type = InternalType.ErrorType; + return false; ++ } + + this.type = spanType; + return true; + } + } + ++ class SpanStackAlloc : StackAlloc ++ { ++ public SpanStackAlloc (Expression type, Expression count, Location l) ++ : base (type, count, l) ++ { ++ } ++ ++ protected override void ResolveExpressionType (ResolveContext rc, TypeSpec elementType) ++ { ++ var span = rc.Module.PredefinedTypes.SpanGeneric.Resolve (); ++ if (span == null) { ++ type = InternalType.ErrorType; ++ return; ++ } ++ ++ type = span.MakeGenericType (rc, new [] { elementType }); ++ ResolveSpanConversion (rc, type); ++ } ++ } ++ + // + // An object initializer expression + // +@@ -13085,6 +13152,9 @@ namespace Mono.CSharp + if (expr is IAssignMethod) + return true; + ++ if (expr is Conditional) ++ return true; ++ + var invocation = expr as Invocation; + if (invocation?.Type.Kind == MemberKind.ByRef) + return true; +@@ -13232,6 +13302,10 @@ namespace Mono.CSharp + this.loc = loc; + } + ++ protected override void CloneTo (CloneContext clonectx, Expression t) ++ { ++ } ++ + public override Expression CreateExpressionTree (ResolveContext ec) + { + throw new NotImplementedException (); +diff --git a/mcs/mcs/field.cs b/mcs/mcs/field.cs +index 86bb028defc..8c667328143 100644 +--- a/mcs/mcs/field.cs ++++ b/mcs/mcs/field.cs +@@ -542,7 +542,7 @@ namespace Mono.CSharp + } + ); + +- fixed_buffer_type.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray ()); ++ fixed_buffer_type.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray (out _)); + #endif + // + // Don't emit FixedBufferAttribute attribute for private types +@@ -559,7 +559,8 @@ namespace Mono.CSharp + encoder.Encode (buffer_size); + encoder.EncodeEmptyNamedArguments (); + +- FieldBuilder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray ()); ++ FieldBuilder.SetCustomAttribute ((ConstructorInfo) ctor.GetMetaInfo (), encoder.ToArray (out var references)); ++ Module.AddAssemblyReferences (references); + } + } + +diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs +index ec2965df63b..0c7032b2088 100644 +--- a/mcs/mcs/generic.cs ++++ b/mcs/mcs/generic.cs +@@ -3381,7 +3381,7 @@ namespace Mono.CSharp { + continue; + + var bound = candidates [ci]; +- if (bound.Type == best_candidate) ++ if (TypeSpecComparer.IsEqual (bound.Type, best_candidate)) + continue; + + int cii = 0; +diff --git a/mcs/mcs/modifiers.cs b/mcs/mcs/modifiers.cs +index 926ab5d1848..21dd52b3b14 100644 +--- a/mcs/mcs/modifiers.cs ++++ b/mcs/mcs/modifiers.cs +@@ -74,6 +74,8 @@ namespace Mono.CSharp + return "internal"; + case Modifiers.PRIVATE: + return "private"; ++ case Modifiers.PRIVATE | Modifiers.PROTECTED: ++ return "private protected"; + default: + throw new NotImplementedException (mod.ToString ()); + } +@@ -129,12 +131,16 @@ namespace Mono.CSharp + if ((modB & Modifiers.PUBLIC) != 0) { + flags = Modifiers.PROTECTED | Modifiers.INTERNAL | Modifiers.PRIVATE; + } else if ((modB & Modifiers.PROTECTED) != 0) { +- if ((modB & Modifiers.INTERNAL) != 0) +- flags = Modifiers.PROTECTED | Modifiers.INTERNAL; +- +- flags |= Modifiers.PRIVATE; +- } else if ((modB & Modifiers.INTERNAL) != 0) ++ if ((modB & Modifiers.INTERNAL) != 0) { ++ flags = Modifiers.PROTECTED | Modifiers.INTERNAL | Modifiers.PRIVATE; ++ } else { ++ modA &= ~Modifiers.PROTECTED; ++ flags = Modifiers.PRIVATE; ++ } ++ } else if ((modB & Modifiers.INTERNAL) != 0) { ++ modA &= ~Modifiers.PROTECTED; + flags = Modifiers.PRIVATE; ++ } + + return modB != modA && (modA & (~flags)) == 0; + } +@@ -151,6 +157,8 @@ namespace Mono.CSharp + } else { + if ((mod_flags & Modifiers.PUBLIC) != 0) + t = TypeAttributes.NestedPublic; ++ else if ((mod_flags & (Modifiers.PROTECTED | Modifiers.PRIVATE)) == (Modifiers.PROTECTED | Modifiers.PRIVATE)) ++ t = TypeAttributes.NestedFamANDAssem; + else if ((mod_flags & Modifiers.PRIVATE) != 0) + t = TypeAttributes.NestedPrivate; + else if ((mod_flags & (Modifiers.PROTECTED | Modifiers.INTERNAL)) == (Modifiers.PROTECTED | Modifiers.INTERNAL)) +@@ -173,18 +181,27 @@ namespace Mono.CSharp + { + FieldAttributes fa = 0; + +- if ((mod_flags & Modifiers.PUBLIC) != 0) ++ switch (mod_flags & Modifiers.AccessibilityMask) { ++ case Modifiers.PUBLIC: + fa |= FieldAttributes.Public; +- if ((mod_flags & Modifiers.PRIVATE) != 0) ++ break; ++ case Modifiers.PRIVATE: + fa |= FieldAttributes.Private; +- if ((mod_flags & Modifiers.PROTECTED) != 0) { +- if ((mod_flags & Modifiers.INTERNAL) != 0) +- fa |= FieldAttributes.FamORAssem; +- else +- fa |= FieldAttributes.Family; +- } else { +- if ((mod_flags & Modifiers.INTERNAL) != 0) +- fa |= FieldAttributes.Assembly; ++ break; ++ case Modifiers.PROTECTED | Modifiers.INTERNAL: ++ fa |= FieldAttributes.FamORAssem; ++ break; ++ case Modifiers.PROTECTED: ++ fa |= FieldAttributes.Family; ++ break; ++ case Modifiers.INTERNAL: ++ fa |= FieldAttributes.Assembly; ++ break; ++ case Modifiers.PRIVATE | Modifiers.PROTECTED: ++ fa |= FieldAttributes.FamANDAssem; ++ break; ++ default: ++ throw new NotImplementedException (mod_flags.ToString ()); + } + + if ((mod_flags & Modifiers.STATIC) != 0) +@@ -215,6 +232,9 @@ namespace Mono.CSharp + case Modifiers.INTERNAL: + ma |= MethodAttributes.Assembly; + break; ++ case Modifiers.PRIVATE | Modifiers.PROTECTED: ++ ma |= MethodAttributes.FamANDAssem; ++ break; + default: + throw new NotImplementedException (mod_flags.ToString ()); + } +diff --git a/mcs/mcs/module.cs b/mcs/mcs/module.cs +index 2293d825b36..4680433bb01 100644 +--- a/mcs/mcs/module.cs ++++ b/mcs/mcs/module.cs +@@ -480,6 +480,18 @@ namespace Mono.CSharp + attributes.AddAttribute (attr); + } + ++ public void AddAssemblyReferences (List names) ++ { ++ if (names == null) ++ return; ++ ++#if STATIC ++ foreach (var name in names) { ++ Builder.__GetAssemblyToken (name); ++ } ++#endif ++ } ++ + public override void AddTypeContainer (TypeContainer tc) + { + AddTypeContainerMember (tc); +diff --git a/mcs/mcs/parameter.cs b/mcs/mcs/parameter.cs +index cc10eee162b..95851478010 100644 +--- a/mcs/mcs/parameter.cs ++++ b/mcs/mcs/parameter.cs +@@ -221,12 +221,13 @@ namespace Mono.CSharp { + REF = 1 << 1, + OUT = 1 << 2, + This = 1 << 3, +- CallerMemberName = 1 << 4, +- CallerLineNumber = 1 << 5, +- CallerFilePath = 1 << 6, ++ ReadOnly = 1 << 4, ++ CallerMemberName = 1 << 5, ++ CallerLineNumber = 1 << 6, ++ CallerFilePath = 1 << 7, + + RefOutMask = REF | OUT, +- ModifierMask = PARAMS | REF | OUT | This, ++ ModifierMask = PARAMS | REF | OUT | This | ReadOnly, + CallerMask = CallerMemberName | CallerLineNumber | CallerFilePath + } + +@@ -1474,9 +1475,9 @@ namespace Mono.CSharp { + } + } + +- if (!expr.IsNull && TypeSpec.IsReferenceType (parameter_type) && parameter_type.BuiltinType != BuiltinTypeSpec.Type.String) { ++ if (!res.IsNull && TypeSpec.IsReferenceType (parameter_type) && parameter_type.BuiltinType != BuiltinTypeSpec.Type.String) { + rc.Report.Error (1763, Location, +- "Optional parameter `{0}' of type `{1}' can only be initialized with `null'", ++ "Optional parameter `{0}' of type `{1}' can only be initialized with default value", + p.Name, parameter_type.GetSignatureForError ()); + + return; +diff --git a/mcs/mcs/report.cs b/mcs/mcs/report.cs +index cc3d82b26e0..5d64c8e766e 100644 +--- a/mcs/mcs/report.cs ++++ b/mcs/mcs/report.cs +@@ -42,7 +42,7 @@ namespace Mono.CSharp { + public static readonly int[] AllWarnings = new int[] { + 28, 67, 78, + 105, 108, 109, 114, 162, 164, 168, 169, 183, 184, 197, +- 219, 251, 252, 253, 278, 282, ++ 219, 251, 252, 253, 278, 280, 282, + 402, 414, 419, 420, 429, 436, 437, 440, 458, 464, 465, 467, 469, 472, 473, + 612, 618, 626, 628, 642, 649, 652, 657, 658, 659, 660, 661, 665, 672, 675, 693, + 728, +@@ -107,6 +107,15 @@ namespace Mono.CSharp { + case LanguageVersion.V_7: + version = "7.0"; + break; ++ case LanguageVersion.V_7_1: ++ version = "7.1"; ++ break; ++ case LanguageVersion.V_7_2: ++ version = "7.2"; ++ break; ++ case LanguageVersion.V_7_3: ++ version = "7.3"; ++ break; + default: + throw new InternalErrorException ("Invalid feature version", compiler.Settings.Version); + } +diff --git a/mcs/mcs/settings.cs b/mcs/mcs/settings.cs +index 37664187c71..976c9b68128 100644 +--- a/mcs/mcs/settings.cs ++++ b/mcs/mcs/settings.cs +@@ -32,10 +32,11 @@ namespace Mono.CSharp { + V_7 = 7, + V_7_1 = 71, + V_7_2 = 72, ++ V_7_3 = 73, + Experimental = 100, + + Default = V_7, +- Latest = V_7_2 ++ Latest = V_7_3 + } + + public enum RuntimeVersion +@@ -1270,6 +1271,7 @@ namespace Mono.CSharp { + case "/highentropyva+": + case "/highentropyva-": + case "/link": ++ case "/sourcelink": + case "/moduleassemblyname": + case "/nowin32manifest": + case "/pdb": +diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs +index 9c51128548f..c8b77c1adc1 100644 +--- a/mcs/mcs/statement.cs ++++ b/mcs/mcs/statement.cs +@@ -928,8 +928,7 @@ namespace Mono.CSharp { + public override Reachability MarkReachable (Reachability rc) + { + base.MarkReachable (rc); +- expr.MarkReachable (rc); +- return rc; ++ return expr.MarkReachable (rc); + } + + public override bool Resolve (BlockContext ec) +@@ -2419,6 +2418,7 @@ namespace Mono.CSharp { + IsLocked = 1 << 8, + SymbolFileHidden = 1 << 9, + ByRef = 1 << 10, ++ PointerByRef = 1 << 11, + + ReadonlyMask = 1 << 20 + } +@@ -2609,20 +2609,22 @@ namespace Mono.CSharp { + + if (IsByRef) { + builder = ec.DeclareLocal (ReferenceContainer.MakeType (ec.Module, Type), IsFixed); ++ } else if ((flags & Flags.PointerByRef) != 0) { ++ builder = ec.DeclareLocal (ReferenceContainer.MakeType (ec.Module, ((PointerContainer) Type).Element), IsFixed); + } else { + // + // All fixed variabled are pinned, a slot has to be alocated + // +- builder = ec.DeclareLocal(Type, IsFixed); ++ builder = ec.DeclareLocal (Type, IsFixed); + } + + if ((flags & Flags.SymbolFileHidden) == 0) + ec.DefineLocalVariable (name, builder); + } + +- public static LocalVariable CreateCompilerGenerated (TypeSpec type, Block block, Location loc, bool writeToSymbolFile = false) ++ public static LocalVariable CreateCompilerGenerated (TypeSpec type, Block block, Location loc, bool writeToSymbolFile = false, Flags additionalFlags = 0) + { +- LocalVariable li = new LocalVariable (block, GetCompilerGeneratedName (block), Flags.CompilerGenerated | Flags.Used, loc); ++ LocalVariable li = new LocalVariable (block, GetCompilerGeneratedName (block), Flags.CompilerGenerated | Flags.Used | additionalFlags, loc); + if (!writeToSymbolFile) + li.flags |= Flags.SymbolFileHidden; + +@@ -2725,6 +2727,11 @@ namespace Mono.CSharp { + flags |= Flags.Used; + } + ++ public void SetIsPointerByRef () ++ { ++ flags |= Flags.PointerByRef; ++ } ++ + public void SetHasAddressTaken () + { + flags |= (Flags.AddressTaken | Flags.Used); +@@ -6562,18 +6569,26 @@ namespace Mono.CSharp { + + // TODO: Should use Binary::Add + pinned_string.Emit (ec); +- ec.Emit (OpCodes.Conv_I); ++ ec.Emit (OpCodes.Conv_U); + + var m = ec.Module.PredefinedMembers.RuntimeHelpersOffsetToStringData.Resolve (loc); + if (m == null) + return; + ++ var null_value = ec.DefineLabel (); ++ vi.EmitAssign (ec); ++ vi.Emit (ec); ++ ec.Emit (OpCodes.Brfalse_S, null_value); ++ ++ vi.Emit (ec); + PropertyExpr pe = new PropertyExpr (m, pinned_string.Location); + //pe.InstanceExpression = pinned_string; + pe.Resolve (new ResolveContext (ec.MemberContext)).Emit (ec); + + ec.Emit (OpCodes.Add); + vi.EmitAssign (ec); ++ ++ ec.MarkLabel (null_value); + } + + public override void EmitExit (EmitContext ec) +@@ -6660,31 +6675,94 @@ namespace Mono.CSharp { + return new ExpressionEmitter (res, li); + } + +- bool already_fixed = true; +- + // + // Case 4: & object. + // + Unary u = res as Unary; + if (u != null) { ++ bool already_fixed = true; ++ + if (u.Oper == Unary.Operator.AddressOf) { + IVariableReference vr = u.Expr as IVariableReference; + if (vr == null || !vr.IsFixed) { + already_fixed = false; + } + } +- } else if (initializer is Cast) { ++ ++ if (already_fixed) { ++ bc.Report.Error (213, loc, "You cannot use the fixed statement to take the address of an already fixed expression"); ++ return null; ++ } ++ ++ res = Convert.ImplicitConversionRequired (bc, res, li.Type, loc); ++ return new ExpressionEmitter (res, li); ++ } ++ ++ if (initializer is Cast) { + bc.Report.Error (254, initializer.Location, "The right hand side of a fixed statement assignment may not be a cast expression"); + return null; + } + +- if (already_fixed) { +- bc.Report.Error (213, loc, "You cannot use the fixed statement to take the address of an already fixed expression"); ++ // ++ // Case 5: by-ref GetPinnableReference method on the rhs expression ++ // ++ var method = GetPinnableReference (bc, res); ++ if (method == null) { ++ bc.Report.Error (8385, initializer.Location, "The given expression cannot be used in a fixed statement"); ++ return null; ++ } ++ ++ var compiler = bc.Module.Compiler; ++ if (compiler.Settings.Version < LanguageVersion.V_7_3) { ++ bc.Report.FeatureIsNotAvailable (compiler, initializer.Location, "extensible fixed statement"); ++ } ++ ++ method.InstanceExpression = res; ++ res = new Invocation.Predefined (method, null).ResolveLValue (bc, EmptyExpression.OutAccess); ++ if (res == null) ++ return null; ++ ++ ReferenceContainer rType = (ReferenceContainer)method.BestCandidateReturnType; ++ PointerContainer lType = li.Type as PointerContainer; ++ if (rType.Element != lType?.Element) { ++ // CSC: Should be better error code ++ res.Error_ValueCannotBeConverted (bc, lType, false); ++ return null; + } + +- res = Convert.ImplicitConversionRequired (bc, res, li.Type, loc); ++ li.SetIsPointerByRef (); + return new ExpressionEmitter (res, li); + } ++ ++ MethodGroupExpr GetPinnableReference (BlockContext bc, Expression expr) ++ { ++ TypeSpec type = expr.Type; ++ var mexpr = Expression.MemberLookup (bc, false, type, ++ "GetPinnableReference", 0, Expression.MemberLookupRestrictions.ExactArity, loc); ++ ++ if (mexpr == null) ++ return null; ++ ++ var mg = mexpr as MethodGroupExpr; ++ if (mg == null) ++ return null; ++ ++ mg.InstanceExpression = expr; ++ ++ // TODO: handle extension methods ++ Arguments args = new Arguments (0); ++ mg = mg.OverloadResolve (bc, ref args, null, OverloadResolver.Restrictions.None); ++ ++ if (mg == null || mg.BestCandidate.IsStatic || !mg.BestCandidate.IsPublic || mg.BestCandidateReturnType.Kind != MemberKind.ByRef || !mg.BestCandidate.Parameters.IsEmpty) { ++ if (bc.Module.Compiler.Settings.Version > LanguageVersion.V_7_2) { ++ bc.Report.Warning (280, 2, expr.Location, "`{0}' has the wrong signature to be used in extensible fixed statement", mg.GetSignatureForError ()); ++ } ++ ++ return null; ++ } ++ ++ return mg; ++ } + } + + +diff --git a/mcs/mcs/tuples.cs b/mcs/mcs/tuples.cs +index 901efdc9541..0b56859615f 100644 +--- a/mcs/mcs/tuples.cs ++++ b/mcs/mcs/tuples.cs +@@ -267,6 +267,11 @@ namespace Mono.CSharp + this.Location = expr.Location; + } + ++ public TupleLiteralElement Clone (CloneContext clonectx) ++ { ++ return new TupleLiteralElement (Name, Expr.Clone (clonectx), Location); ++ } ++ + public string Name { get; private set; } + public Expression Expr { get; set; } + public Location Location { get; private set; } +@@ -288,6 +293,16 @@ namespace Mono.CSharp + } + } + ++ protected override void CloneTo (CloneContext clonectx, Expression t) ++ { ++ var clone = new List (elements.Count); ++ foreach (var te in elements) ++ clone.Add (te.Clone (clonectx)); ++ ++ TupleLiteral target = (TupleLiteral)t; ++ target.elements = clone; ++ } ++ + public static bool ContainsNoTypeElement (TypeSpec type) + { + var ta = type.TypeArguments; +@@ -432,6 +447,7 @@ namespace Mono.CSharp + { + Expression source; + List targetExprs; ++ List tempExprs; + List variables; + Expression instance; + +@@ -440,6 +456,8 @@ namespace Mono.CSharp + this.source = source; + this.targetExprs = targetExprs; + this.loc = loc; ++ ++ tempExprs = new List (); + } + + public TupleDeconstruct (List variables, Expression source, Location loc) +@@ -447,6 +465,8 @@ namespace Mono.CSharp + this.source = source; + this.variables = variables; + this.loc = loc; ++ ++ tempExprs = new List (); + } + + public override Expression CreateExpressionTree (ResolveContext ec) +@@ -492,6 +512,15 @@ namespace Mono.CSharp + instance = expr_variable.CreateReferenceExpression (rc, loc); + } + ++ var element_srcs = new List (); ++ var src_names = new List (); ++ for (int i = 0; i < target_count; ++i) { ++ var element_src = tupleLiteral == null ? new MemberAccess (instance, NamedTupleSpec.GetElementPropertyName (i)) : tupleLiteral.Elements [i].Expr; ++ element_srcs.Add (element_src); ++ if (element_src is VariableReference) ++ src_names.Add ((element_src as VariableReference)?.Name); ++ } ++ + for (int i = 0; i < target_count; ++i) { + var tle = src_type.TypeArguments [i]; + +@@ -522,8 +551,17 @@ namespace Mono.CSharp + variable.PrepareAssignmentAnalysis ((BlockContext)rc); + } + +- var element_src = tupleLiteral == null ? new MemberAccess (instance, NamedTupleSpec.GetElementPropertyName (i)) : tupleLiteral.Elements [i].Expr; +- targetExprs [i] = new SimpleAssign (targetExprs [i], element_src).Resolve (rc); ++ var element_target = (targetExprs [i] as SimpleName)?.LookupNameExpression (rc, MemberLookupRestrictions.None); ++ ++ if (element_target != null && src_names.Contains ((element_target as VariableReference)?.Name)) { ++ var tempType = element_target.Resolve (rc).Type; ++ ++ var temp = new LocalTemporary (tempType); ++ tempExprs.Add (new SimpleAssign (temp, element_srcs [i]).Resolve (rc)); ++ targetExprs [i] = new SimpleAssign (targetExprs [i], temp).Resolve (rc); ++ } else { ++ targetExprs [i] = new SimpleAssign (targetExprs [i], element_srcs [i]).Resolve (rc); ++ } + } + + eclass = ExprClass.Value; +@@ -557,9 +595,24 @@ namespace Mono.CSharp + if (instance != null) + ((ExpressionStatement)source).EmitStatement (ec); + +- foreach (ExpressionStatement expr in targetExprs) ++ foreach (ExpressionStatement expr in tempExprs) { ++ var temp = (expr as Assign)?.Target as LocalTemporary; ++ if (temp == null) ++ continue; ++ ++ temp.AddressOf (ec, AddressOp.LoadStore); ++ ec.Emit (OpCodes.Initobj, temp.Type); ++ expr.Emit (ec); ++ } ++ ++ foreach (ExpressionStatement expr in targetExprs) { + expr.Emit (ec); + ++ var temp = (expr as Assign)?.Source as LocalTemporary; ++ if (temp != null) ++ temp.Release (ec); ++ } ++ + var ctor = MemberCache.FindMember (type, MemberFilter.Constructor (null), BindingRestriction.DeclaredOnly | BindingRestriction.InstanceOnly) as MethodSpec; + ec.Emit (OpCodes.Newobj, ctor); + } +@@ -574,9 +627,24 @@ namespace Mono.CSharp + + if (instance != null) + ((ExpressionStatement) source).EmitStatement (ec); +- +- foreach (ExpressionStatement expr in targetExprs) ++ ++ foreach (ExpressionStatement expr in tempExprs) { ++ var temp = (expr as Assign)?.Target as LocalTemporary; ++ if (temp == null) ++ continue; ++ ++ temp.AddressOf (ec, AddressOp.LoadStore); ++ ec.Emit (OpCodes.Initobj, temp.Type); ++ expr.EmitStatement (ec); ++ } ++ ++ foreach (ExpressionStatement expr in targetExprs) { + expr.EmitStatement (ec); ++ ++ var temp = (expr as Assign)?.Source as LocalTemporary; ++ if (temp != null) ++ temp.Release (ec); ++ } + } + + public void Emit (EmitContext ec, bool leave_copy) +@@ -594,6 +662,7 @@ namespace Mono.CSharp + + public override void FlowAnalysis (FlowAnalysisContext fc) + { ++ source.FlowAnalysis (fc); + foreach (var expr in targetExprs) + expr.FlowAnalysis (fc); + } +diff --git a/mcs/nunit24/ClientUtilities/util/AssemblyInfo.cs b/mcs/nunit24/ClientUtilities/util/AssemblyInfo.cs +index 919ca07ace3..6489c1b2a58 100644 +--- a/mcs/nunit24/ClientUtilities/util/AssemblyInfo.cs ++++ b/mcs/nunit24/ClientUtilities/util/AssemblyInfo.cs +@@ -5,7 +5,3 @@ + // **************************************************************** + + using System.Reflection; +- +-[assembly: AssemblyDelaySign(false)] +-[assembly: AssemblyKeyFile("../../nunit.snk")] +-[assembly: AssemblyKeyName("")] +diff --git a/mcs/nunit24/ConsoleRunner/nunit-console/AssemblyInfo.cs b/mcs/nunit24/ConsoleRunner/nunit-console/AssemblyInfo.cs +index 919ca07ace3..6489c1b2a58 100644 +--- a/mcs/nunit24/ConsoleRunner/nunit-console/AssemblyInfo.cs ++++ b/mcs/nunit24/ConsoleRunner/nunit-console/AssemblyInfo.cs +@@ -5,7 +5,3 @@ + // **************************************************************** + + using System.Reflection; +- +-[assembly: AssemblyDelaySign(false)] +-[assembly: AssemblyKeyFile("../../nunit.snk")] +-[assembly: AssemblyKeyName("")] +diff --git a/mcs/nunit24/NUnitCore/core/AssemblyInfo.cs b/mcs/nunit24/NUnitCore/core/AssemblyInfo.cs +index 747032c7e63..2f66d80222c 100644 +--- a/mcs/nunit24/NUnitCore/core/AssemblyInfo.cs ++++ b/mcs/nunit24/NUnitCore/core/AssemblyInfo.cs +@@ -7,7 +7,3 @@ using System; + using System.Reflection; + + [assembly: CLSCompliant(true)] +- +-[assembly: AssemblyDelaySign(false)] +-[assembly: AssemblyKeyFile("../../nunit.snk")] +-[assembly: AssemblyKeyName("")] +diff --git a/mcs/nunit24/NUnitCore/interfaces/AssemblyInfo.cs b/mcs/nunit24/NUnitCore/interfaces/AssemblyInfo.cs +index fa86732b3d3..efeaecf1986 100644 +--- a/mcs/nunit24/NUnitCore/interfaces/AssemblyInfo.cs ++++ b/mcs/nunit24/NUnitCore/interfaces/AssemblyInfo.cs +@@ -8,7 +8,3 @@ using System; + using System.Reflection; + + [assembly: CLSCompliant(true)] +- +-[assembly: AssemblyDelaySign(false)] +-[assembly: AssemblyKeyFile("../../nunit.snk")] +-[assembly: AssemblyKeyName("")] +diff --git a/mcs/nunit24/NUnitExtensions/core/AssemblyInfo.cs b/mcs/nunit24/NUnitExtensions/core/AssemblyInfo.cs +index fa86732b3d3..efeaecf1986 100644 +--- a/mcs/nunit24/NUnitExtensions/core/AssemblyInfo.cs ++++ b/mcs/nunit24/NUnitExtensions/core/AssemblyInfo.cs +@@ -8,7 +8,3 @@ using System; + using System.Reflection; + + [assembly: CLSCompliant(true)] +- +-[assembly: AssemblyDelaySign(false)] +-[assembly: AssemblyKeyFile("../../nunit.snk")] +-[assembly: AssemblyKeyName("")] +diff --git a/mcs/nunit24/NUnitExtensions/framework/AssemblyInfo.cs b/mcs/nunit24/NUnitExtensions/framework/AssemblyInfo.cs +index a9553f691cd..2b4b5bfb340 100644 +--- a/mcs/nunit24/NUnitExtensions/framework/AssemblyInfo.cs ++++ b/mcs/nunit24/NUnitExtensions/framework/AssemblyInfo.cs +@@ -8,7 +8,3 @@ using System; + using System.Reflection; + + [assembly: CLSCompliant(true)] +- +-[assembly: AssemblyDelaySign(false)] +-[assembly: AssemblyKeyFile("../../nunit.snk")] +-[assembly: AssemblyKeyName("")] +diff --git a/mcs/nunit24/NUnitFramework/framework/AssemblyInfo.cs b/mcs/nunit24/NUnitFramework/framework/AssemblyInfo.cs +index fa86732b3d3..efeaecf1986 100644 +--- a/mcs/nunit24/NUnitFramework/framework/AssemblyInfo.cs ++++ b/mcs/nunit24/NUnitFramework/framework/AssemblyInfo.cs +@@ -8,7 +8,3 @@ using System; + using System.Reflection; + + [assembly: CLSCompliant(true)] +- +-[assembly: AssemblyDelaySign(false)] +-[assembly: AssemblyKeyFile("../../nunit.snk")] +-[assembly: AssemblyKeyName("")] +diff --git a/mcs/nunit24/NUnitMocks/mocks/AssemblyInfo.cs b/mcs/nunit24/NUnitMocks/mocks/AssemblyInfo.cs +index 599b04ce453..f87ae602810 100644 +--- a/mcs/nunit24/NUnitMocks/mocks/AssemblyInfo.cs ++++ b/mcs/nunit24/NUnitMocks/mocks/AssemblyInfo.cs +@@ -6,7 +6,3 @@ + + using System; + using System.Reflection; +- +-[assembly: AssemblyDelaySign(false)] +-[assembly: AssemblyKeyFile("../../nunit.snk")] +-[assembly: AssemblyKeyName("")] +diff --git a/mcs/tests/dtest-066.cs b/mcs/tests/dtest-066.cs +new file mode 100644 +index 00000000000..893fb40dffa +--- /dev/null ++++ b/mcs/tests/dtest-066.cs +@@ -0,0 +1,13 @@ ++class C ++{ ++ static void Main() ++ { ++ object o = 1; ++ dynamic d = 1; ++ ++ var a = new[] { ++ new { X = o }, ++ new { X = d } ++ }; ++ } ++} +diff --git a/mcs/tests/gtest-647.cs b/mcs/tests/gtest-647.cs +new file mode 100644 +index 00000000000..4aae641f85f +--- /dev/null ++++ b/mcs/tests/gtest-647.cs +@@ -0,0 +1,34 @@ ++using System; ++ ++public class Program ++{ ++ public static int Main () ++ { ++ int B = default (MyStruct?); ++ if (MyStruct.counter != 1) ++ return 1; ++ ++ switch (default (MyStruct?)) { ++ case 0: ++ break; ++ default: ++ return 2; ++ } ++ ++ if (MyStruct.counter != 2) ++ return 4; ++ ++ return 0; ++ } ++ ++ public struct MyStruct ++ { ++ public static int counter; ++ ++ public static implicit operator int (MyStruct? s) ++ { ++ ++counter; ++ return 0; ++ } ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-928.cs b/mcs/tests/test-928.cs +index 90180137957..290ee4d1fb3 100644 +--- a/mcs/tests/test-928.cs ++++ b/mcs/tests/test-928.cs +@@ -15,6 +15,24 @@ unsafe class Program + } + } + ++ public static bool StringNull (string s) ++ { ++ unsafe { ++ fixed (char *a = s) { ++ return a == null; ++ } ++ } ++ } ++ ++ public static bool ArrayNull (int[] a) ++ { ++ unsafe { ++ fixed (int *e = a) { ++ return e == null; ++ } ++ } ++ } ++ + public static int Main () + { + Test (); +@@ -24,6 +42,12 @@ unsafe class Program + if (lv.IsPinned) + return 1; + ++ if (!StringNull (null)) ++ return 1; ++ ++ if (!ArrayNull (null)) ++ return 2; ++ + return 0; + } + } +diff --git a/mcs/tests/test-948.cs b/mcs/tests/test-948.cs +index 34b3ab9a0c4..563e37dc7d5 100644 +--- a/mcs/tests/test-948.cs ++++ b/mcs/tests/test-948.cs +@@ -1,4 +1,4 @@ +-// Compiler options: -langversion:7.2 -unsafe ++// Compiler options: -langversion:7.2 /unsafe + + using System; + +@@ -7,10 +7,16 @@ class X + public static void Main () + { + Span stackSpan = stackalloc int[100]; ++ ++ bool b = false; ++ ++ var r1 = !b ? stackalloc char[1] : throw null; ++ var r2 = b ? throw null : stackalloc char[1]; ++ var r3 = b ? stackalloc char[1] : stackalloc char[2]; + } + ++ // Disables verifier + unsafe void Foo () + { +- + } +-} +\ No newline at end of file ++} +diff --git a/mcs/tests/test-950.cs b/mcs/tests/test-950.cs +new file mode 100644 +index 00000000000..fef764c85cc +--- /dev/null ++++ b/mcs/tests/test-950.cs +@@ -0,0 +1,12 @@ ++using System; ++ ++public class B ++{ ++ public static void Main () ++ { ++ int a = 1_0_3; ++ double b = 0__0e+1_1; ++ int c = 0b0__1_0; ++ int d = 0x0__F_0; ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-960.cs b/mcs/tests/test-960.cs +new file mode 100644 +index 00000000000..ac2a1ca7435 +--- /dev/null ++++ b/mcs/tests/test-960.cs +@@ -0,0 +1,20 @@ ++// Compiler options: -langversion:7.2 ++ ++public class B ++{ ++ private protected enum E ++ { ++ } ++ ++ public int Index { get; protected private set; } ++ ++ internal string S1 { get; private protected set; } ++ ++ protected string S2 { get; private protected set; } ++ ++ private protected int field; ++ ++ public static void Main () ++ { ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-961.cs b/mcs/tests/test-961.cs +new file mode 100644 +index 00000000000..efe19673875 +--- /dev/null ++++ b/mcs/tests/test-961.cs +@@ -0,0 +1,34 @@ ++// Compiler options: -langversion:latest ++ ++using System; ++ ++public static class B { ++ public static void Main () ++ { ++ int lo = 1; ++ Bar (in lo); ++ } ++ ++ public static void Bar (in int arg) ++ { ++ } ++ ++ static void Foo (this in int src) ++ { ++ D p = (in int a) => {}; ++ } ++ ++} ++ ++delegate void D (in int arg); ++ ++class M ++{ ++ int this[in int a] { set { } } ++ public static implicit operator string (in M m) => null; ++ public M (in int arg) { } ++ ++ public void Test2 (in int arg) ++ { ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-anon-123.cs b/mcs/tests/test-anon-123.cs +index 91c72b45afe..45aab27c0a5 100644 +--- a/mcs/tests/test-anon-123.cs ++++ b/mcs/tests/test-anon-123.cs +@@ -1,3 +1,4 @@ ++// Compiler options: -langversion:latest + // Cloning tests + + using System; +@@ -103,7 +104,11 @@ public class C : B + default: + break; + } +- }); ++ }); ++ ++ Test (() => { ++ char ch = default; ++ }); + + var c = new C (); + c.InstanceTests (); +diff --git a/mcs/tests/test-binaryliteral.cs b/mcs/tests/test-binaryliteral.cs +new file mode 100644 +index 00000000000..3d9cc89bcbd +--- /dev/null ++++ b/mcs/tests/test-binaryliteral.cs +@@ -0,0 +1,57 @@ ++ ++class Demo { ++ static int Main () ++ { ++ if (0b1 != 1) ++ return 1; ++ var hex1 = 0x123ul; ++ var bin1 = 0b100100011ul; ++ var bin11 = 0b100100011lu; ++ if (hex1 != bin1) ++ return 2; ++ if (hex1 != bin11) ++ return 3; ++ if (hex1.GetType () != bin1.GetType ()) ++ return 4; ++ if (hex1.GetType () != bin11.GetType ()) ++ return 5; ++ ++ var hex2 = 0x7FFFFFFF; ++ var bin2 = 0b1111111111111111111111111111111; ++ ++ if (hex2 != bin2) ++ return 6; ++ if (hex2.GetType () != bin2.GetType ()) ++ return 7; ++ ++ var hex3 = 0xFFFFFFFF; ++ var bin3 = 0b11111111111111111111111111111111; ++ if (hex3 != bin3) ++ return 8; ++ if (hex3.GetType () != bin3.GetType ()) ++ return 9; ++ ++ var hex4 = 0xFFFFFFFFu; ++ var bin4 = 0b11111111111111111111111111111111u; ++ if (hex4 != bin4) ++ return 10; ++ if (hex4.GetType () != bin4.GetType ()) ++ return 11; ++ ++ var hex5 = 0x7FFFFFFFFFFFFFFF; ++ var bin5 = 0b111111111111111111111111111111111111111111111111111111111111111; ++ if (hex5 != bin5) ++ return 12; ++ if (hex5.GetType () != bin5.GetType ()) ++ return 13; ++ ++ var hex6 = 0xFFFFFFFFFFFFFFFF; ++ var bin6 = 0b1111111111111111111111111111111111111111111111111111111111111111; ++ if (hex6 != bin6) ++ return 14; ++ if (hex6.GetType () != bin6.GetType ()) ++ return 15; ++ ++ return 0; ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-decl-expr-05.cs b/mcs/tests/test-decl-expr-05.cs +index 730fd4278ca..907cde0b8d7 100644 +--- a/mcs/tests/test-decl-expr-05.cs ++++ b/mcs/tests/test-decl-expr-05.cs +@@ -6,6 +6,11 @@ class X + { + arg = s.ToString (); + } ++ ++ while (true && Call (out string s2)) ++ { ++ arg = s2.ToString (); ++ } + } + + static bool Call (out string s) +diff --git a/mcs/tests/test-decl-expr-06.cs b/mcs/tests/test-decl-expr-06.cs +new file mode 100644 +index 00000000000..9734f2ec2a7 +--- /dev/null ++++ b/mcs/tests/test-decl-expr-06.cs +@@ -0,0 +1,17 @@ ++using System; ++ ++public class C ++{ ++ Func f = () => Foo (out int arg); ++ ++ static bool Foo (out int arg) ++ { ++ arg = 2; ++ return false; ++ } ++ ++ public static void Main () ++ { ++ new C (); ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-default-01.cs b/mcs/tests/test-default-01.cs +index 823e33c451b..28aff830cd9 100644 +--- a/mcs/tests/test-default-01.cs ++++ b/mcs/tests/test-default-01.cs +@@ -41,7 +41,11 @@ static class X + static System.Func M4 () + { + return () => default; +- } ++ } ++ ++ static void Foo (II a = default (II), II b = default, II c = (II) null) ++ { ++ } + } + /* + enum E +@@ -49,4 +53,10 @@ enum E + A = default, + B = default + 1 + } +-*/ +\ No newline at end of file ++*/ ++ ++ ++interface II ++{ ++ ++} +\ No newline at end of file +diff --git a/mcs/tests/test-fixed-01.cs b/mcs/tests/test-fixed-01.cs +new file mode 100644 +index 00000000000..4684b0c5a06 +--- /dev/null ++++ b/mcs/tests/test-fixed-01.cs +@@ -0,0 +1,20 @@ ++// Compiler options: -unsafe -langversion:latest ++ ++unsafe class C ++{ ++ public static void Main () ++ { ++ fixed (int* p = new Fixable ()) { ++ System.Console.WriteLine (*p); ++ System.Console.WriteLine (p [2]); ++ } ++ } ++ ++ struct Fixable ++ { ++ public ref int GetPinnableReference () ++ { ++ return ref (new int[] { 1, 2, 3 })[0]; ++ } ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-pattern-13.cs b/mcs/tests/test-pattern-13.cs +new file mode 100644 +index 00000000000..315c7a9e4be +--- /dev/null ++++ b/mcs/tests/test-pattern-13.cs +@@ -0,0 +1,19 @@ ++using System; ++ ++class C : B ++{ ++ ++} ++ ++public class B ++{ ++ public static void Main () ++ { ++ C c = new C (); ++ ++ if (c is B b) ++ { ++ Console.WriteLine (b == null); ++ } ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-ref-07.cs b/mcs/tests/test-ref-07.cs +index 4aa16579752..f17cfb443b5 100644 +--- a/mcs/tests/test-ref-07.cs ++++ b/mcs/tests/test-ref-07.cs +@@ -1,6 +1,6 @@ + // Compiler options: -langversion:latest + +-public readonly partial ref struct Test ++public readonly ref partial struct Test + { + public static void Main () + { +@@ -14,6 +14,11 @@ public readonly partial ref struct Test + } + } + ++ref partial struct Test ++{ ++ ++} ++ + ref struct Second + { + Test field; +diff --git a/mcs/tests/test-ref-11.cs b/mcs/tests/test-ref-11.cs +new file mode 100644 +index 00000000000..8d392a77d07 +--- /dev/null ++++ b/mcs/tests/test-ref-11.cs +@@ -0,0 +1,13 @@ ++class Program ++{ ++ static int x; ++ static int y; ++ ++ public static int Main () ++ { ++ bool b = false; ++ ref int targetBucket = ref b ? ref x : ref y; ++ ++ return 0; ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-ref-12.cs b/mcs/tests/test-ref-12.cs +new file mode 100644 +index 00000000000..786a4162f4f +--- /dev/null ++++ b/mcs/tests/test-ref-12.cs +@@ -0,0 +1,22 @@ ++// Compiler options: -unsafe ++ ++unsafe class X ++{ ++ public static void Main () ++ { ++ void* pointer = null; ++ Bar (ref Foo (ref *(byte*)pointer)); ++ } ++ ++ static int field; ++ ++ static ref int Foo (ref byte b) ++ { ++ return ref field; ++ } ++ ++ static void Bar (ref int i) ++ { ++ ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-tuple-02.cs b/mcs/tests/test-tuple-02.cs +index c0492759452..ab722642aeb 100644 +--- a/mcs/tests/test-tuple-02.cs ++++ b/mcs/tests/test-tuple-02.cs +@@ -26,6 +26,11 @@ class TupleConversions + (string v1, object v2) b = ("a", "b"); + + (int v1, long v2)? x = null; ++ ++ var array = new [] { ++ (name: "A", offset: 0), ++ (name: "B", size: 4) ++ }; + } + + static void Foo (T arg) +diff --git a/mcs/tests/test-tuple-08.cs b/mcs/tests/test-tuple-08.cs +new file mode 100644 +index 00000000000..fd3375b4df6 +--- /dev/null ++++ b/mcs/tests/test-tuple-08.cs +@@ -0,0 +1,24 @@ ++using System; ++using System.Collections.Generic; ++using System.Threading.Tasks; ++ ++class X ++{ ++ public static void Main () ++ { ++ var x = new X (); ++ x.Test ().Wait (); ++ } ++ ++ int a, b; ++ ++ async Task Test () ++ { ++ (a, b) = await Waiting (); ++ } ++ ++ Task<(int, int)> Waiting () ++ { ++ return Task.FromResult ((1, 3)); ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-tuple-10.cs b/mcs/tests/test-tuple-10.cs +new file mode 100644 +index 00000000000..82f4e01ec1f +--- /dev/null ++++ b/mcs/tests/test-tuple-10.cs +@@ -0,0 +1,9 @@ ++using System.Linq; ++ ++class Program { ++ public static int Main () ++ { ++ var l = (from f in (typeof (Program)).GetFields() select (name: f.Name, offset: 0)).ToList(); ++ return 0; ++ } ++} +\ No newline at end of file +diff --git a/mcs/tests/test-tuple-11.cs b/mcs/tests/test-tuple-11.cs +new file mode 100644 +index 00000000000..b2aeb24026c +--- /dev/null ++++ b/mcs/tests/test-tuple-11.cs +@@ -0,0 +1,20 @@ ++using System; ++ ++class Program ++{ ++ public static int Main () ++ { ++ int x = 1; ++ int y = 2; ++ ++ (x, y) = (y, x); ++ ++ if (x != 2) ++ return 1; ++ ++ if (y != 1) ++ return 2; ++ ++ return 0; ++ } ++} +diff --git a/mcs/tests/ver-il-net_4_x.xml b/mcs/tests/ver-il-net_4_x.xml +index 4dbc7042a8a..2bde8270338 100644 +--- a/mcs/tests/ver-il-net_4_x.xml ++++ b/mcs/tests/ver-il-net_4_x.xml +@@ -3168,6 +3168,33 @@ + + + ++ ++ ++ ++ 41 ++ ++ ++ 7 ++ ++ ++ ++ ++ 7 ++ ++ ++ 39 ++ ++ ++ 63 ++ ++ ++ 67 ++ ++ ++ 14 ++ ++ ++ + + + +@@ -11064,7 +11091,7 @@ + + + +- 72 ++ 60 + + + 62 +@@ -19508,7 +19535,7 @@ + + + +- 267 ++ 255 + + + 7 +@@ -19742,7 +19769,7 @@ + + + +- 116 ++ 121 + + + 7 +@@ -20147,6 +20174,21 @@ + + + ++ ++ ++ ++ 99 ++ ++ ++ 7 ++ ++ ++ ++ ++ 22 ++ ++ ++ + + + +@@ -47609,7 +47651,7 @@ + 7 + + +- 73 ++ 78 + + + +@@ -51468,10 +51510,10 @@ + + + +- 20 ++ 12 + + +- 70 ++ 62 + + + 7 +@@ -52148,7 +52190,7 @@ + 14 + + +- 29 ++ 34 + + + 10 +@@ -52359,10 +52401,10 @@ + + + +- 25 ++ 30 + + +- 105 ++ 141 + + + 29 +@@ -52370,6 +52412,12 @@ + + 7 + ++ ++ 32 ++ ++ ++ 45 ++ + + + +@@ -52814,7 +52862,7 @@ + + + +- 16 ++ 103 + + + 2 +@@ -52834,6 +52882,16 @@ + + + ++ ++ ++ ++ 23 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -52858,6 +52916,80 @@ + + + ++ ++ ++ ++ 14 ++ ++ ++ 8 ++ ++ ++ 14 ++ ++ ++ 8 ++ ++ ++ 14 ++ ++ ++ 8 ++ ++ ++ 2 ++ ++ ++ 7 ++ ++ ++ ++ ++ ++ ++ 10 ++ ++ ++ 32 ++ ++ ++ 2 ++ ++ ++ ++ ++ 0 ++ ++ ++ 0 ++ ++ ++ 0 ++ ++ ++ 0 ++ ++ ++ ++ ++ 2 ++ ++ ++ 9 ++ ++ ++ 2 ++ ++ ++ 8 ++ ++ ++ ++ ++ 2 ++ ++ ++ + + + +@@ -54448,7 +54580,7 @@ + 19 + + +- 247 ++ 281 + + + 7 +@@ -54518,6 +54650,9 @@ + + 35 + ++ ++ 4 ++ + + + +@@ -67020,6 +67155,16 @@ + + + ++ ++ ++ ++ 503 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -68641,7 +68786,7 @@ + + + +- 29 ++ 62 + + + 17 +@@ -68654,6 +68799,22 @@ + + + ++ ++ ++ ++ 13 ++ ++ ++ 8 ++ ++ ++ 15 ++ ++ ++ 42 ++ ++ ++ + + + +@@ -68674,6 +68835,9 @@ + + 9 + ++ ++ 2 ++ + + + +@@ -69158,6 +69322,21 @@ + + + ++ ++ ++ ++ 39 ++ ++ ++ 7 ++ ++ ++ ++ ++ 32 ++ ++ ++ + + + +@@ -72564,7 +72743,7 @@ + + + +- 184 ++ 206 + + + 14 +@@ -72750,6 +72929,21 @@ + + + ++ ++ ++ ++ 7 ++ ++ ++ ++ ++ 35 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -73155,6 +73349,11 @@ + + + ++ ++ ++ 6 ++ ++ + + + 18 +@@ -73243,6 +73442,32 @@ + + + ++ ++ ++ ++ 34 ++ ++ ++ 7 ++ ++ ++ ++ ++ ++ ++ 16 ++ ++ ++ 14 ++ ++ ++ 2 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -73482,7 +73707,7 @@ + 32 + + +- 10 ++ 2 + + + 10 +@@ -73491,16 +73716,16 @@ + 23 + + +- 3 ++ 2 + + +- 10 ++ 2 + + +- 3 ++ 2 + + +- 3 ++ 2 + + + 21 +@@ -73527,7 +73752,7 @@ + 7 + + +- 10 ++ 2 + + + 15 +@@ -73569,7 +73794,7 @@ + + + +- 314 ++ 368 + + + 2 +@@ -73761,6 +73986,29 @@ + + + ++ ++ ++ ++ 65 ++ ++ ++ 21 ++ ++ ++ 7 ++ ++ ++ ++ ++ ++ ++ 70 ++ ++ ++ 7 ++ ++ ++ + + + +@@ -73896,4 +74144,4 @@ + + + +- +\ No newline at end of file ++ +diff --git a/msvc/scripts/System.Web.pre b/msvc/scripts/System.Web.pre +index c071bf45bfd..8f8d262597f 100644 +--- a/msvc/scripts/System.Web.pre ++++ b/msvc/scripts/System.Web.pre +@@ -1 +1 @@ +-@MONO@ $(ProjectDir)\..\lib\net_4_x\culevel.exe -o $(ProjectDir)\System.Web\UplevelHelper.cs $(ProjectDir)\UplevelHelperDefinitions.xml ++@MONO@ $([MSBuild]::GetDirectoryNameOfFileAbove($(TargetDir), culevel.exe))\culevel.exe -o $(ProjectDir)\System.Web\UplevelHelper.cs $(ProjectDir)\UplevelHelperDefinitions.xml +diff --git a/msvc/scripts/csproj.tmpl b/msvc/scripts/csproj.tmpl +index 642c9537321..c18b51d334e 100644 +--- a/msvc/scripts/csproj.tmpl ++++ b/msvc/scripts/csproj.tmpl +@@ -17,6 +17,7 @@ + obj-@OUTPUTSUFFIX@ + false + @NOSTDLIB@ ++ @METADATAVERSION@ + @STARTUPOBJECT@ + @NOCONFIG@ + @ALLOWUNSAFE@ +diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs +index 3987abb212b..1440800b2b3 100644 +--- a/msvc/scripts/genproj.cs ++++ b/msvc/scripts/genproj.cs +@@ -27,27 +27,43 @@ public enum Target { + + class SlnGenerator { + public static readonly string NewLine = "\r\n"; //Environment.NewLine; // "\n"; +- public SlnGenerator (string formatVersion = "2012") ++ public SlnGenerator (string slnVersion) + { +- switch (formatVersion) { +- case "2008": +- this.header = MakeHeader ("10.00", "2008"); +- break; +- default: +- this.header = MakeHeader ("12.00", "2012"); +- break; +- } ++ Console.WriteLine("Requested sln version is {0}", slnVersion); ++ this.header = MakeHeader ("12.00", "15", "15.0.0.0"); + } + +- const string project_start = "Project(\"{{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}}\") = \"{0}\", \"{1}\", \"{2}\""; // Note: No need to double up on {} around {2} ++ const string project_start = "Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\""; // Note: No need to double up on {} around {2} + const string project_end = "EndProject"; + ++ public List profiles = new List { ++ "net_4_x", ++ "monodroid", ++ "monotouch", ++ "monotouch_tv", ++ "monotouch_watch", ++ "orbis", ++ "unreal", ++ "wasm", ++ "winaot", ++ "xammac", ++ }; ++ ++ const string jay_vcxproj_guid = "{5D485D32-3B9F-4287-AB24-C8DA5B89F537}"; ++ const string jay_sln_guid = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}"; ++ + public List libraries = new List (); + string header; + +- string MakeHeader (string formatVersion, string yearTag) ++ string MakeHeader (string formatVersion, string yearTag, string minimumVersion) + { +- return string.Format ("Microsoft Visual Studio Solution File, Format Version {0}" + NewLine + "# Visual Studio {1}", formatVersion, yearTag); ++ return string.Format ( ++ "Microsoft Visual Studio Solution File, Format Version {0}" + NewLine + ++ "# Visual Studio {1}" + NewLine + ++ "MinimumVisualStudioVersion = {2}", ++ formatVersion, yearTag, ++ minimumVersion ++ ); + } + + public void Add (MsbuildGenerator.VsCsproj vsproj) +@@ -59,6 +75,40 @@ class SlnGenerator { + } + } + ++ private void WriteProjectReference (StreamWriter sln, string prefixGuid, string library, string relativePath, string projectGuid, params string[] dependencyGuids) ++ { ++ sln.WriteLine (project_start, prefixGuid, library, relativePath, projectGuid); ++ ++ foreach (var guid in dependencyGuids) { ++ sln.WriteLine (" ProjectSection(ProjectDependencies) = postProject"); ++ sln.WriteLine (" {0} = {0}", guid); ++ sln.WriteLine (" EndProjectSection"); ++ } ++ ++ sln.WriteLine (project_end); ++ } ++ ++ private void WriteProjectReference (StreamWriter sln, string slnFullPath, MsbuildGenerator.VsCsproj proj) ++ { ++ var unixProjFile = proj.csProjFilename.Replace ("\\", "/"); ++ var fullProjPath = Path.GetFullPath (unixProjFile); ++ var relativePath = MsbuildGenerator.GetRelativePath (slnFullPath, fullProjPath); ++ var dependencyGuids = new string[0]; ++ if (proj.preBuildEvent.Contains ("jay")) ++ dependencyGuids = new [] { jay_vcxproj_guid }; ++ WriteProjectReference(sln, "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", proj.library, relativePath, proj.projectGuid, dependencyGuids); ++ } ++ ++ private void WriteProjectConfigurationPlatforms (StreamWriter sln, string guid, string platformToBuild) ++ { ++ foreach (var profile in profiles) { ++ sln.WriteLine ("\t\t{0}.Debug|{1}.ActiveCfg = Debug|{2}", guid, profile, platformToBuild); ++ sln.WriteLine ("\t\t{0}.Debug|{1}.Build.0 = Debug|{2}", guid, profile, platformToBuild); ++ sln.WriteLine ("\t\t{0}.Release|{1}.ActiveCfg = Release|{2}", guid, profile, platformToBuild); ++ sln.WriteLine ("\t\t{0}.Release|{1}.Build.0 = Release|{2}", guid, profile, platformToBuild); ++ } ++ } ++ + public void Write (string filename) + { + var fullPath = Path.GetDirectoryName (filename) + "/"; +@@ -66,27 +116,32 @@ class SlnGenerator { + using (var sln = new StreamWriter (filename)) { + sln.WriteLine (); + sln.WriteLine (header); ++ ++ // Manually insert jay's vcxproj. We depend on jay.exe to perform build steps later. ++ WriteProjectReference (sln, jay_sln_guid, "jay", "mcs\\jay\\jay.vcxproj", jay_vcxproj_guid); ++ + foreach (var proj in libraries) { +- var unixProjFile = proj.csProjFilename.Replace ("\\", "/"); +- var fullProjPath = Path.GetFullPath (unixProjFile); +- sln.WriteLine (project_start, proj.library, MsbuildGenerator.GetRelativePath (fullPath, fullProjPath), proj.projectGuid); +- sln.WriteLine (project_end); ++ WriteProjectReference (sln, fullPath, proj); + } ++ + sln.WriteLine ("Global"); + + sln.WriteLine ("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution"); +- sln.WriteLine ("\t\tDebug|Any CPU = Debug|Any CPU"); +- sln.WriteLine ("\t\tRelease|Any CPU = Release|Any CPU"); ++ foreach (var profile in profiles) { ++ sln.WriteLine ("\t\tDebug|{0} = Debug|{0}", profile); ++ sln.WriteLine ("\t\tRelease|{0} = Release|{0}", profile); ++ } + sln.WriteLine ("\tEndGlobalSection"); + + sln.WriteLine ("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution"); ++ ++ // Manually insert jay's configurations because they are different ++ WriteProjectConfigurationPlatforms (sln, jay_vcxproj_guid, "Win32"); ++ + foreach (var proj in libraries) { +- var guid = proj.projectGuid; +- sln.WriteLine ("\t\t{0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU", guid); +- sln.WriteLine ("\t\t{0}.Debug|Any CPU.Build.0 = Debug|Any CPU", guid); +- sln.WriteLine ("\t\t{0}.Release|Any CPU.ActiveCfg = Release|Any CPU", guid); +- sln.WriteLine ("\t\t{0}.Release|Any CPU.Build.0 = Release|Any CPU", guid); ++ WriteProjectConfigurationPlatforms (sln, proj.projectGuid, "Any CPU"); + } ++ + sln.WriteLine ("\tEndGlobalSection"); + + sln.WriteLine ("\tGlobalSection(SolutionProperties) = preSolution"); +@@ -634,6 +689,7 @@ class MsbuildGenerator { + public List projReferences = new List (); + public string library; + public MsbuildGenerator MsbuildGenerator; ++ public string preBuildEvent, postBuildEvent; + } + + public VsCsproj Csproj; +@@ -682,7 +738,7 @@ class MsbuildGenerator { + fx_version = "4.0"; + profile = "net_4_0"; + } else if (response.Contains (profile_4_x)) { +- fx_version = "4.5"; ++ fx_version = "4.6.2"; + profile = "net_4_x"; + } + } +@@ -882,6 +938,26 @@ class MsbuildGenerator { + + bool basic_or_build = (library.Contains ("-basic") || library.Contains ("-build")); + ++ // If an EXE is built with nostdlib, it won't work unless run with mono.exe. This stops our build steps ++ // from working in visual studio (because we already replace @MONO@ with '' on Windows.) ++ ++ if (Target != Target.Library) ++ StdLib = true; ++ ++ // We have our target framework set to 4.5 in many places because broken scripts check for files with 4.5 ++ // in the path, even though we compile code that uses 4.6 features. So we need to manually fix that here. ++ ++ if (fx_version == "4.5") ++ fx_version = "4.6.2"; ++ ++ // The VS2017 signing system fails to sign using this key for some reason, so for now, ++ // just disable code signing for the nunit assemblies. It's not important. ++ // I'd rather fix this by updating the makefiles but it seems to be impossible to disable ++ // code signing in our make system... ++ ++ if (StrongNameKeyFile?.Contains("nunit.snk") ?? false) ++ StrongNameKeyFile = null; ++ + // + // Replace the template values + // +@@ -894,6 +970,9 @@ class MsbuildGenerator { + " {0}", + StrongNameKeyFile, StrongNameDelaySign ? " true" + NewLine : ""); + } ++ ++ string assemblyName = Path.GetFileNameWithoutExtension (output_name); ++ + Csproj.output = template. + Replace ("@OUTPUTTYPE@", Target == Target.Library ? "Library" : "Exe"). + Replace ("@SIGNATURE@", strongNameSection). +@@ -906,7 +985,7 @@ class MsbuildGenerator { + Replace ("@NOCONFIG@", "" + (!load_default_config).ToString () + ""). + Replace ("@ALLOWUNSAFE@", Unsafe ? "true" : ""). + Replace ("@FX_VERSION", fx_version). +- Replace ("@ASSEMBLYNAME@", Path.GetFileNameWithoutExtension (output_name)). ++ Replace ("@ASSEMBLYNAME@", assemblyName). + Replace ("@OUTPUTDIR@", build_output_dir). + Replace ("@OUTPUTSUFFIX@", Path.GetFileName (build_output_dir)). + Replace ("@DEFINECONSTANTS@", defines.ToString ()). +@@ -920,7 +999,11 @@ class MsbuildGenerator { + Replace ("@ADDITIONALLIBPATHS@", String.Empty). + Replace ("@RESOURCES@", resources.ToString ()). + Replace ("@OPTIMIZE@", Optimize ? "true" : "false"). +- Replace ("@SOURCES@", sources.ToString ()); ++ Replace ("@SOURCES@", sources.ToString ()). ++ Replace ("@METADATAVERSION@", assemblyName == "mscorlib" ? "Mono" : ""); ++ ++ Csproj.preBuildEvent = prebuild; ++ Csproj.postBuildEvent = postbuild; + + //Console.WriteLine ("Generated {0}", ofile.Replace ("\\", "/")); + using (var o = new StreamWriter (generatedProjFile)) { +@@ -939,15 +1022,13 @@ class MsbuildGenerator { + if (q != -1) + target = target + Load (library.Substring (0, q) + suffix); + +- if (target.IndexOf ("@MONO@") != -1){ +- target_unix = target.Replace ("@MONO@", "mono").Replace ("@CAT@", "cat"); +- target_windows = target.Replace ("@MONO@", "").Replace ("@CAT@", "type"); +- } else { +- target_unix = target.Replace ("jay.exe", "jay"); +- target_windows = target; +- } ++ target_unix = target.Replace ("@MONO@", "mono").Replace ("@CAT@", "cat"); ++ target_windows = target.Replace ("@MONO@", "").Replace ("@CAT@", "type"); ++ ++ target_unix = target_unix.Replace ("\\jay\\jay.exe", "\\jay\\jay\\jay"); ++ + target_unix = target_unix.Replace ("@COPY@", "cp"); +- target_windows = target_unix.Replace ("@COPY@", "copy"); ++ target_windows = target_windows.Replace ("@COPY@", "copy"); + + target_unix = target_unix.Replace ("\r", ""); + const string condition_unix = "Condition=\" '$(OS)' != 'Windows_NT' \""; From patchwork Mon Dec 16 17:26:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34963 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 339F327BBEB; Mon, 16 Dec 2024 17:31:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9CDD827BBE9 for ; Mon, 16 Dec 2024 17:31:15 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEvv-00028t-9V; Mon, 16 Dec 2024 12:31:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEuF-0000Qg-D1 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:20 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEuD-0001xM-QG for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=OYKC8JLScjx3bugoCM5IwQxgg8PZTeiH6B0bF7tiVbk=; b=HQc06JucE2rzZTg2gbcvEjiRSPybAOvYk2+NwS760WZKkQXB+THyIJ8nbkPUM57tBioC46gSRWhcLvtq9L0Ei94VQMsfgZHSMDzMA19EuWDVSJoTOzl2uoQKteSnWNTHyeC/uDLkIWozh3RZM7KZtzgekbgHyDZ5igQjlMnASTCeJzKO4xAfmyvMgpziqfsDmHYuZxO2TJuau0pbBri74IsD94xYHhR4yQIZMArc5tZkyScmleCEQuOOYDlqQSNNkCiL3ttUblgBByL6LRN5kq4ZRyNWDdHNueh2IApTr0l6SRCUbKjE7uekSjj+Kjj86Kum+Uk+l6yVYvXDZ86g+A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEuD-0006Mz-Jg for guix-patches@gnu.org; Mon, 16 Dec 2024 12:29:17 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 20/21] gnu: Add libgdiplus. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:29:17 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437014824360 (code B ref 74609); Mon, 16 Dec 2024 17:29:17 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:29:08 +0000 Received: from localhost ([127.0.0.1]:55888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEu3-0006Kb-5X for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:29:08 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:42249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEtw-0006If-9J for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:29:01 -0500 Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3862b364538so2512669f8f.1 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:29:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370075; x=1734974875; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=OYKC8JLScjx3bugoCM5IwQxgg8PZTeiH6B0bF7tiVbk=; b=Ksq85n18By97IOQpkqqVr1abARUKcSJPt5n0qeE6k3GqJkk7jD3HtNcvsOUTpbE94A DoYBBRVfxSi/g8Aj82e5uaaYhCE6Z98o9WVaRFGsdmm5sdABuj8giUBV1Z/sNz5XL9CU y38bI7CxGVQVGwtcTIa3SG6I+hxLumjh2D0QoXy1ACxIT0xxuq67mCrFnaBCvTBdduNG VJDeuDn+um6hxX7TFF+zNMVZW3jK8X8wh7JyOjCC1Tr1wKvfbRqeBRYw8pzo4UhPIZCJ CSBEkVasGEhdhcHAe7CYLdCU8IMmPVGbMgPPdXnudNULKUihb9SY9BlGHeycpVUnIkLC WWQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370075; x=1734974875; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OYKC8JLScjx3bugoCM5IwQxgg8PZTeiH6B0bF7tiVbk=; b=IckT2Qc2Vf1tgi/GKXOwcZJs9Mlim8js/5XITkVM+WkqqgDVNlle5ABRrXKADoaSyE jo1EL9CdUUmtdz8hQRTV/bk5Onk6z+nTeDJ2KyVdXlGbg1fPnyqYc5qEL8DAYnOoSsKq pHrcRO13IKOzt+8u25jDsP6XiZMQqMQMptdHHEJWLCXJbH1kf+jmxoO22dLyWTIPjztH h3nTpicl5tmx/Zs8b0BVVs3TOrgNS4R3DQedLARS6DQwMbUST1MFo7YuYwDF3Frtbcc/ lfC6uyZOBEU8clgd15V0YgWYW5L19RJjsWZuybm85JaJ00q+yOM3nWZuyOhY6Jg/XQ1K SIXg== X-Gm-Message-State: AOJu0YzKpCtiNjOCCBbjxUx3KUS0V4iVuimMrg6Xia4udVCieyXdWuL4 8LAB5essM1ndU/HnIrXs5kNM8WW+VVCE/a8YHiy2AYuRsuh7ZaTtysjxG+A7 X-Gm-Gg: ASbGncvLSPKXz/d2/5HdPS4sGtse1//0yiB9jE9BuB9+TdInUlFd5x3mFdCfJGBenba q6BP7DJWW1Gh5r/mNxTzMdEjnmVsws+zCUPB86LQmkILeReIIBWOlixIl1jP6a3Rqf3kQMCUySg 9fvuX0SUMhaKhZqnUO+TyiAjAr4TcthOgHT8L9yuhoWpOnIRJ0H4jQd7lWFajmOsdN6QjDWda49 8icmlBoGsCu1QqkmSnpk9ySbHWHWMwnQvI3zHKIi2zlelgzKoAUd0FaKzsjSw== X-Google-Smtp-Source: AGHT+IEZACog37dFUNmlXrw1lKdzv4Aef/YPuCoAhPD0kS3aXABIN3Sj/z3uL8e6z6KbuI1w9PO+7A== X-Received: by 2002:a05:6000:1f89:b0:385:e8e7:d09a with SMTP id ffacd0b85a97d-388db22663cmr171278f8f.2.1734370074653; Mon, 16 Dec 2024 09:27:54 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c801af46sm8677316f8f.61.2024.12.16.09.27.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:54 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:43 +0200 Message-ID: <0c79983d4bb80c1ce3f577af0f85e6a414440c53.1734369315.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush * gnu/packages/dotnet.scm (libgdiplus): New variable. Change-Id: I492254c09fd6c9c8b0bc633e1f95665bfa9fe96a --- gnu/packages/dotnet.scm | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index fc5585ecc7e..03e18e29c6d 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1590,3 +1590,47 @@ (define-public mono-5.10.0 (("Facades/System\\.Data\\.Common_REFS := " all) (string-append all "System System.Xml "))) (apply invoke "make" "CSC=mcs" make-flags))))))))))) + +(define-public libgdiplus + (package + (name "libgdiplus") + (version "6.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mono/libgdiplus.git") + (commit "94a49875487e296376f209fe64b921c6020f74c0"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1gwmhrddr8kdlfprjqcd6gqiy8p5v8sl9215dbd949j1l76szl9v")) + (modules '((guix build utils))) + (snippet #~(substitute* "./Makefile.am" + (("\\./update_submodules\\.sh") + ":"))))) + (build-system gnu-build-system) + (native-inputs + (list automake + autoconf + googletest-1.8 + libtool + pkg-config + which)) + (inputs (list cairo + freetype + fontconfig + gettext-minimal + giflib + glib + libexif + libjpeg-turbo + libpng + libtiff + libx11)) + (synopsis "Open Source implementation of the GDI+ API") + (description "Libgdiplus is the Mono library that provides a +GDI+-compatible API on non-Windows operating systems. It uses Cairo to do +most of the heavy lifting.") + (home-page "https://github.com/mono/libgdiplus") + (license license:expat))) From patchwork Mon Dec 16 17:26:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 34964 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EAEFA27BBE9; Mon, 16 Dec 2024 17:31:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 74BF527BBE2 for ; Mon, 16 Dec 2024 17:31:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEw0-0002Kf-1u; Mon, 16 Dec 2024 12:31:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNEv1-00013r-3y for guix-patches@gnu.org; Mon, 16 Dec 2024 12:30:10 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNEux-0002U7-W6 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:30:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=PR8STIUu+9lg4sFlh4Qi528LQr7kAmK0SOlNFdizcco=; b=jl9yEl9c0oRD4wb+hs68HJjhc0AkqMNpWCY23J0aMqvj6ZbgVSkaGlm68/grttVL3HhM7YpB4wrETWzRnlP5ok6vKsHSEqbY5LH/MsXE+HuvrItGziW88PnZnC0NGm2b6RN58AMUCrWhqQlPHWCaxBnfM2uNCWutLVMh35qsw8jxB6fdszdWT3DHWdJPRlYIXGltzRjNY7a2VQSR1LiZOEZftODaYWKcPY6amM4bRPRGg8XXbeG2y9YrMB8obOWQXmIsDanMr2cYmcbnfZR/nhn8+TCF39jiaZ95n/vZJVw6u/ssfdPnkOn0HiMq57HtaJhZU9u4Pj2a9hCw6Xzcrw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNEux-0006Py-N1 for guix-patches@gnu.org; Mon, 16 Dec 2024 12:30:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74609] [PATCH 21/21] gnu: Add mono-6.12.0. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Dec 2024 17:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74609@debbugs.gnu.org Cc: aaron.covrig.us@ieee.org, ludo@gnu.org, unmush , richard@freakingpenguin.com, unmush@proton.me, janneke@gnu.org Received: via spool by 74609-submit@debbugs.gnu.org id=B74609.173437016224531 (code B ref 74609); Mon, 16 Dec 2024 17:30:03 +0000 Received: (at 74609) by debbugs.gnu.org; 16 Dec 2024 17:29:22 +0000 Received: from localhost ([127.0.0.1]:55906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEuE-0006NI-F7 for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:29:22 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:55358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNEty-0006Iu-T5 for 74609@debbugs.gnu.org; Mon, 16 Dec 2024 12:29:06 -0500 Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-37ed3bd6114so2161263f8f.2 for <74609@debbugs.gnu.org>; Mon, 16 Dec 2024 09:29:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734370077; x=1734974877; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=PR8STIUu+9lg4sFlh4Qi528LQr7kAmK0SOlNFdizcco=; b=Nv4/MB20JFamb0DlqX7+FmVItE74JMdExpT3LgPc7BWnjJvdT/EXzKfQ0kSIcccyAI g27E/7eHb946WrtijtCZhH1RKmFjkVDGG1H8byxiudFxBnhocRJFupRFTJJMBwsnNf3f BnECg7bA1VsP3G6P+6Vd+19FUF9fUmRG4MBx8kS+6woGJIbwMyMD67+jDtNPPx4iW8mH Yykwa9U8fYpM9gRl7eUJU2zBTIATPB7AarUrUy7LXLV9WDO/vMLmIVnvghOs6DM+UPdx y2b7ajLxQ/w6DY2JV5yw9XJO73XMdT6XXv523bnBF768TOHmQvQtFLgCiT15aZq1n3kn 7iuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734370077; x=1734974877; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=PR8STIUu+9lg4sFlh4Qi528LQr7kAmK0SOlNFdizcco=; b=G4n2PX1Jw/z42YrTg0MJZiSl267bTyQ2rloVF7ABdw3ZUBMFrhyjY+27QCBLfSoM9I Z5ltYEGCXAvtXo+ls5HbkfN6IMikMV71c1HauRMOMxep/hvWy4Ar6yOgG/eHVfWyCJXW OB1Cz3Wot0aJ1LmKWvKfZDbEQW0t68rrmOwnm0othAEW5h2u88x47h2kMeC/Gyl87u9F Uk9K5RHR8yqZEyeTQirfddXLo95c6iyvbNOrmhtTDy7+m4lC0QxtB8N+NdmS5b4L064y 85NPw5sxhsycKdS/urfzdb08e9eL/VnSYV6pxaQ2wPmGAM2O2ODFf1gXrxBn5ey6JU1r iZsw== X-Gm-Message-State: AOJu0Ywr5UMo/dIkmz0lTlSaXT7NmrFAwC3+lVxT076EFIYiV6gwrNYt EFoxGxJ5HkC9okOpFnopfWqSfo9l96nilADXk8V+64gPHRC2j24CKhrsaOml X-Gm-Gg: ASbGncuTEIxvxt/NApCn7zt/UwbnSk0AtZRVgh1AUBGDL0KkOhVuDlw0bWk8NSSZtMh INZNlC4szhJacser1F8DM4vORU4Mnk0ildb4RFQijvyNtOr5QfNWSC/ji0bYxXJ2dlJ2bJsnMac Q/302bOM/8TMqXBVVjpk1lbPOoOYrQFRw2ME3I2ihnXczu13SmYO3vNRR9uQdi9CGWGYiws2gxh hji8RDjOTU2MgI2QSTqSJVfRIrXQv8TM5PaB+KK13YMqtUjpRlBpjU48VafBw== X-Google-Smtp-Source: AGHT+IFnnswhDduT1O4ivnDl3Soi6RoMGXBqnBiccKVA6rRsdpT/lgJ3bkHfawtgZT9Gp8VB1qMk6w== X-Received: by 2002:a05:6000:71a:b0:385:e17a:ce6f with SMTP id ffacd0b85a97d-38880acce62mr11377409f8f.24.1734370076847; Mon, 16 Dec 2024 09:27:56 -0800 (PST) Received: from localhost ([31.210.180.118]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436362b64a5sm92378445e9.29.2024.12.16.09.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 09:27:56 -0800 (PST) From: Efraim Flashner Date: Mon, 16 Dec 2024 19:26:44 +0200 Message-ID: <83835bd9c18faf25c98fbf2d57429026f6b7e03c.1734369315.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: unmush This includes a patch to add support for a element to mono's *.dll.config and *.exe.config files. See mono-6.12.0-add-runpath.patch for details. * gnu/packages/dotnet.scm (mono-6.12.0-external-repo-specs, mono-6.12.0): New variable. * gnu/packages/patches/mono-6.12.0-{add-runpath,fix-AssemblyResolver,fix-ConditionParser}.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register new patches. Change-Id: I9d5bd5d366c368eb235483411818c90374bfc4d4 --- gnu/local.mk | 3 + gnu/packages/dotnet.scm | 194 ++++++++++++++ .../patches/mono-6.12.0-add-runpath.patch | 185 ++++++++++++++ .../mono-6.12.0-fix-AssemblyResolver.patch | 236 ++++++++++++++++++ .../mono-6.12.0-fix-ConditionParser.patch | 46 ++++ 5 files changed, 664 insertions(+) create mode 100644 gnu/packages/patches/mono-6.12.0-add-runpath.patch create mode 100644 gnu/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch create mode 100644 gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch diff --git a/gnu/local.mk b/gnu/local.mk index 35a2d7e55a7..8722c2a33d9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1830,6 +1830,9 @@ dist_patch_DATA = \ %D%/packages/patches/mono-5.4.0-patches.patch \ %D%/packages/patches/mono-5.8.0-patches.patch \ %D%/packages/patches/mono-5.10.0-later-mcs-changes.patch \ + %D%/packages/patches/mono-6.12.0-add-runpath.patch \ + %D%/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch \ + %D%/packages/patches/mono-6.12.0-fix-ConditionParser.patch \ %D%/packages/patches/mono-mcs-patches-from-5.10.0.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index 03e18e29c6d..22dcf88adb4 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm @@ -1634,3 +1634,197 @@ (define-public libgdiplus most of the heavy lifting.") (home-page "https://github.com/mono/libgdiplus") (license license:expat))) + +(define mono-6.12.0-external-repo-specs + '(("api-doc-tools" "5da8127af9e68c9d58a90aa9de21f57491d81261" + "0rq8dxmy5av36nd298k60d8s386zhqlw63yn2ywc0416xsflscg4" + #:recursive? #t) + ("api-snapshot" "808e8a9e4be8d38e097d2b0919cac37bc195844a" + "1i5migdw649bmxqii99q2hd6vka11wlcphfrm98kb7pprz4k401a") + ("aspnetwebstack" "e77b12e6cc5ed260a98447f609e887337e44e299" + "0rks344qr4fmp3fs1264d2qkmm348m8d1kjd7z4l94iiirwn1fq1") + ;; (("https://github.com/Unity-Technologies/bdwgc" "bdwgc") + ;; "a27eddb837d613cb4cf436405c23ce39ed16a86d" + ;; "") + (("reference-assemblies" "binary-reference-assemblies") + "e68046d5106aa0349c23f95821456955fc15b96b" + "1mqpz274qdhl84y6x8bazrfmajcf6qagiks2g0gyg4qyqwgrp490") + ("bockbuild" "3bd44f6784b85b1ece8b00b13d12cf416f5a87e7" + "0z3d8qylfwnlklpcvsmsgy5n248gcff5vmzqjzalfj7d1h7vcjxs") + ("boringssl" "296137cf989688b03ed89f72cd7bfd86d470441e" + "11ghdayfcvysnh1617bj478hxrg7b43jpk7vgafm6jb7ykpxl8fa") + ("cecil" "8021f3fbe75715a1762e725594d8c00cce3679d8" + "0j19lwbs30y2xz8myk0fbxs4hbal1p8vqjmnkvn301v0xxacynxm") + (("cecil" "cecil-legacy") "33d50b874fd527118bc361d83de3d494e8bb55e1" + "1p4hl1796ib26ykyf5snl6cj0lx0v7mjh0xqhjw6qdh753nsjyhb") + ("corefx" "c4eeab9fc2faa0195a812e552cd73ee298d39386" + "03530pf6dddqlihvb83m9z34bark8mzrffnrclq726gndfg4vqs8") + ("corert" "11136ad55767485063226be08cfbd32ed574ca43" + "1g0q83fff13237nwsfcmk7fmzwx0kv93zsqqybcigwip5x6ani8f") + ("helix-binaries" "64b3a67631ac8a08ff82d61087cfbfc664eb4af8" + "1f6kkpbzj3bx9p1hb36kzjq0ppckk4rpmjnr82hyq7y18fwikfd7") + ("ikdasm" "f0fd66ea063929ef5d51aafdb10832164835bb0f" + "0313pvmmjh01h9b306jd6cd6fcbnbxaglaj81m0l0acf4yn7zb10") + (("ikvm-fork" "ikvm") "08266ac8c0b620cc929ffaeb1f23ac37629ce825" + "1g0v1v8nvxkwq7w9qyqhf9kgmxq3qm6rsw4al8x0w3dmbgxjhqjv") + ("illinker-test-assets" "ec9eb51af2eb07dbe50a2724db826bf3bfb930a6" + "1b4vq4jbgnl4lzffg02n5w1sppg2k6bfks0150pj403sbnml85gl") + ("linker" "ed4a9413489aa29a70e41f94c3dac5621099f734" + "16rdpch9anarnhczi441a9zna4rz93jwpb31x0dzrb4j03cxajg2") + ;; (("https://github.com/dotnet/llvm-project" "llvm-project") + ;; "7dfdea1267f0a40955e02567dcbcd1bcb987e825" + ;; "") + ("Newtonsoft.Json" "471c3e0803a9f40a0acc8aeceb31de6ff93a52c4" + "0dgngd5hqk6yhlg40kabn6qdnknm32zcx9q6bm2w31csnsk5978s") + (("NuGet.BuildTasks" "nuget-buildtasks") + "99558479578b1d6af0f443bb411bc3520fcbae5c" + "1434m6z9sb7bvki9ba6iinqpmh4a4iyld76jz10qz07sycklflq3") + (("NUnitLite" "nunit-lite") "a977ca57572c545e108b56ef32aa3f7ff8287611" + "02zwdfpw8pazllwbp4hkzqwfql98g4854diykqdb9wa0vrb8w4sj") + ;; ("roslyn-binaries" "1c6482470cd219dcc7503259a20f26a1723f20ec" + ;; "") + ("rx" "b29a4b0fda609e0af33ff54ed13652b6ccf0e05e" + "1n1jwhmsbkcv2d806immcpzkb72rz04xy98myw355a8w5ah25yiv") + ;; ("xunit-binaries" "8f6e62e1c016dfb15420852e220e07091923734a" + ;; "") + )) + +(define-public mono-6.12.0 + (package + (inherit mono-5.10.0) + (version "6.12.0.206") + (name "mono") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.winehq.org/mono/mono.git") + (commit (string-append "mono-" "6.12.0.206")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1cw9v53bgbc6v7xmp5ij76y6inb6sz1g1zx2jk825rxshq96alvk")) + (modules '((guix build utils) + (ice-9 string-fun))) + (snippet #~(begin + #$(add-external-repos + mono-6.12.0-external-repo-specs) + #$@prepare-mono-source-0)) + (patches + (search-patches + "mono-6.12.0-fix-ConditionParser.patch" + "mono-6.12.0-add-runpath.patch" + "mono-6.12.0-fix-AssemblyResolver.patch")))) + (native-inputs (modify-inputs (package-native-inputs mono-5.10.0) + (replace "mono" mono-5.10.0) + (append (default-python)))) + (inputs (modify-inputs (package-inputs mono-5.10.0) + (append libgdiplus))) + (arguments + (substitute-keyword-arguments (package-arguments mono-5.10.0) + ((#:make-flags make-flags #~'()) + #~(append #$make-flags + (list + (string-append "PLATFORM_DISABLED_TESTS=" + ;; segfaults (!), reason unknown + "safehandle.2.exe" + ;; unclear why these fail + "bug-10834.exe" + "bug-60848.exe" + ;; these are tests of microsoft + ;; telemetry. They fail because + ;; microsoft telemetry is only + ;; enabled on OSX. No idea why + ;; these tests are run by default. + "merp-crash-test.exe" + "merp-json-valid.exe")))) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (delete 'patch-sub-autogen.sh-shebang) + ;; Our 5.10.0 compiler has been rather souped up. + (add-after 'unpack 'disable-profile-version-check + (lambda _ + (substitute* "mcs/build/common/basic-profile-check.cs" + (("min_mono_version = .*") + "min_mono_version = new Version (0, 0);\n")))) + (add-after 'unpack 'disable-c#-8.0-tests + ;; These aren't compilable by mcs + (lambda _ + (substitute* "mono/mini/Makefile.am.in" + (("-langversion:8\\.0") + "")) + (substitute* "mono/tests/Makefile.am" + ((" (dim-generic|dim-issue-18917|interface-2|delegate18|generic-unmanaged-constraint|async-generic-enum)\\.cs.*") + "")))) + (add-after 'unpack 'disable-verification-error + (lambda _ + ;; For some reason verification fails complaining about a bunch + ;; of missing icalls. + (substitute* "runtime/Makefile.am" + ((" fi; done; done;") + " fi; done; done; ok=:;")))) + ;; This requires binary blobs to be used, it doesn't provide a + ;; clear way to regenerate them and no corresponding source is + ;; linked, plus from what little I know of it it sounds like it's + ;; not something we need at all? + (add-after 'unpack 'disable-helix-client + (lambda _ + (substitute* "mcs/tools/Makefile" + (("mono-helix-client") + "")))) + (replace 'build-reference-assemblies + (lambda* (#:key make-flags #:allow-other-keys) + (let ((top (getcwd))) + (with-directory-excursion + "external/binary-reference-assemblies" + (substitute* (find-files "." "^Makefile$") + (("CSC_COMMON_ARGS := " all) + (string-append all "-delaysign+ ")) + (("IBM\\.Data\\.DB2_REFS := " all) + (string-append all "System.Xml ")) + (("Mono\\.Data\\.Sqlite_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Data\\.DataSetExtensions_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Data\\.OracleClient_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.IdentityModel_REFS := " all) + (string-append all "System.Configuration ")) + (("System\\.Design_REFS := " all) + (string-append all "Accessibility ")) + (("System\\.Web\\.Extensions\\.Design_REFS := " all) + (string-append all "System.Windows.Forms System.Web ")) + (("System\\.ServiceModel\\.Routing_REFS := " all) + (string-append all "System.Xml ")) + (("System\\.Web\\.Abstractions_REFS := " all) + (string-append all "System ")) + (("System\\.Reactive\\.Windows\\.Forms_REFS := " all) + (string-append all "System ")) + (("System\\.Windows\\.Forms\\.DataVisualization_REFS := " all) + (string-append all "Accessibility ")) + (("Facades/System\\.ServiceModel\\.Primitives_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Dynamic\\.Runtime_REFS := " all) + (string-append all "System ")) + (("Facades/System\\.Xml\\.XDocument_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Runtime\\.Serialization.Xml_REFS := " all) + (string-append all "System.Xml ")) + (("Facades/System\\.Data\\.Common_REFS := " all) + (string-append all "System System.Xml "))) + (substitute* "build/monodroid/Makefile" + (("ECMA_KEY := \\.\\./\\.\\./\\.\\./\\.\\./\\.\\./mono/") + ;; it should only be 4 directories up, and it's in + ;; mcs/, not mono/mcs/ + "ECMA_KEY := ../../../../")) + (apply invoke "make" "CSC=mcs" make-flags))))) + (replace 'check + (lambda* (#:key tests? (make-flags '()) #:allow-other-keys) + (when tests? + ;; There are more tests than these, but they depend on + ;; external/xunit-binaries, so we limit ourselves to the + ;; tests that debian runs. + (with-directory-excursion "mono/mini" + (apply invoke "make" "check" make-flags)) + (with-directory-excursion "mono/tests" + (apply invoke "make" "check" make-flags))))))))))) diff --git a/gnu/packages/patches/mono-6.12.0-add-runpath.patch b/gnu/packages/patches/mono-6.12.0-add-runpath.patch new file mode 100644 index 00000000000..3062bd6a0de --- /dev/null +++ b/gnu/packages/patches/mono-6.12.0-add-runpath.patch @@ -0,0 +1,185 @@ +mono: metadata: add element to .config files. + +This new element is of the form: + + + +(the : will actually be whatever G_SEARCHPATH_SEPARATOR_S is, so likely ; on +windows and : elsewhere). + +* mono/metadata/metadata-internals.h (struct _MonoImage): new 'runpath' field. +* mono/metadata/mono-config.c (runpath_init, runpath_start, runpath_handler): + new functions and parser using them to populate runpath field from + element. + (mono_config_init): register runpath_handler. +* mono/metadata/assembly.c (mono_assembly_load_full_gac_base_default): new + 'requesting' parameter, use it to search the requesting assembly's runpath + first. + (mono_assembly_request_byname_nosearch): use it. + + +diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c +index f9feaacf2c1..8c71ad0eb95 100644 +--- a/mono/metadata/assembly.c ++++ b/mono/metadata/assembly.c +@@ -376,7 +376,7 @@ mono_assembly_invoke_search_hook_internal (MonoAssemblyLoadContext *alc, MonoAss + static MonoAssembly* + mono_assembly_request_byname_nosearch (MonoAssemblyName *aname, const MonoAssemblyByNameRequest *req, MonoImageOpenStatus *status); + static MonoAssembly* +-mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname, const char *basedir, MonoAssemblyLoadContext *alc, MonoAssemblyContextKind asmctx, MonoImageOpenStatus *status); ++mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname, MonoAssembly *requesting, const char *basedir, MonoAssemblyLoadContext *alc, MonoAssemblyContextKind asmctx, MonoImageOpenStatus *status); + static MonoAssembly* + chain_redirections_loadfrom (MonoAssemblyLoadContext *alc, MonoImage *image, MonoImageOpenStatus *out_status); + static MonoAssembly* +@@ -4655,7 +4655,7 @@ mono_assembly_request_byname_nosearch (MonoAssemblyName *aname, + } + + #ifndef ENABLE_NETCORE +- result = mono_assembly_load_full_gac_base_default (aname, req->basedir, req->request.alc, req->request.asmctx, status); ++ result = mono_assembly_load_full_gac_base_default (aname, req->requesting_assembly, req->basedir, req->request.alc, req->request.asmctx, status); + #endif + return result; + } +@@ -4667,6 +4667,7 @@ mono_assembly_request_byname_nosearch (MonoAssemblyName *aname, + */ + MonoAssembly* + mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname, ++ MonoAssembly *requesting, + const char *basedir, + MonoAssemblyLoadContext *alc, + MonoAssemblyContextKind asmctx, +@@ -4718,6 +4719,23 @@ mono_assembly_load_full_gac_base_default (MonoAssemblyName *aname, + filename = g_strconcat (aname->name, ext, (const char*)NULL); + } + ++ if (requesting ++ && requesting->image ++ && requesting->image->runpath) { ++ char **runpath = requesting->image->runpath; ++ int j; ++ for (j = 0; runpath[j]; j++) { ++ fullpath = g_build_filename (runpath[j], filename, NULL); ++ result = mono_assembly_request_open (fullpath, &req, status); ++ g_free (fullpath); ++ if (result) { ++ result->in_gac = FALSE; ++ g_free (filename); ++ return result; ++ } ++ } ++ } ++ + #ifndef DISABLE_GAC + const gboolean refonly = asmctx == MONO_ASMCTX_REFONLY; + +diff --git a/mono/metadata/image.c b/mono/metadata/image.c +index e0b86dd3d09..12a8094e4e0 100644 +--- a/mono/metadata/image.c ++++ b/mono/metadata/image.c +@@ -2363,6 +2363,9 @@ mono_image_close_except_pools (MonoImage *image) + + mono_metadata_clean_for_image (image); + ++ if (image->runpath) ++ g_strfreev (image->runpath); ++ + /* + * The caches inside a MonoImage might refer to metadata which is stored in referenced + * assemblies, so we can't release these references in mono_assembly_close () since the +diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h +index 9388d69b0fd..93f4b880c61 100644 +--- a/mono/metadata/metadata-internals.h ++++ b/mono/metadata/metadata-internals.h +@@ -423,6 +423,12 @@ struct _MonoImage { + /**/ + MonoTableInfo tables [MONO_TABLE_NUM]; + ++ /* ++ Search path to be tried first when looking for assemblies referenced by ++ this image, or NULL. Is a NULL-terminated vector. ++ */ ++ char **runpath; ++ + /* + * references is initialized only by using the mono_assembly_open + * function, and not by using the lowlevel mono_image_open. +diff --git a/mono/metadata/mono-config.c b/mono/metadata/mono-config.c +index d973de53c8c..8888c7b4fac 100644 +--- a/mono/metadata/mono-config.c ++++ b/mono/metadata/mono-config.c +@@ -21,6 +21,7 @@ + #include "mono/metadata/metadata-internals.h" + #include "mono/metadata/object-internals.h" + #include "mono/utils/mono-logger-internals.h" ++#include "mono/utils/mono-path.h" + + #if defined(TARGET_PS3) + #define CONFIG_OS "CellOS" +@@ -464,6 +465,59 @@ aot_cache_handler = { + NULL, /* finish */ + }; + ++static void* ++runpath_init (MonoImage *assembly) ++{ ++ return assembly; ++} ++ ++static void ++runpath_start (gpointer user_data, ++ const gchar *element_name, ++ const gchar **attribute_names, ++ const gchar **attribute_values) ++{ ++ MonoImage *assembly = (MonoImage *) user_data; ++ int i; ++ ++ if (strcmp (element_name, "runpath") != 0) ++ return; ++ ++ for (i = 0; attribute_names[i]; i++) ++ { ++ if(!strcmp (attribute_names [i], "path")) ++ { ++ char **splitted, **dest; ++ ++ splitted = g_strsplit (attribute_values[i], ++ G_SEARCHPATH_SEPARATOR_S, ++ 1000); ++ if (assembly->runpath) ++ g_strfreev (assembly->runpath); ++ assembly->runpath = dest = splitted; ++ while (*splitted) { ++ char *tmp = *splitted; ++ if (*tmp) ++ *dest++ = mono_path_canonicalize (tmp); ++ g_free (tmp); ++ splitted++; ++ } ++ *dest = *splitted; ++ break; ++ } ++ } ++} ++ ++static const MonoParseHandler ++runpath_handler = { ++ "runpath", ++ runpath_init, ++ runpath_start, ++ NULL, /* text */ ++ NULL, /* end */ ++ NULL, /* finish */ ++}; ++ + static int inited = 0; + + static void +@@ -476,6 +530,7 @@ mono_config_init (void) + #endif + g_hash_table_insert (config_handlers, (gpointer) legacyUEP_handler.element_name, (gpointer) &legacyUEP_handler); + g_hash_table_insert (config_handlers, (gpointer) aot_cache_handler.element_name, (gpointer) &aot_cache_handler); ++ g_hash_table_insert (config_handlers, (gpointer) runpath_handler.element_name, (gpointer) &runpath_handler); + } + + /** diff --git a/gnu/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch b/gnu/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch new file mode 100644 index 00000000000..05db7b9cdd3 --- /dev/null +++ b/gnu/packages/patches/mono-6.12.0-fix-AssemblyResolver.patch @@ -0,0 +1,236 @@ +diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs +index 5e0ec480956..9daf9d6920b 100644 +--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs ++++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssemblyResolver.cs +@@ -67,54 +67,56 @@ public void ResetSearchLogger () + search_log.Clear (); + } + +- string GetGacPath () ++ string[] GetGacPaths () + { + // NOTE: code from mcs/tools/gacutil/driver.cs +- PropertyInfo gac = typeof (System.Environment).GetProperty ("GacPath", BindingFlags.Static | BindingFlags.NonPublic); ++ PropertyInfo gacs = typeof (System.Environment).GetProperty ("GacPaths", BindingFlags.Static | BindingFlags.NonPublic); + +- if (gac == null) ++ if (gacs == null) + return null; + +- MethodInfo get_gac = gac.GetGetMethod (true); +- return (string) get_gac.Invoke (null, null); ++ MethodInfo get_gacs = gacs.GetGetMethod (true); ++ return (string[]) get_gacs.Invoke (null, null); + } + + void GatherGacAssemblies () + { +- string gac_path = GetGacPath (); +- if (gac_path == null) +- throw new InvalidOperationException ("XBuild must be run on Mono runtime"); +- if (!Directory.Exists (gac_path)) +- return; // in case mono isn't "installed". +- +- Version version; +- DirectoryInfo version_info, assembly_info; +- +- foreach (string assembly_name in Directory.GetDirectories (gac_path)) { +- assembly_info = new DirectoryInfo (assembly_name); +- foreach (string version_token in Directory.GetDirectories (assembly_name)) { +- foreach (string file in Directory.GetFiles (version_token, "*.dll")) { +- version_info = new DirectoryInfo (version_token); +- version = new Version (version_info.Name.Split ( +- new char [] {'_'}, StringSplitOptions.RemoveEmptyEntries) [0]); +- +- Dictionary assembliesByVersion = new Dictionary (); +- if (!gac.TryGetValue (assembly_info.Name, out assembliesByVersion)) { +- assembliesByVersion = new Dictionary (); +- gac.Add (assembly_info.Name, assembliesByVersion); +- } +- +- string found_file; +- if (assembliesByVersion.TryGetValue (version, out found_file) && +- File.GetLastWriteTime (file) <= File.GetLastWriteTime (found_file)) +- // Duplicate found, take the newer file +- continue; +- +- assembliesByVersion [version] = file; +- } +- } +- } +- } ++ string[] gac_paths = GetGacPaths (); ++ if (gac_paths == null) ++ throw new InvalidOperationException ("XBuild must be run on Mono runtime"); ++ if (gac_paths.Length == 0 || !Directory.Exists (gac_paths[0])) ++ return; // in case mono isn't "installed". ++ ++ Version version; ++ DirectoryInfo version_info, assembly_info; ++ ++ foreach (string gac_path in gac_paths) { ++ foreach (string assembly_name in Directory.GetDirectories (gac_path)) { ++ assembly_info = new DirectoryInfo (assembly_name); ++ foreach (string version_token in Directory.GetDirectories (assembly_name)) { ++ foreach (string file in Directory.GetFiles (version_token, "*.dll")) { ++ version_info = new DirectoryInfo (version_token); ++ version = new Version (version_info.Name.Split ( ++ new char [] {'_'}, StringSplitOptions.RemoveEmptyEntries) [0]); ++ ++ Dictionary assembliesByVersion = new Dictionary (); ++ if (!gac.TryGetValue (assembly_info.Name, out assembliesByVersion)) { ++ assembliesByVersion = new Dictionary (); ++ gac.Add (assembly_info.Name, assembliesByVersion); ++ } ++ ++ string found_file; ++ if (assembliesByVersion.TryGetValue (version, out found_file) && ++ File.GetLastWriteTime (file) <= File.GetLastWriteTime (found_file)) ++ // Duplicate found, take the newer file ++ continue; ++ ++ assembliesByVersion [version] = file; ++ } ++ } ++ } ++ } ++ } + + public ResolvedReference FindInTargetFramework (ITaskItem reference, string framework_dir, bool specific_version) + { +diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs +index fd936ab21a4..b5a5c77c1a3 100644 +--- a/mcs/class/corlib/System/Environment.cs ++++ b/mcs/class/corlib/System/Environment.cs +@@ -984,9 +984,18 @@ private static string GacPath { + return Path.Combine (Path.Combine (internalGetGacPath (), "mono"), "gac"); + } + } ++ ++ private static string[] GacPaths { ++ get { ++ return internalGetGacPaths (); ++ } ++ } + #pragma warning restore 169 + [MethodImplAttribute (MethodImplOptions.InternalCall)] + internal extern static string internalGetGacPath (); ++ ++ [MethodImplAttribute (MethodImplOptions.InternalCall)] ++ internal extern static string [] internalGetGacPaths (); + #endif + [MethodImplAttribute (MethodImplOptions.InternalCall)] + internal extern static string [] GetLogicalDrivesInternal (); +diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c +index 8c71ad0eb95..759d5aefbcf 100644 +--- a/mono/metadata/assembly.c ++++ b/mono/metadata/assembly.c +@@ -854,6 +854,11 @@ mono_assembly_getrootdir (void) + return default_path [0]; + } + ++char **mono_assembly_get_extra_gac_paths() ++{ ++ return extra_gac_paths; ++} ++ + /** + * mono_native_getrootdir: + * +diff --git a/mono/metadata/assembly.h b/mono/metadata/assembly.h +index e9c02ee26f5..e5f060e8238 100644 +--- a/mono/metadata/assembly.h ++++ b/mono/metadata/assembly.h +@@ -50,6 +50,7 @@ MONO_API MONO_RT_EXTERNAL_ONLY MonoImage* mono_assembly_load_module (MonoAsse + MONO_API void mono_assembly_close (MonoAssembly *assembly); + MONO_API void mono_assembly_setrootdir (const char *root_dir); + MONO_API MONO_CONST_RETURN char *mono_assembly_getrootdir (void); ++MONO_API char **mono_assembly_get_extra_gac_paths (void); + MONO_API char *mono_native_getrootdir (void); + MONO_API void mono_assembly_foreach (MonoFunc func, void* user_data); + MONO_API void mono_assembly_set_main (MonoAssembly *assembly); +diff --git a/mono/metadata/icall-decl.h b/mono/metadata/icall-decl.h +index a77fcf38598..3f0f1758ec2 100644 +--- a/mono/metadata/icall-decl.h ++++ b/mono/metadata/icall-decl.h +@@ -152,6 +152,7 @@ ICALL_EXPORT gint32 ves_icall_System_Environment_get_TickCount (void); + #if ENABLE_NETCORE + ICALL_EXPORT gint64 ves_icall_System_Environment_get_TickCount64 (void); + #endif ++ICALL_EXPORT MonoArray *ves_icall_System_Environment_GetGacPaths (void); + ICALL_EXPORT gint64 ves_icall_System_DateTime_GetSystemTimeAsFileTime (void); + ICALL_EXPORT gint64 ves_icall_System_Diagnostics_Process_GetProcessData (int, gint32, MonoProcessError*); + ICALL_EXPORT gint64 ves_icall_System_Diagnostics_Stopwatch_GetTimestamp (void); +diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h +index 0a44729674b..59c803ba488 100644 +--- a/mono/metadata/icall-def.h ++++ b/mono/metadata/icall-def.h +@@ -327,6 +327,7 @@ HANDLES(ENV_16b, "get_bundled_machine_config", ves_icall_System_Environment_get_ + HANDLES(ENV_16m, "internalBroadcastSettingChange", ves_icall_System_Environment_BroadcastSettingChange, void, 0, ()) + HANDLES(ENV_17, "internalGetEnvironmentVariable_native", ves_icall_System_Environment_GetEnvironmentVariable_native, MonoString, 1, (const_char_ptr)) + HANDLES(ENV_18, "internalGetGacPath", ves_icall_System_Environment_GetGacPath, MonoString, 0, ()) ++NOHANDLES(ICALL(ENV_18_1, "internalGetGacPaths", ves_icall_System_Environment_GetGacPaths)) + HANDLES(ENV_19, "internalGetHome", ves_icall_System_Environment_InternalGetHome, MonoString, 0, ()) + NOHANDLES(ICALL(ENV_20, "set_ExitCode", mono_environment_exitcode_set)) + ICALL_TYPE(GC, "System.GC", GC_10) +diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c +index 6d16b9c3540..1e592c30e27 100644 +--- a/mono/metadata/icall.c ++++ b/mono/metadata/icall.c +@@ -7781,6 +7781,56 @@ ves_icall_System_Environment_GetGacPath (MonoError *error) + } + #endif + ++ICALL_EXPORT MonoArray * ++ves_icall_System_Environment_GetGacPaths () ++{ ++ char **extra_gac_paths = mono_assembly_get_extra_gac_paths(); ++ const char *rootdir = mono_assembly_getrootdir (); ++ char **e; ++ int n; ++ MonoDomain *domain; ++ MonoArray *out; ++ MonoString *str; ++ gchar *tmp; ++ MonoError error; ++ n = 0; ++ if (rootdir) n++; ++ if (extra_gac_paths) { ++ for (e = extra_gac_paths; *e != 0; e++); ++ n += (e - extra_gac_paths); ++ } ++ ++ domain = mono_domain_get (); ++ out = mono_array_new_checked (domain, mono_defaults.string_class, n, &error); ++ ++ if (mono_error_set_pending_exception (&error)) ++ return NULL; ++ ++ n = 0; ++ if (rootdir) { ++ tmp = g_build_path (G_DIR_SEPARATOR_S, rootdir, "mono", "gac", NULL); ++ str = mono_string_new_checked (domain, tmp, &error); ++ g_free (tmp); ++ if (mono_error_set_pending_exception (&error)) ++ return NULL; ++ mono_array_setref_internal (out, n, str); ++ n++; ++ } ++ if (extra_gac_paths) { ++ for (e = extra_gac_paths; *e != 0; e++) { ++ tmp = g_build_path (G_DIR_SEPARATOR_S, *e, "lib", "mono", "gac", NULL); ++ str = mono_string_new_checked (domain, tmp, &error); ++ g_free (tmp); ++ if (mono_error_set_pending_exception (&error)) ++ return NULL; ++ mono_array_setref_internal (out, n, str); ++ n++; ++ } ++ } ++ ++ return out; ++} ++ + #ifndef HOST_WIN32 + static inline MonoStringHandle + mono_icall_get_windows_folder_path (int folder, MonoError *error) diff --git a/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch b/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch new file mode 100644 index 00000000000..4ecde07d426 --- /dev/null +++ b/gnu/packages/patches/mono-6.12.0-fix-ConditionParser.patch @@ -0,0 +1,46 @@ +diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs +index b5e2e809ae4..757492d15e4 100644 +--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs ++++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs +@@ -205,19 +205,30 @@ ConditionExpression ParseFunctionExpression (string function_name) + { + List list = new List (); + ConditionFactorExpression e; +- ++ ++ /* starts looking at the open paren, move past it */ ++ tokenizer.GetNextToken (); ++ if (tokenizer.Token.Type == TokenType.RightParen) { ++ /* leave us looking past the end of the argument list */ ++ tokenizer.GetNextToken (); ++ return list; ++ } + while (true) { +- tokenizer.GetNextToken (); +- if (tokenizer.Token.Type == TokenType.RightParen) { +- tokenizer.GetNextToken (); +- break; +- } +- if (tokenizer.Token.Type == TokenType.Comma) ++ e = (ConditionFactorExpression) ParseFactorExpression (); ++ list.Add (e); ++ /* ParseFactorExpression leaves us looking at what follows the ++ * expression */ ++ if (tokenizer.Token.Type == TokenType.RightParen) { ++ /* leave us looking past the end of the argument list */ ++ tokenizer.GetNextToken (); ++ break; ++ } ++ if (tokenizer.Token.Type == TokenType.Comma) { ++ tokenizer.GetNextToken (); + continue; +- +- tokenizer.Putback (tokenizer.Token); +- e = (ConditionFactorExpression) ParseFactorExpression (); +- list.Add (e); ++ } ++ ++ throw new ExpressionParseException (String.Format ("Unexpected token {0} in argument list while parsing condition \"{1}\"", tokenizer.Token, conditionStr)); + } + + return list;