Skip to content

Commit c44f18d

Browse files
committed
Adding a comment explaning asterisk
1 parent 91a9405 commit c44f18d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ruby/private/bundle/create_bundle_build_file.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,24 @@
5858
)
5959
ALL_GEMS
6060

61+
# For ordinary gems, this path is like 'lib/ruby/3.0.0/gems/rspec-3.10.0'.
62+
# For gems with native extension installed via prebuilt packages, the last part of this path can
63+
# contain an OS-specific suffix like 'grpc-1.38.0-universal-darwin' or 'grpc-1.38.0-x86_64-linux'
64+
# instead of 'grpc-1.38.0'.
65+
#
66+
# Since OS platform is unlikely to change between Bazel builds on the same machine,
67+
# `#{gem_name}-#{gem_version}*` would be sufficient to narrow down matches to at most one.
6168
GEM_PATH = ->(ruby_version, gem_name, gem_version) do
6269
Dir.glob("lib/ruby/#{ruby_version}/gems/#{gem_name}-#{gem_version}*").first
6370
end
6471

72+
# For ordinary gems, this path is like 'lib/ruby/3.0.0/specifications/rspec-3.10.0.gemspec'.
73+
# For gems with native extension installed via prebuilt packages, the last part of this path can
74+
# contain an OS-specific suffix like 'grpc-1.38.0-universal-darwin.gemspec' or
75+
# 'grpc-1.38.0-x86_64-linux.gemspec' instead of 'grpc-1.38.0.gemspec'.
76+
#
77+
# Since OS platform is unlikely to change between Bazel builds on the same machine,
78+
# `#{gem_name}-#{gem_version}*.gemspec` would be sufficient to narrow down matches to at most one.
6579
SPEC_PATH = ->(ruby_version, gem_name, gem_version) do
6680
Dir.glob("lib/ruby/#{ruby_version}/specifications/#{gem_name}-#{gem_version}*.gemspec").first
6781
end

0 commit comments

Comments
 (0)