Skip to content

Commit c7d5d3d

Browse files
committed
fix: path for plugins on validation
1 parent 9d2ab60 commit c7d5d3d

File tree

6 files changed

+45
-42
lines changed

6 files changed

+45
-42
lines changed

.bazelrc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ build --@boost.dll//:use_std_fs
44
query --@boost.dll//:use_std_fs
55
build --@boost.process//:use_std_fs
66
query --@boost.process//:use_std_fs
7-
build --//:use_sdk_version
8-
query --//:use_sdk_version
97

108
build:windows --workspace_status_command=bazel/tools/wsc.cmd
119
build:linux --workspace_status_command=bazel/tools/wsc.sh

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ bazel_dep(name = "nlohmann_json", version = "3.11.3")
99
bazel_dep(name = "platforms", version = "0.0.10")
1010
bazel_dep(name = "rules_pkg", version = "0.10.1")
1111
bazel_dep(name = "bazel_skylib", version = "1.6.1")
12-
bazel_dep(name = "ecsact_runtime", version = "0.6.6")
12+
bazel_dep(name = "ecsact_runtime", version = "0.6.8")
1313
bazel_dep(name = "ecsact_interpret", version = "0.6.4")
1414
bazel_dep(name = "ecsact_codegen", version = "0.3.0")
1515
bazel_dep(name = "boost.dll", version = "1.83.0.bzl.2")

ecsact/cli/BUILD.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ package(default_visibility = ["//:__subpackages__"])
66

77
cc_library(
88
name = "report_message",
9-
copts = copts,
109
hdrs = ["report_message.hh"],
10+
copts = copts,
1111
)
1212

