From nobody Sat Apr 20 18:31:58 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VMKqL6w0Nz5JFXm; Sat, 20 Apr 2024 18:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VMKqL3j9Vz4D7x; Sat, 20 Apr 2024 18:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713637918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RjkL+tEBpVfdNk0s6Z57HOOUYfndLEP2MAsl0p4Yog=; b=EzAFB2owKDz6oWHGjR/PSKCJU7l+qhVKvT6xEvbGxe4+f0hPXNYSbrbFxEn1bbeVupU14J Jfgse1nnJ5p+BjO/8x3gFBc8QOeOYcoRNQ2ikzysSL2s6/75icJm+d2eDlcxCxlGP9UZ1G x6fx0rIhgkghEWNowL64bYVfuE/tEf7XR+4tqAdo+7zb4QYchaUf/KQB2FEOuHrcX3mGvN iUt/vcBjbaOl83AJpNUjJdAMkAszNFH97NJGvrfauG8+uQYwmtrx1RebQtdAV/ioP8t7OI KLzLm7IYT243PKYcEsE6Lg78a/rJAakeXIIQmtXs9b2VczdIoGK4y3xUpN3QUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713637918; a=rsa-sha256; cv=none; b=u2WHKq3XqW5ULwxQJxqQukd+QHLCG577+UKqHmUs4nURuF7xpYDc6bEprQz5OeKvsNH1C2 zp9pYR8zep6j15ocjBE0NK2W79YXap0uQRozic9311v/tZMQEN2EK5XLHgdYsc7ma8oEZr WWa5E/HEsVfdNRBjLvaN0aQq18lq/kg8L7y3WV+5ypw5ddWHSClUlt06Xeh/EanwfmdMPv WT8b4KIjcDv85TgfCOo+st9dfCOrfDUb996DHWgp2gGp9OZKBDmbTYAjuaSoZ7Xqm+VCu/ bp+T8ZLycF2dDydwwq+T/uq+z0Oc3SrDFQZHcwCLNkE6EXiTAnjM4NlhaEGcng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713637918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RjkL+tEBpVfdNk0s6Z57HOOUYfndLEP2MAsl0p4Yog=; b=cv57INWkGfgLkzHpZkXI0fdgoxKErOwMg96N/n6VYY/nMi1NjWgCdk0Xb/Hgkx+Nuvih73 bGAxA0IqwMVaPJvzdcYz8gK9FsgFh5HVBfJlR/myHSqeCOhnXA4GPnDxzuexBrzT7FWTDf kBhhGjVnyK5CcfdfuJXRfanHLOmRIsh7IHF3dliXPpwNfPWLOYNU33Lbeib3nFli04DvVJ BMHb/Bk5BAE+tB9ykDYl9LGJlhvdVzqswR7LpAUMhqvo2OH4eFCqPrprZEyX2t/L26K2zJ EHdPXJBbByW+ZTR7sU2a8NmTG3JYoizKjedUu6reRsKQG7wT+m37qcn914/2wA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VMKqL3Ht1zp2X; Sat, 20 Apr 2024 18:31:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43KIVwZr034377; Sat, 20 Apr 2024 18:31:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43KIVwbb034374; Sat, 20 Apr 2024 18:31:58 GMT (envelope-from git) Date: Sat, 20 Apr 2024 18:31:58 GMT Message-Id: <202404201831.43KIVwbb034374@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 578c49b96a2d - main - devel/rubygem-ruby-lsp: Allow build with rubygem-prism 0.26.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 578c49b96a2d8c8f875455b232c6995afb8c73e0 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=578c49b96a2d8c8f875455b232c6995afb8c73e0 commit 578c49b96a2d8c8f875455b232c6995afb8c73e0 Author: Po-Chuan Hsieh AuthorDate: 2024-04-20 18:28:59 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-04-20 18:28:59 +0000 devel/rubygem-ruby-lsp: Allow build with rubygem-prism 0.26.0 - Bump PORTREVISION for package change Obtained from: https://github.com/Shopify/ruby-lsp/pull/1953 --- devel/rubygem-ruby-lsp/Makefile | 3 +- devel/rubygem-ruby-lsp/files/patch-gemspec | 2 +- devel/rubygem-ruby-lsp/files/patch-prism | 81 ++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 2 deletions(-) diff --git a/devel/rubygem-ruby-lsp/Makefile b/devel/rubygem-ruby-lsp/Makefile index 7fefc8d0ea96..74031bb8cf80 100644 --- a/devel/rubygem-ruby-lsp/Makefile +++ b/devel/rubygem-ruby-lsp/Makefile @@ -1,5 +1,6 @@ PORTNAME= ruby-lsp PORTVERSION= 0.16.4 +PORTREVISION= 1 CATEGORIES= devel rubygems MASTER_SITES= RG @@ -12,7 +13,7 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE.txt RUN_DEPENDS= rubygem-language_server-protocol>=3.17.0<3.18:devel/rubygem-language_server-protocol \ - rubygem-prism>=0.22.0<0.26:textproc/rubygem-prism \ + rubygem-prism>=0.22.0<0.27:textproc/rubygem-prism \ rubygem-sorbet-runtime>=0.5.10782:devel/rubygem-sorbet-runtime USES= gem diff --git a/devel/rubygem-ruby-lsp/files/patch-gemspec b/devel/rubygem-ruby-lsp/files/patch-gemspec index 38b30beeb0b3..c2bad8bc2a23 100644 --- a/devel/rubygem-ruby-lsp/files/patch-gemspec +++ b/devel/rubygem-ruby-lsp/files/patch-gemspec @@ -5,7 +5,7 @@ s.add_runtime_dependency(%q.freeze, ["~> 3.17.0".freeze]) - s.add_runtime_dependency(%q.freeze, [">= 0.22.0".freeze, "< 0.25".freeze]) -+ s.add_runtime_dependency(%q.freeze, [">= 0.22.0".freeze, "< 0.26".freeze]) ++ s.add_runtime_dependency(%q.freeze, [">= 0.22.0".freeze, "< 0.27".freeze]) s.add_runtime_dependency(%q.freeze, [">= 0.5.10782".freeze]) end diff --git a/devel/rubygem-ruby-lsp/files/patch-prism b/devel/rubygem-ruby-lsp/files/patch-prism new file mode 100644 index 000000000000..509624b3c918 --- /dev/null +++ b/devel/rubygem-ruby-lsp/files/patch-prism @@ -0,0 +1,81 @@ +Obtained from: https://github.com/Shopify/ruby-lsp/pull/1953 + +--- lib/ruby_indexer/lib/ruby_indexer/collector.rb.orig 2024-04-20 14:51:21 UTC ++++ lib/ruby_indexer/lib/ruby_indexer/collector.rb +@@ -7,7 +7,7 @@ module RubyIndexer + + LEAVE_EVENT = T.let(Object.new.freeze, Object) + +- sig { params(index: Index, parse_result: Prism::ParseResult, file_path: String).void } ++ sig { params(index: Index, parse_result: Prism::ParseResult[Prism::ProgramNode], file_path: String).void } + def initialize(index, parse_result, file_path) + @index = index + @file_path = file_path +--- lib/ruby_lsp/document.rb.orig 2024-04-20 14:51:21 UTC ++++ lib/ruby_lsp/document.rb +@@ -8,7 +8,7 @@ module RubyLsp + + abstract! + +- sig { returns(Prism::ParseResult) } ++ sig { returns(Prism::ParseResult[Prism::ProgramNode]) } + attr_reader :parse_result + + sig { returns(String) } +@@ -31,7 +31,7 @@ module RubyLsp + @version = T.let(version, Integer) + @uri = T.let(uri, URI::Generic) + @needs_parsing = T.let(true, T::Boolean) +- @parse_result = T.let(parse, Prism::ParseResult) ++ @parse_result = T.let(parse, Prism::ParseResult[Prism::ProgramNode]) + end + + sig { returns(Prism::ProgramNode) } +@@ -93,7 +93,7 @@ module RubyLsp + @cache.clear + end + +- sig { abstract.returns(Prism::ParseResult) } ++ sig { abstract.returns(Prism::ParseResult[Prism::ProgramNode]) } + def parse; end + + sig { returns(T::Boolean) } +--- lib/ruby_lsp/internal.rb.orig 2024-04-20 14:51:21 UTC ++++ lib/ruby_lsp/internal.rb +@@ -19,6 +19,14 @@ require "language_server-protocol" + require "prism/visitor" + require "language_server-protocol" + ++# Prism v0.26.0 introduced generics for ParseResult, but it causes some problems so the intention is to remove it. ++# Once that is done, we can remove this patch. ++module Prism ++ class ParseResult ++ extend T::Generic ++ end ++end ++ + require "ruby-lsp" + require "ruby_lsp/base_server" + require "ruby_indexer/ruby_indexer" +--- lib/ruby_lsp/listeners/document_link.rb.orig 2024-04-20 14:51:21 UTC ++++ lib/ruby_lsp/listeners/document_link.rb +@@ -124,7 +124,7 @@ module RubyLsp + match = comment.location.slice.match(%r{source://.*#\d+$}) + return unless match + +- uri = T.cast(URI(T.must(match[0])), URI::Source) ++ uri = T.cast(URI(match[0]), URI::Source) + gem_version = resolve_version(uri) + return if gem_version.nil? + +--- lib/ruby_lsp/ruby_document.rb.orig 2024-04-20 14:51:21 UTC ++++ lib/ruby_lsp/ruby_document.rb +@@ -3,7 +3,7 @@ module RubyLsp + + module RubyLsp + class RubyDocument < Document +- sig { override.returns(Prism::ParseResult) } ++ sig { override.returns(Prism::ParseResult[Prism::ProgramNode]) } + def parse + return @parse_result unless @needs_parsing +