Skip to content
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

Unbreak manual rustfmt invocations via Bazel #617

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ignore = ["nativelink-proto/genproto/lib.rs"]
max_width = 120
reorder_imports = true
imports_granularity = "Module"
Expand Down
5 changes: 2 additions & 3 deletions nativelink-proto/gen_lib_rs_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


def print_package_part_to_mod(tree, indents = 0):
tabs = " " * indents
tabs = " " * indents
if tree["filename"] is not None:
print('%sinclude!("%s");' % (tabs, tree["filename"]))

Expand All @@ -59,7 +59,7 @@ def main():
help='pb.rs files used to generate lib.rs')
args = parser.parse_args()
print(_HEADER)
print("")

tree_root = { "children": {}, "filename": None }
for filepath in args.files:
filepath = os.path.relpath(os.path.normpath(filepath), args.rootdir)
Expand All @@ -76,7 +76,6 @@ def main():
cur_node["filename"] = '.'.join(package_parts) + '.pb.rs'

print_package_part_to_mod(tree_root)
print("")


if __name__ == "__main__":
Expand Down
60 changes: 29 additions & 31 deletions nativelink-proto/genproto/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,42 @@
// This file is auto-generated. To update it, run:
// `bazel run proto:update_protos`


pub mod build {
pub mod bazel {
pub mod remote {
pub mod execution {
pub mod v2 {
include!("build.bazel.remote.execution.v2.pb.rs");
pub mod bazel {
pub mod remote {
pub mod execution {
pub mod v2 {
include!("build.bazel.remote.execution.v2.pb.rs");
}
}
}
pub mod semver {
include!("build.bazel.semver.pb.rs");
}
}
}
pub mod semver {
include!("build.bazel.semver.pb.rs");
}
}
}
pub mod com {
pub mod github {
pub mod trace_machina {
pub mod nativelink {
pub mod remote_execution {
include!("com.github.trace_machina.nativelink.remote_execution.pb.rs");
pub mod github {
pub mod trace_machina {
pub mod nativelink {
pub mod remote_execution {
include!("com.github.trace_machina.nativelink.remote_execution.pb.rs");
}
}
}
}
}
}
}
pub mod google {
pub mod api {
include!("google.api.pb.rs");
}
pub mod bytestream {
include!("google.bytestream.pb.rs");
}
pub mod longrunning {
include!("google.longrunning.pb.rs");
}
pub mod rpc {
include!("google.rpc.pb.rs");
}
pub mod api {
include!("google.api.pb.rs");
}
pub mod bytestream {
include!("google.bytestream.pb.rs");
}
pub mod longrunning {
include!("google.longrunning.pb.rs");
}
pub mod rpc {
include!("google.rpc.pb.rs");
}
}