1313
cc_library(
1414
name = "report",
15-
copts = copts,
16-
hdrs = ["report.hh"],
1715
srcs = ["report.cc"],
16+
hdrs = ["report.hh"],
17+
copts = copts,
1818
deps = [
1919
":report_message",
2020
],
@@ -27,17 +27,17 @@ cc_stamp_header(
2727

2828
cc_binary(
2929
name = "ecsact",
30-
visibility = ["//visibility:public"],
3130
srcs = [
32-
"ecsact_cli.cc",
3331
"bazel_stamp_header.hh",
32+
"ecsact_cli.cc",
3433
],
34+
copts = copts,
3535
defines = select({
3636
"//:use_sdk_version_enabled": ["ECSACT_CLI_USE_SDK_VERSION"],
3737
"//:use_sdk_version_disabled": [],
3838
}),
39-
copts = copts,
4039
stamp = 1,
40+
visibility = ["//visibility:public"],
4141
deps = [
4242
# "//ecsact/cli/commands:benchmark",
4343
"//ecsact/cli/commands:codegen",

ecsact/cli/commands/build.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ auto ecsact::cli::detail::build_command( //
188188
}
189189

190190
for(auto plugin : result->plugins) {
191-
auto validate_result = ecsact::codegen::plugin_validate(plugin);
191+
auto recipe_plugin_path = recipe_path.parent_path() / plugin;
192+
auto validate_result =
193+
ecsact::codegen::plugin_validate(recipe_plugin_path);
192194
if(!validate_result.ok()) {
193195
auto err_msg = "Plugin validation failed for '" + plugin + "'\n";
194196
for(auto err : validate_result.errors) {

ecsact/cli/commands/build/recipe/BUILD.bazel

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,53 @@ package(default_visibility = ["//:__subpackages__"])
55

66
cc_library(
77
name = "taste",
8-
copts = copts,
98
srcs = ["taste.cc"],
109
hdrs = ["taste.hh"],
10+
copts = copts,
1111
deps = [
1212
"//ecsact/cli:report",
1313
"//ecsact/cli/commands/build:build_recipe",
14-
"@ecsact_runtime//:dylib",
1514
"@boost.dll",
15+
"@ecsact_runtime//:dylib",
1616
],
1717
)
1818

1919
cc_library(
2020
name = "integrity",
21-
copts = copts,
2221
srcs = ["integrity.cc"],
2322
hdrs = ["integrity.hh"],
23+
copts = copts,
2424
deps = [
2525
"@boringssl//:crypto",
2626
],
2727
)
2828

2929
cc_library(
3030
name = "cook",
31-
copts = copts,
3231
srcs = ["cook.cc"],
3332
hdrs = ["cook.hh"],
33+
copts = copts,
34+
data = select({
35+
"//:use_sdk_version_enabled": [
36+
],
37+
"//:use_sdk_version_disabled": [
38+
"@ecsact_runtime//:ecsact/lib.hh",
39+
"@ecsact_runtime//:ecsact/runtime.h",
40+
"@ecsact_runtime//:ecsact/runtime/async.h",
41+
"@ecsact_runtime//:ecsact/runtime/async.hh",
42+
"@ecsact_runtime//:ecsact/runtime/common.h",
43+
"@ecsact_runtime//:ecsact/runtime/core.h",
44+
"@ecsact_runtime//:ecsact/runtime/core.hh",
45+
"@ecsact_runtime//:ecsact/runtime/definitions.h",
46+
"@ecsact_runtime//:ecsact/runtime/dylib.h",
47+
"@ecsact_runtime//:ecsact/runtime/dynamic.h",
48+
"@ecsact_runtime//:ecsact/runtime/meta.h",
49+
"@ecsact_runtime//:ecsact/runtime/meta.hh",
50+
"@ecsact_runtime//:ecsact/runtime/serialize.h",
51+
"@ecsact_runtime//:ecsact/runtime/serialize.hh",
52+
"@ecsact_runtime//:ecsact/runtime/static.h",
53+
],
54+
}),
3455
defines = select({
3556
"//:use_sdk_version_enabled": ["ECSACT_CLI_USE_SDK_VERSION"],
3657
"//:use_sdk_version_disabled": [],
@@ -44,45 +65,24 @@ cc_library(
4465
deps = [
4566
":integrity",
4667
"//ecsact/cli:report",
47-
"//ecsact/cli/detail:argv0",
48-
"//ecsact/cli/detail:download",
49-
"//ecsact/cli/detail:glob",
50-
"//ecsact/cli/detail:archive",
5168
"//ecsact/cli/commands/build:build_recipe",
5269
"//ecsact/cli/commands/build:cc_compiler_config",
5370
"//ecsact/cli/commands/build:cc_defines_gen",
5471
"//ecsact/cli/commands/build:get_modules",
55-
"//ecsact/cli/commands/codegen:codegen",
72+
"//ecsact/cli/commands/codegen",
5673
"//ecsact/cli/commands/codegen:codegen_util",
74+
"//ecsact/cli/detail:archive",
75+
"//ecsact/cli/detail:argv0",
76+
"//ecsact/cli/detail:download",
77+
"//ecsact/cli/detail:glob",
5778
"//ecsact/cli/detail:proc_exec",
58-
"@curl",
5979
"@boost.url",
80+
"@curl",
6081
"@magic_enum",
6182
] + select({
6283
"//:use_sdk_version_enabled": [],
6384
"//:use_sdk_version_disabled": [
6485
"@bazel_tools//tools/cpp/runfiles",
6586
],
6687
}),
67-
data = select({
68-
"//:use_sdk_version_enabled": [
69-
],
70-
"//:use_sdk_version_disabled": [
71-
"@ecsact_runtime//:ecsact/lib.hh",
72-
"@ecsact_runtime//:ecsact/runtime.h",
73-
"@ecsact_runtime//:ecsact/runtime/async.h",
74-
"@ecsact_runtime//:ecsact/runtime/async.hh",
75-
"@ecsact_runtime//:ecsact/runtime/common.h",
76-
"@ecsact_runtime//:ecsact/runtime/core.h",
77-
"@ecsact_runtime//:ecsact/runtime/core.hh",
78-
"@ecsact_runtime//:ecsact/runtime/definitions.h",
79-
"@ecsact_runtime//:ecsact/runtime/dylib.h",
80-
"@ecsact_runtime//:ecsact/runtime/dynamic.h",
81-
"@ecsact_runtime//:ecsact/runtime/meta.h",
82-
"@ecsact_runtime//:ecsact/runtime/meta.hh",
83-
"@ecsact_runtime//:ecsact/runtime/serialize.h",
84-
"@ecsact_runtime//:ecsact/runtime/serialize.hh",
85-
"@ecsact_runtime//:ecsact/runtime/static.h",
86-
],
87-
}),
8888
)

ecsact/cli/commands/recipe-bundle.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ auto ecsact::cli::detail::recipe_bundle_command( //
110110
}
111111

112112
for(auto plugin : result->plugins) {
113-
auto validate_result = ecsact::codegen::plugin_validate(plugin);
113+
auto recipe_plugin_path =
114+
fs::path(recipe_path).parent_path() / plugin;
115+
auto validate_result =
116+
ecsact::codegen::plugin_validate(recipe_plugin_path);
114117
if(!validate_result.ok()) {
115118
auto err_msg = "Plugin validation failed for '" + plugin + "'\n";
116119
for(auto err : validate_result.errors) {

0 commit comments

Comments
 (0)