Skip to content

Commit 031b30e

Browse files
committed
Remove init_files which is no longer used by ruby_binary
from host_runtime
1 parent d67c8d8 commit 031b30e

File tree

4 files changed

+0
-42
lines changed

4 files changed

+0
-42
lines changed

ruby/private/BUILD.host_runtime.tpl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ ruby_toolchain(
1010
name = "ruby_host",
1111
interpreter = "//:ruby_bin",
1212
bundler = "//:bundler",
13-
init_files = ["//:init_loadpath"],
1413
rubyopt = [
1514
"-I$(RUNFILES_DIR)/org_ruby_lang_ruby_host/bundler/lib",
1615
],
@@ -27,12 +26,6 @@ sh_binary(
2726
data = [":runtime"],
2827
)
2928

30-
filegroup(
31-
name = "init_loadpath",
32-
srcs = ["init_loadpath.rb"],
33-
data = ["loadpath.lst"],
34-
)
35-
3629
cc_import(
3730
name = "libruby",
3831
hdrs = glob({hdrs}),
@@ -57,8 +50,6 @@ filegroup(
5750
srcs = glob(
5851
include = ["**/*"],
5952
exclude = [
60-
"init_loadpath.rb",
61-
"loadpath.lst",
6253
"BUILD.bazel",
6354
"WORKSPACE",
6455
],

ruby/private/host_runtime.bzl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def _install_dirs(ctx, ruby, *names):
3939

4040
def _install_host_ruby(ctx, ruby):
4141
# Places SDK
42-
ctx.symlink(ctx.attr._init_loadpath_rb, "init_loadpath.rb")
4342
ctx.symlink(ruby.interpreter_realpath, ruby.rel_interpreter_path)
4443

4544
# Places the interpreter at a predictable place regardless of the actual binary name
@@ -72,7 +71,6 @@ def _install_host_ruby(ctx, ruby):
7271
else:
7372
shared_library = None
7473

75-
ctx.file("loadpath.lst", "\n".join(rel_paths))
7674
return struct(
7775
includedirs = _install_dirs(ctx, ruby, "rubyarchhdrdir", "rubyhdrdir"),
7876
libdirs = rel_paths,
@@ -121,12 +119,6 @@ ruby_host_runtime = repository_rule(
121119
implementation = _ruby_host_runtime_impl,
122120
attrs = {
123121
"interpreter_path": attr.string(),
124-
"_init_loadpath_rb": attr.label(
125-
default = "%s//:ruby/tools/init_loadpath.rb" % (
126-
RULES_RUBY_WORKSPACE_NAME
127-
),
128-
allow_single_file = True,
129-
),
130122
"_install_bundler": attr.label(
131123
default = "%s//ruby/private:install_bundler.rb" % (
132124
RULES_RUBY_WORKSPACE_NAME

ruby/private/toolchain.bzl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ RubyRuntimeInfo = provider(
55
fields = {
66
"interpreter": "A label which points the Ruby interpreter",
77
"bundler": "A label which points bundler command",
8-
"init_files": "A list of labels which points initialization libraries",
98
"runtime": "A list of labels which points runtime libraries",
109
"rubyopt": "A list of strings which should be passed to the interpreter as command line options",
1110
},
@@ -16,7 +15,6 @@ def _ruby_toolchain_impl(ctx):
1615
ruby_runtime = RubyRuntimeInfo(
1716
interpreter = ctx.attr.interpreter,
1817
bundler = ctx.attr.bundler,
19-
init_files = ctx.attr.init_files,
2018
runtime = ctx.files.runtime,
2119
rubyopt = ctx.attr.rubyopt,
2220
),
@@ -37,10 +35,6 @@ _ruby_toolchain = rule(
3735
executable = True,
3836
cfg = "target",
3937
),
40-
"init_files": attr.label_list(
41-
allow_files = True,
42-
cfg = "target",
43-
),
4438
"runtime": attr.label(
4539
mandatory = True,
4640
allow_files = True,
@@ -57,7 +51,6 @@ def ruby_toolchain(
5751
interpreter,
5852
bundler,
5953
runtime,
60-
init_files = [],
6154
rubyopt = [],
6255
rules_ruby_workspace = RULES_RUBY_WORKSPACE_NAME,
6356
**kwargs):
@@ -66,7 +59,6 @@ def ruby_toolchain(
6659
name = impl_name,
6760
interpreter = interpreter,
6861
bundler = bundler,
69-
init_files = init_files,
7062
rubyopt = rubyopt,
7163
runtime = runtime,
7264
)

ruby/tools/init_loadpath.rb

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)