8000 Make "make exts" build only gems listed in gems/bundled_gems by mame · Pull Request #7119 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

Make "make exts" build only gems listed in gems/bundled_gems #7119
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Also build the gem version specified by commit hash
  • Loading branch information
mame committed Jan 17, 2023
commit 0a9a3aa9e26a25eec2bef28d68a79ca9ac025fab
10 changes: 9 additions & 1 deletion template/exts.mk.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@ macros["old_extensions"] = []
contpat = /(?>(?>[^\\\n]|\\.)*\\\n)*(?>[^\\\n]|\\.)*/
bundled_gems_to_build = {}
File.foreach(File.join(__dir__, "../gems/bundled_gems")) do |line|
bundled_gem_name, bundled_gem_version = line.split
bundled_gem_name, bundled_gem_version, _, bundled_gem_rev = line.split
next unless bundled_gem_name
next if bundled_gem_name.start_with?("#")
bundled_gems_to_build[bundled_gem_name + "-" + bundled_gem_version] = true
if bundled_gem_rev
ver_file = File.join(__dir__, "../gems/src/#{ bundled_gem_name }/lib/#{ bundled_gem_name }/version.rb")
if File.readable?(ver_file) && File.read(ver_file) =~ /VERSION\s*=\s*["'](.+?)["']/
bundled_gems_to_build[bundled_gem_name + "-" + $1] = true
else
warn "#$0: failed to read: #{ ver_file }"
end
end
end
Dir.glob("{ext,.bundle/gems}/*/exts.mk") do |e|
gem = e.start_with?(".bundle/gems/")
Expand Down
0