From nobody Fri Nov 15 10:18:21 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 4XqXzL3jWhz5cxRh; Fri, 15 Nov 2024 10:18:22 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XqXzK6snNz4QtD; Fri, 15 Nov 2024 10:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731665902; 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=B0UlN0bEiozxw7cYxOk5gquq0onj26GMRp69FTLtlYs=; b=kOinfTwgd6MzvlyrH/UbKDTFvjuGFMqwAipO4BfB8GCF8M+1O2bs2/g4buToO94lHXjuVP mwUwoNuzSmjhFIfHD0JcJ58wulGxEARfxw7I2VjiJhc7KwpO4xm86ES2uJjGw4zVQCmid8 YkmJFpKqHXMfsbERwZoKbzjOBa2UieSE7vQOqK9SMXMfXXTDoQQvBd9b9bmPY41s5lyMp4 y/yIychARBOeYEZGDa6sJ+v4axzGzWk88MHSE0Gu6oxNLLF9+IxLf3SMHlmE6Jy4Pd9epa ywYLxd2rfkRzTbX5701Hs+HuY1gA2p3ffiwKes0HSgmie5mCHh9abxhWwspxww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731665902; 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=B0UlN0bEiozxw7cYxOk5gquq0onj26GMRp69FTLtlYs=; b=To/c4fcyEVBEKXPq97hk6FKiFvKAKiEhGrtE+qUzhnPt2KFWx+G5u+d3JUr4izKe/WLsjc F1FKgtMxYsRnFxoZQR0gcsyBJtpkQKvJf41+Oz8/H8zLWehJg1DDRa76GOBvfEGd56nyNV kHz7N+ws3D/65RkyGMBNo9NKkkfBFJ2imHvWau0wpG40Rgos6gd2yxfNtg1kQCSnr+5Hbo 1UIcVzt3oZgtP79NDycPaNAN1tYsN/zTAl4uvKWbtsetGdkPOKs55ajycguXNDbdMBka9e cha/H3fzBNMDi2Oam5yM/122lRjkVc+kZZRavcASOwf7mXyDa8Cc5u5O85lEyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731665902; a=rsa-sha256; cv=none; b=DDNU5d10OVD9p1GksP3iIpDN522ZNgX9NX1dxZcyDvZuDEZ62bCYD+W5wxtLPKUssVcmyI X24OnQgj6oXaUqrJssNwO0ah/Ju1hugqQ2LJOuwVujCmxYVuSup2ZjHOMBi8rvwl5E+hA3 BblnR6JL+XXzIMArmvXd6NSD09aIrAyhJ2qjHPtaouNsoVnaBr+R3Z8gwWKsQLw9wtOM2A tcQ6AtfOI41S0j52lJEHciTW/+tc5DegZU1IZQLwyatUlNokjZhapPFH8RLST7de96kwd5 93+LnKCK0EAlWjJc9mJKFBsEqbGHsSoR9lI5aAX3umI0U3ByzBUNNUhymDIPqA== 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 4XqXzK6VJdzJXZ; Fri, 15 Nov 2024 10:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AFAIL7K061823; Fri, 15 Nov 2024 10:18:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AFAILOn061820; Fri, 15 Nov 2024 10:18:21 GMT (envelope-from git) Date: Fri, 15 Nov 2024 10:18:21 GMT Message-Id: <202411151018.4AFAILOn061820@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: e43a38d09756 - main - devel/rubygem-ruby-lsp-rails: Allow build with rubygem-ruby-lsp 0.21.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: e43a38d09756947a42cebec8f347874c40d531c0 Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=e43a38d09756947a42cebec8f347874c40d531c0 commit e43a38d09756947a42cebec8f347874c40d531c0 Author: Po-Chuan Hsieh AuthorDate: 2024-11-15 10:09:51 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-11-15 10:17:15 +0000 devel/rubygem-ruby-lsp-rails: Allow build with rubygem-ruby-lsp 0.21.0+ - Bump PORTREVISION for package change Obtained from: https://github.com/Shopify/ruby-lsp-rails/commit/77650f0303da7bd0ff7ce718721f3fef767e16de https://github.com/Shopify/ruby-lsp-rails/commit/3a01040ac964764cf672c4c59f3b7d92da8f015a --- devel/rubygem-ruby-lsp-rails/Makefile | 3 +- devel/rubygem-ruby-lsp-rails/files/patch-ruby-lsp | 128 ++++++++++++++++++++++ 2 files changed, 130 insertions(+), 1 deletion(-) diff --git a/devel/rubygem-ruby-lsp-rails/Makefile b/devel/rubygem-ruby-lsp-rails/Makefile index 51fa72b96b9c..8a1c28002cc1 100644 --- a/devel/rubygem-ruby-lsp-rails/Makefile +++ b/devel/rubygem-ruby-lsp-rails/Makefile @@ -1,5 +1,6 @@ PORTNAME= ruby-lsp-rails PORTVERSION= 0.3.21 +PORTREVISION= 1 CATEGORIES= devel rubygems MASTER_SITES= RG @@ -11,7 +12,7 @@ WWW= https://shopify.github.io/ruby-lsp-rails/ \ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE.txt -RUN_DEPENDS= rubygem-ruby-lsp>=0.20.0<0.21.0:devel/rubygem-ruby-lsp +RUN_DEPENDS= rubygem-ruby-lsp>=0.21.2<0.22.0:devel/rubygem-ruby-lsp USES= gem diff --git a/devel/rubygem-ruby-lsp-rails/files/patch-ruby-lsp b/devel/rubygem-ruby-lsp-rails/files/patch-ruby-lsp new file mode 100644 index 000000000000..ddc43ba2304d --- /dev/null +++ b/devel/rubygem-ruby-lsp-rails/files/patch-ruby-lsp @@ -0,0 +1,128 @@ +Obtained from: https://github.com/Shopify/ruby-lsp-rails/commit/77650f0303da7bd0ff7ce718721f3fef767e16de + https://github.com/Shopify/ruby-lsp-rails/commit/3a01040ac964764cf672c4c59f3b7d92da8f015a + +--- lib/ruby_lsp/ruby_lsp_rails/addon.rb.orig 2024-11-04 01:43:34 UTC ++++ lib/ruby_lsp/ruby_lsp_rails/addon.rb +@@ -53,7 +53,7 @@ module RubyLsp + @outgoing_queue << Notification.window_log_message("Activating Ruby LSP Rails add-on v#{VERSION}") + + register_additional_file_watchers(global_state: global_state, outgoing_queue: outgoing_queue) +- @global_state.index.register_enhancement(IndexingEnhancement.new) ++ @global_state.index.register_enhancement(IndexingEnhancement.new(@global_state.index)) + + # Start booting the real client in a background thread. Until this completes, the client will be a NullClient + @client_mutex.unlock +@@ -128,7 +128,7 @@ module RubyLsp + + sig { params(global_state: GlobalState, outgoing_queue: Thread::Queue).void } + def register_additional_file_watchers(global_state:, outgoing_queue:) +- return unless global_state.supports_watching_files ++ return unless global_state.client_capabilities.supports_watching_files + + outgoing_queue << Request.new( + id: "ruby-lsp-rails-file-watcher", +--- lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb.orig 2024-11-04 01:43:34 UTC ++++ lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb +@@ -3,13 +3,11 @@ module RubyLsp + + module RubyLsp + module Rails +- class IndexingEnhancement ++ class IndexingEnhancement < RubyIndexer::Enhancement + extend T::Sig +- include RubyIndexer::Enhancement + + sig do + override.params( +- index: RubyIndexer::Index, + owner: T.nilable(RubyIndexer::Entry::Namespace), + node: Prism::CallNode, + file_path: String, +@@ -19,16 +17,16 @@ module RubyLsp + ), + ).void + end +- def on_call_node(index, owner, node, file_path, code_units_cache) ++ def on_call_node_enter(owner, node, file_path, code_units_cache) + return unless owner + + name = node.name + + case name + when :extend +- handle_concern_extend(index, owner, node) ++ handle_concern_extend(owner, node) + when :has_one, :has_many, :belongs_to, :has_and_belongs_to_many +- handle_association(index, owner, node, file_path, code_units_cache) ++ handle_association(owner, node, file_path, code_units_cache) + end + end + +@@ -36,7 +34,6 @@ module RubyLsp + + sig do + params( +- index: RubyIndexer::Index, + owner: RubyIndexer::Entry::Namespace, + node: Prism::CallNode, + file_path: String, +@@ -46,7 +43,7 @@ module RubyLsp + ), + ).void + end +- def handle_association(index, owner, node, file_path, code_units_cache) ++ def handle_association(owner, node, file_path, code_units_cache) + arguments = node.arguments&.arguments + return unless arguments + +@@ -64,7 +61,7 @@ module RubyLsp + loc = RubyIndexer::Location.from_prism_location(name_arg.location, code_units_cache) + + # Reader +- index.add(RubyIndexer::Entry::Method.new( ++ @index.add(RubyIndexer::Entry::Method.new( + name, + file_path, + loc, +@@ -76,7 +73,7 @@ module RubyLsp + )) + + # Writer +- index.add(RubyIndexer::Entry::Method.new( ++ @index.add(RubyIndexer::Entry::Method.new( + "#{name}=", + file_path, + loc, +@@ -90,12 +87,11 @@ module RubyLsp + + sig do + params( +- index: RubyIndexer::Index, + owner: RubyIndexer::Entry::Namespace, + node: Prism::CallNode, + ).void + end +- def handle_concern_extend(index, owner, node) ++ def handle_concern_extend(owner, node) + arguments = node.arguments&.arguments + return unless arguments + +@@ -105,7 +101,7 @@ module RubyLsp + module_name = node.full_name + next unless module_name == "ActiveSupport::Concern" + +- index.register_included_hook(owner.name) do |index, base| ++ @index.register_included_hook(owner.name) do |index, base| + class_methods_name = "#{owner.name}::ClassMethods" + + if index.indexed?(class_methods_name) +--- ruby-lsp-rails.gemspec.orig 2024-11-04 01:43:34 UTC ++++ ruby-lsp-rails.gemspec +@@ -21,6 +21,6 @@ Gem::Specification.new do |s| + + s.specification_version = 4 + +- s.add_runtime_dependency(%q.freeze, [">= 0.20.0".freeze, "< 0.21.0".freeze]) ++ s.add_runtime_dependency(%q.freeze, [">= 0.21.2".freeze, "< 0.22.0".freeze]) + end +