File tree Expand file tree Collapse file tree 9 files changed +61
-39
lines changed Expand file tree Collapse file tree 9 files changed +61
-39
lines changed Original file line number Diff line number Diff line change @@ -475,3 +475,13 @@ use_repo(
475
475
secondary_umbrella ,
476
476
"rabbitmq-server-generic-unix-3.10" ,
477
477
)
478
+
479
+ hex = use_extension (
480
+ "//bazel/bzlmod:extensions.bzl" ,
481
+ "hex" ,
482
+ )
483
+
484
+ use_repo (
485
+ hex ,
486
+ "hex" ,
487
+ )
Original file line number Diff line number Diff line change @@ -206,10 +206,3 @@ git_repository(
206
206
branch = "linux-rbe" ,
207
207
remote = "https://github.com/rabbitmq/rbe-erlang-platform.git" ,
208
208
)
209
-
210
- http_archive (
211
- name = "hex" ,
212
- strip_prefix = "hex-2.0.5" ,
213
- urls = ["https://github.com/hexpm/hex/archive/refs/tags/v2.0.5.zip" ],
214
- build_file = "@rabbitmq-server//bazel:BUILD.hex" ,
215
- )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
1
2
load ("@bazel_tools//tools/build_defs/repo:git.bzl" , "git_repository" )
2
3
load (
3
4
":secondary_umbrella.bzl" ,
@@ -137,3 +138,32 @@ def _secondary_umbrella(ctx):
137
138
secondary_umbrella = module_extension (
138
139
implementation = _secondary_umbrella ,
139
140
)
141
+
142
+ def _hex (ctx ):
143
+ http_archive (
144
+ name = "hex" ,
145
+ sha256 = "0e3e3290d0fcbdc6bb0526b73ca174d68dcff4d53ee86015c49ad0493e39ee65" ,
146
+ strip_prefix = "hex-2.0.5" ,
147
+ urls = ["https://github.com/hexpm/hex/archive/refs/tags/v2.0.5.zip" ],
148
+ build_file_content = """\
149
+ load(
150
+ "@rabbitmq-server//bazel/elixir:mix_archive_build.bzl",
151
+ "mix_archive_build",
152
+ )
153
+
154
+ mix_archive_build(
155
+ name = "archive",
156
+ srcs = [
157
+ "mix.exs",
158
+ ] + glob([
159
+ "lib/**/*",
160
+ ]),
161
+ out = "hex.ez",
162
+ visibility = ["//visibility:public"],
163
+ )
164
+ """ ,
165
+ )
166
+
167
+ hex = module_extension (
168
+ implementation = _hex ,
169
+ )
Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ def _impl(ctx):
29
29
for src in ctx .files .srcs :
30
30
dest = additional_file_dest_relative_path (ctx .label , src )
31
31
copy_srcs_commands .extend ([
32
- " mkdir -p $(dirname ${{MIX_INVOCATION_DIR}}/{dest})" .format (
32
+ ' mkdir -p " $(dirname ${{MIX_INVOCATION_DIR}}/{dest})"' .format (
33
33
dest = dest ,
34
34
),
35
- " cp {flags}{src} ${{MIX_INVOCATION_DIR}}/{dest}" .format (
35
+ ' cp {flags}" {src}" " ${{MIX_INVOCATION_DIR}}/{dest}"' .format (
36
36
flags = "-r " if src .is_directory else "" ,
37
37
src = src .path ,
38
38
dest = dest ,
49
49
ABS_ELIXIR_HOME=$PWD/{elixir_home}
50
50
fi
51
51
52
- ABS_OUT_PATH=$PWD/{out}
52
+ ABS_OUT_PATH=" $PWD/{out}"
53
53
54
54
export PATH="$ABS_ELIXIR_HOME"/bin:"{erlang_home}"/bin:${{PATH}}
55
55
@@ -60,11 +60,11 @@ MIX_INVOCATION_DIR="{mix_invocation_dir}"
60
60
61
61
{copy_srcs_commands}
62
62
63
- cd ${{MIX_INVOCATION_DIR}}
64
- export HOME=${{PWD}}
63
+ cd " ${{MIX_INVOCATION_DIR}}"
64
+ export HOME=" ${{PWD}}"
65
65
export MIX_ENV=prod
66
66
export ERL_COMPILER_OPTIONS=deterministic
67
- "${{ABS_ELIXIR_HOME}}"/bin/mix archive.build -o ${{ABS_OUT_PATH}}
67
+ "${{ABS_ELIXIR_HOME}}"/bin/mix archive.build -o " ${{ABS_OUT_PATH}}"
68
68
69
69
# remove symlinks from the _build directory since it
70
70
# is an unused output, and bazel does not allow them
Original file line number Diff line number Diff line change 1
- load ("@bazel_skylib//rules:select_file.bzl" , "select_file" )
2
1
load ("@rules_erlang//:dialyze.bzl" , "dialyze" , "plt" )
3
2
load (":rabbitmqctl.bzl" , "rabbitmqctl" )
4
3
load (":rabbitmqctl_check_formatted.bzl" , "rabbitmqctl_check_formatted_test" )
@@ -33,13 +32,6 @@ rabbitmqctl(
33
32
},
34
33
)
35
34
36
- select_file (
37
- name = "fetched_srcs" ,
38
- srcs = ":rabbitmqctl" ,
39
- subpath = "deps.tar" ,
40
- visibility = ["//visibility:public" ],
41
- )
42
-
43
35
rabbitmq_home (
44
36
name = "broker-for-cli-tests-home" ,
45
37
testonly = True ,
Original file line number Diff line number Diff line change
1
+ load ("@bazel_skylib//lib:shell.bzl" , "shell" )
1
2
load (
2
3
"@rules_erlang//:erlang_app_info.bzl" ,
3
4
"ErlangAppInfo" ,
@@ -148,7 +149,7 @@ find . -type l -delete
148
149
escript_path = escript .path ,
149
150
ebin_dir = ebin .path ,
150
151
consolidated_dir = consolidated .path ,
151
- archives = "" .join ([a .path for a in ctx .files .archives ]),
152
+ archives = "" .join ([shell . quote ( a .path ) for a in ctx .files .archives ]),
152
153
precompiled_deps = " " .join ([
153
154
dep [ErlangAppInfo ].app_name
154
155
for dep in ctx .attr .deps
Original file line number Diff line number Diff line change
1
+ load ("@bazel_skylib//lib:shell.bzl" , "shell" )
1
2
load (
2
3
"@rules_erlang//:erlang_app_info.bzl" ,
3
4
"ErlangAppInfo" ,
@@ -138,7 +139,7 @@ set -x
138
139
elixir_home = elixir_home ,
139
140
package_dir = package_dir ,
140
141
deps_dir = deps_dir ,
141
- archives = "" .join ([a .short_path for a in ctx .files .archives ]),
142
+ archives = "" .join ([shell . quote ( a .short_path ) for a in ctx .files .archives ]),
142
143
precompiled_deps = precompiled_deps ,
143
144
rabbitmq_run_cmd = ctx .attr .rabbitmq_run [DefaultInfo ].files_to_run .executable .short_path ,
144
145
)
@@ -195,7 +196,7 @@ exit /b 1
195
196
elixir_home = windows_path (elixir_home ),
196
197
package_dir = windows_path (ctx .label .package ),
197
198
deps_dir = deps_dir ,
198
- archives = "" .join ([a .short_path for a in ctx .files .archives ]),
199
+ archives = "" .join ([shell . quote ( a .short_path ) for a in ctx .files .archives ]),
199
200
precompiled_deps = precompiled_deps ,
200
201
rabbitmq_run_cmd = ctx .attr .rabbitmq_run [DefaultInfo ].files_to_run .executable .short_path ,
201
202
)
Original file line number Diff line number Diff line change @@ -344,13 +344,23 @@ def source_archive(
344
344
prefix = "deps/csv" ,
345
345
)
346
346
347
+ pkg_files (
348
+ name = "parallel_stream-files" ,
349
+ srcs = [
350
+ "@parallel_stream//:sources" ,
351
+ ],
352
+ strip_prefix = "" ,
353
+ prefix = "deps/parallel_stream" ,
354
+ )
355
+
347
356
pkg_tar (
348
357
name = name ,
349
358
extension = "tar.xz" ,
350
359
srcs = [
351
360
":deps-files" ,
352
361
":json-files" ,
353
362
":csv-files" ,
363
+ ":parallel_stream-files" ,
354
364
Label ("@rabbitmq-server//:root-licenses" ),
355
365
],
356
366
visibility = ["//visibility:public" ],
You can’t perform that action at this time.
0 commit comments