Skip to content

Conversation

@zachwaffle4
Copy link

i think i caught everything but i may not have

Signed-off-by: Zach Harel <[email protected]>
@zachwaffle4 zachwaffle4 requested review from a team and PeterJohnson as code owners November 16, 2025 23:28
@github-actions github-actions bot added component: ntcore NetworkTables library component: cscore CameraServer library component: wpiutil WPI utility library component: wpilibc WPILib C++ component: hal Hardware Abstraction Layer component: command-based WPILib Command Based Library component: wpimath Math library component: glass Glass app and backend component: wpinet WPI networking library component: apriltag AprilTag library 2027 2027 target labels Nov 16, 2025
@zachwaffle4
Copy link
Author

@AustinSchuh requesting your input :)

hdrs = glob([
"include/**/*.h",
"include/**/*.hpp",
], allow_empty = True),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we allowing empty glob expansions here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also shows up in cscore/BUILD.bazel and shared/bazel/rules/cc_rules.bzl.

Comment on lines +94 to +95
["src/main/native/cpp/**/*.cpp",
"src/main/native/cpp/**/*.hpp"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this formatted?

"src/**/*.cc",
"src/**/*.cpp",
"src/**/*.h",
"src/**/*.hpp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There don't seem to be any files in thirdparty/googletest/src that end with .hpp.

], allow_empty = True),
hdrs = glob([
"include/**/*.h",
"include/**/*.hpp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There don't seem to be any files in thirdparty/googletest/include that end with .hpp.

name = "wpinet",
srcs = glob(
["src/main/native/cpp/**"],
["src/main/native/cpp/**/*.cpp"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing the following files:

wpinet/src/main/native/cpp/WebSocketSerializer.hpp
wpinet/src/main/native/cpp/WebSocketDebug.hpp
wpinet/src/main/native/cpp/MulticastHandleManager.hpp

"src/main/native/cpp/**",
"src/generated/main/native/cpp/**",
"src/main/native/cpp/**/*.cpp",
"src/generated/main/native/cpp/**/*.cpp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a problem that this doesn't include hal/src/generated/main/native/cpp/mrc/protobuf/MrcComm.npb.h?

@AustinSchuh
Copy link
Contributor

Apart from the other feedback in here, I think we should create 2 macros inside //shared/bazel/rules:cc_rules.bzl which are essentially "glob_headers" and "glob_sources" and have those handle the extensions. That'll make it more uniform between different folders.

@auscompgeek
Copy link
Member

I'm not really sure hiding away the globs in a macro makes sense. Many of the packages have different globs by necessity, and hiding the glob behind an abstraction makes it more difficult to find the rule a source file corresponds to (especially for static analysis tools).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2027 2027 target component: apriltag AprilTag library component: command-based WPILib Command Based Library component: cscore CameraServer library component: glass Glass app and backend component: hal Hardware Abstraction Layer component: ntcore NetworkTables library component: wpilibc WPILib C++ component: wpimath Math library component: wpinet WPI networking library component: wpiutil WPI utility library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants