SERVER-108412 add auto header build file generation (#43122)

GitOrigin-RevId: 237d2c30f1d527449e5c00a191eb8f9c9d710281
This commit is contained in:
Daniel Moody 2025-11-18 16:26:08 -06:00 committed by MongoDB Bot
parent b10e0f9771
commit 4685961f5a
203 changed files with 2348 additions and 7909 deletions

1
.gitattributes vendored
View File

@ -2,6 +2,7 @@
*.pbxproj -crlf -diff -merge
*.sh text eol=lf
**/third_party/**/* rules-lint-ignored=true
**/.auto_header/BUILD.bazel rules-lint-ignored=true
**/third_party/**/BUILD.bazel rules-lint-ignored=false
**/.auto_header/**/* rules-lint-ignored=true
external rules-lint-ignored=true

View File

@ -0,0 +1,9 @@
load("@poetry//:dependencies.bzl", "dependency")
package(default_visibility = ["//visibility:public"])
exports_files(
glob([
"*.h",
]),
)

View File

@ -0,0 +1 @@
// Autogen: keeps filegroup non-empty

View File

@ -0,0 +1,281 @@
def _sanitize_label(s):
# Mirror Python: allow [A-Za-z0-9_]; replace others with '_';
# and if first char is a digit, prefix an underscore.
out = []
for i in range(len(s)):
ch = s[i:i + 1]
# isalnum() isn't available in Starlark; check ranges
is_upper = "A" <= ch and ch <= "Z"
is_lower = "a" <= ch and ch <= "z"
is_digit = "0" <= ch and ch <= "9"
if is_upper or is_lower or is_digit or ch == "_":
if i == 0 and is_digit:
out.append("_")
out.append(ch)
else:
out.append("_")
return "".join(out) if out else "_"
def dedupe_stable(xs):
seen = {}
out = []
for x in xs:
if x not in seen:
seen[x] = True
out.append(x)
return out
def _fg_name_for_filename(name):
# NEW: collapse to leaf to match Python generator
leaf = name.rsplit("/", 1)[-1]
if leaf.endswith("_gen"):
return leaf
i = leaf.rfind(".")
if i == -1:
return leaf
base = leaf[:i]
ext = leaf[i + 1:].replace(".", "_")
return base + ("_" + ext if ext else "")
def _split_label_or_file(src):
if type(src) != "string":
fail("src must be string, got: {}".format(type(src)))
if src.startswith("@"):
dslash = src.find("//")
if dslash < 0:
fail("Invalid label (missing //): {}".format(src))
rest = src[dslash + 2:]
colon = rest.rfind(":")
if colon < 0:
fail("Invalid label (missing :): {}".format(src))
return rest[:colon], rest[colon + 1:]
if src.startswith("//"):
no_slash = src[2:]
colon = no_slash.rfind(":")
if colon < 0:
pkg = no_slash
name = pkg.rsplit("/", 1)[-1]
return pkg, name
return no_slash[:colon], no_slash[colon + 1:]
if src.startswith(":"):
return native.package_name(), src[1:]
return native.package_name(), src
def _auto_header_label(pkg, name):
name = name.lstrip(":")
return "//{}/.auto_header:{}".format(pkg, _sanitize_label(_fg_name_for_filename(name)))
def _is_third_party_pkg(pkg):
# Bazel package path, no leading slashes, e.g. "src/third_party/node"
return (
pkg == "src/third_party" or
pkg.startswith("src/third_party/") or
pkg.startswith("third_party/") or
"third_party/" in pkg # safety
)
def maybe_compute_auto_headers(srcs):
# Only handle plain list-of-strings; if configurable/mixed, return None
if type(srcs) != "list":
return None
out = []
for s in srcs:
if type(s) != "string":
return None # select()/mixed — let caller fall back
# Already an auto-header label? keep as-is.
if "/.auto_header:" in s:
out.append(s)
continue
pkg, name = _split_label_or_file(s)
if _is_third_party_pkg(pkg):
continue
# Skip external repos and any third_party package entirely
if s.startswith("@"):
continue
# If *_gen listed in srcs, add its auto-header (transitive headers),
# but do NOT add another ':name' here.
if name.endswith("_gen"):
out.append(_auto_header_label(pkg, name)) # //pkg/.auto_header:foo_gen
continue
# Regular mapping for files we care about
if (name.endswith(".c") or name.endswith(".cc") or name.endswith(".cpp") or name.endswith(".cxx") or
name.endswith(".h") or name.endswith(".hh") or name.endswith(".hpp") or name.endswith(".hxx")):
out.append(_auto_header_label(pkg, name))
continue
# else: ignore
return dedupe_stable(out)
def _all_headers_label_for_pkg(pkg):
if pkg.startswith("src/mongo/db/modules/enterprise"):
return ["//src/mongo/db/modules/enterprise/.auto_header:all_headers"]
elif pkg.startswith("src/mongo/db/modules/atlas"):
return ["//src/mongo/db/modules/atlas/.auto_header:all_headers"]
else:
return ["//bazel/auto_header/.auto_header:all_headers"]
def maybe_all_headers(name, hdrs, srcs, private_hdrs):
pkg = native.package_name()
if _is_third_party_pkg(pkg) or not pkg.startswith("src/mongo"):
return hdrs, srcs + private_hdrs
if not (pkg.startswith("src/mongo") or "third_party" in pkg):
return hdrs, srcs + private_hdrs
# 1) Wrap user-provided (possibly configurable) hdrs into a helper filegroup.
# This isolates any select(...) inside the filegroup's srcs where it's legal.
hdr_wrap = name + "_hdrs_wrap"
native.filegroup(
name = hdr_wrap,
srcs = hdrs, # hdrs may already have select(...) — that's fine here
visibility = ["//visibility:private"],
)
# 2) Always-on config header (added outside the select to avoid duplication)
mongo_cfg_hdr = ["//src/mongo:mongo_config_header"]
# 3) Select between the per-package all_headers filegroup and the wrapped hdrs.
# IMPORTANT: both branches are *plain label lists* -> no nested selects.
final_hdrs = (
mongo_cfg_hdr +
select({
"//bazel/config:all_headers_enabled": _all_headers_label_for_pkg(pkg),
"//conditions:default": [":" + hdr_wrap],
})
)
# 4) For srcs: include private_hdrs only when NOT all_headers.
# Again, wrap the potentially-configurable list in a filegroup.
if private_hdrs:
priv_wrap = name + "_private_hdrs_wrap"
native.filegroup(
name = priv_wrap,
srcs = private_hdrs,
visibility = ["//visibility:private"],
)
extra_srcs = select({
"//bazel/config:all_headers_enabled": [],
"//conditions:default": [":" + priv_wrap],
})
else:
extra_srcs = []
final_srcs = srcs + extra_srcs
return final_hdrs, final_srcs
def binary_srcs_with_all_headers(name, srcs, private_hdrs):
pkg = native.package_name()
if _is_third_party_pkg(pkg) or not pkg.startswith("src/mongo"):
return srcs + private_hdrs
if not (pkg.startswith("src/mongo") or "third_party" in pkg):
return srcs + private_hdrs
# Always include the config header via srcs
mongo_cfg_hdr = ["//src/mongo:mongo_config_header"]
# Wrap private_hdrs so any select(...) inside is contained.
if private_hdrs:
priv_wrap = name + "_private_hdrs_wrap"
native.filegroup(
name = priv_wrap,
srcs = private_hdrs,
visibility = ["//visibility:private"],
)
maybe_priv = select({
"//bazel/config:all_headers_enabled": [],
"//conditions:default": [":" + priv_wrap],
})
else:
maybe_priv = []
# Add the per-package all_headers only when all_headers mode is on.
# Both branches are plain lists → no nested selects.
all_hdrs_branch = select({
"//bazel/config:all_headers_enabled": _all_headers_label_for_pkg(pkg),
"//conditions:default": [],
})
return srcs + mongo_cfg_hdr + maybe_priv + all_hdrs_branch
def concat_selects(base_list, select_objs):
out = base_list or []
for sel in (select_objs or []):
out = out + sel
return out
def strings_only(xs):
out = []
for x in (xs or []):
if type(x) == "string":
out.append(x)
return out
def dedupe_preserve_order(items):
seen = {}
out = []
for x in (items or []):
k = x if type(x) == "string" else str(x)
if k not in seen:
seen[k] = True
out.append(x)
return out
def filter_srcs_by_auto_headers(strings_srcs, ah_labels):
"""Return strings_srcs minus any file that has a corresponding label in ah_labels.
strings_srcs: list of strings (no selects)
ah_labels: list of auto-header labels, e.g. //pkg/.auto_header:foo_cpp
"""
if not strings_srcs:
return []
# Fast lookup for auto-header labels
has_ah = {}
for l in (ah_labels or []):
has_ah[l] = True
out = []
for s in strings_srcs:
if type(s) != "string":
continue # safety
pkg, name = _split_label_or_file(s)
# Compute the precise auto-header label we would have made for this path
ah_label = _auto_header_label(pkg, name)
if has_ah.get(ah_label, False):
# An auto-header for this file is present -> drop the raw file to avoid duplicates
continue
out.append(s)
return out
def build_selects_and_flat_files(srcs_select, *, lib_name, debug = False):
if not srcs_select:
return [], []
select_objs = []
flat_files = []
for i, condmap in enumerate(srcs_select):
if type(condmap) != type({}):
fail("mongo_cc macro({}): srcs_select[{}] must be a dict of {cond: [srcs]}."
.format(lib_name, i))
if debug:
print("mongo_cc macro({}): srcs_select[{}] has {} conditions"
.format(lib_name, i, len(condmap)))
for cond, src_list in condmap.items():
if type(src_list) != type([]):
fail("mongo_cc macro({}): srcs_select[{}][{}] must be a list of strings"
.format(lib_name, i, cond))
for s in src_list:
if type(s) != "string":
fail("mongo_cc macro({}): srcs_select[{}][{}] item must be string, got {}"
.format(lib_name, i, cond, type(s)))
flat_files.extend(src_list)
select_objs.append(select(condmap))
return select_objs, dedupe_preserve_order(flat_files)

View File

@ -0,0 +1,849 @@
import subprocess
import hashlib
import os
import threading
import time
import json
from collections import defaultdict
from functools import lru_cache
from pathlib import Path
from typing import Dict, List, Set, Tuple
from io import StringIO
SRC_ROOT = Path("src")
AUTO_DIR = ".auto_header"
BUILD_NAME = "BUILD.bazel"
SRC_EXTS_TUPLE = (
".cpp",
".cc",
".cxx",
".c",
".h",
".hpp",
".hh",
".hxx",
".idl",
".idl.tpl",
".inl",
)
HDR_EXTS_TUPLE = (".h", ".hh", ".hpp", ".hxx", ".inl")
LEFT_PSEUDO_SUFFIX = "_gen"
# Anything produced by protoc/grpc should be provided by proto/grpc rules, not auto_header
PROTO_GEN_SUFFIXES = (".grpc.pb.h", ".pb.h") # order matters only for readability
SRC_ROOT_POSIX = SRC_ROOT.as_posix()
AUTO_HEADER_PREFIX = f"//{SRC_ROOT_POSIX}/"
VERSION_SALT = "autoheader-v6" # bump to force regen
MANIFEST_PATH = SRC_ROOT / AUTO_DIR / "last_run.json"
# -------- single-pass file lister (cache) --------
_FILE_LIST_CACHE: list[str] | None = None
# Exact-path remaps for generated, non-IDL headers.
# Key: repo-relative include path as seen on the right side (normalized with /).
# Val: absolute Bazel label of the generator target to depend on.
GEN_HEADER_REMAP = {
"mongo/config.h": f"//{SRC_ROOT_POSIX}/mongo:mongo_config_header",
}
EXCLUDE_HEADERS = {
"mongo/platform/windows_basic.h", # forced via command line; dont depend on it
"mongo/scripting/mozjs/freeOpToJSContext.h", # wierd mongo include that lives in 3rd party
}
# Generated *_cpp (or *_gen) left files that we want to emit regardless of rg.
# Key: left path under repo (e.g. "mongo/util/version_impl.cpp" or "mongo/foo/bar_gen")
# Val: list of right includes under repo ("mongo/...") which will be mapped with _label_for_right()
GEN_LEFT_CPP: dict[str, list[str]] = {
"mongo/shell/mongo-server.cpp": [
"mongo/base/string_data.h",
"mongo/scripting/engine.h",
],
"mongo/shell/mongojs.cpp": [
"mongo/base/string_data.h",
"mongo/scripting/engine.h",
],
"mongo/scripting/mozjs/mongohelpers_js.cpp": [
"mongo/base/string_data.h",
"mongo/scripting/engine.h",
],
"mongo/db/fts/stop_words_list.cpp": [
"mongo/db/fts/stop_words_list.h",
],
"mongo/db/fts/unicode/codepoints_casefold.cpp": [
"mongo/db/fts/unicode/codepoints.h",
],
"mongo/db/fts/unicode/codepoints_delimiter_list.cpp": [
"mongo/db/fts/unicode/codepoints.h",
],
"mongo/db/fts/unicode/codepoints_diacritic_list.cpp": [
"mongo/db/fts/unicode/codepoints.h",
],
}
# Headers every IDL uses (as repo-relative include paths, e.g. "mongo/.../x.h").
IDL_HEADERS_RIGHTS = [
"mongo/base/string_data.h",
"mongo/base/data_range.h",
"mongo/bson/bsonobj.h",
"mongo/bson/bsonobjbuilder.h",
"mongo/bson/simple_bsonobj_comparator.h",
"mongo/idl/idl_parser.h",
"mongo/rpc/op_msg.h",
"mongo/db/auth/validated_tenancy_scope_factory.h",
"mongo/stdx/unordered_map.h",
"mongo/util/decimal_counter.h",
"mongo/util/serialization_context.h",
"mongo/util/options_parser/option_description.h",
"mongo/util/options_parser/option_section.h",
"mongo/util/options_parser/environment.h",
"mongo/db/feature_flag.h",
"mongo/db/feature_flag_server_parameter.h",
"mongo/db/feature_compatibility_version_parser.h",
"mongo/db/server_parameter.h",
"mongo/db/server_parameter_with_storage.h",
"mongo/db/commands.h",
"mongo/db/query/query_shape/serialization_options.h",
"mongo/util/overloaded_visitor.h",
"mongo/util/string_map.h",
"mongo/db/auth/authorization_contract.h",
"mongo/idl/command_generic_argument.h",
"mongo/util/options_parser/startup_option_init.h",
"mongo/util/options_parser/startup_options.h",
]
def _norm_repo(p: str) -> str:
return p.replace("\\", "/").lstrip("./")
def _is_proto_generated_header(r: str) -> bool:
return r.endswith(PROTO_GEN_SUFFIXES)
def _is_excluded_right(r: str) -> bool:
if r in EXCLUDE_HEADERS:
return True
return _is_proto_generated_header(r)
def _files_identical(path: Path, data: bytes, chunk_size: int = 1 << 20) -> bool:
try:
st = path.stat()
except FileNotFoundError:
return False
if st.st_size != len(data):
return False
mv = memoryview(data)
with path.open("rb", buffering=0) as f:
off = 0
while off < len(data):
n = min(chunk_size, len(data) - off)
if f.read(n) != mv[off : off + n]:
return False
off += n
return True
def _idl_gen_header_file_label(repo_rel_idl: str) -> str:
if repo_rel_idl.endswith(".idl.tpl"):
base = repo_rel_idl[: -len(".idl.tpl")]
elif repo_rel_idl.endswith(".idl"):
base = repo_rel_idl[: -len(".idl")]
else:
base = repo_rel_idl
d, f = base.rsplit("/", 1)
return f"//{SRC_ROOT_POSIX}/{d}:{f}_gen.h"
def _atomic_write_if_changed(path: Path, text: str, *, fsync_write: bool) -> bool:
data = text.encode("utf-8")
path.parent.mkdir(parents=True, exist_ok=True)
if _files_identical(path, data):
return False
tmp = path.with_suffix(path.suffix + ".tmp")
with tmp.open("wb", buffering=0) as f:
f.write(data)
if fsync_write:
f.flush()
os.fsync(f.fileno())
os.replace(tmp, path)
return True
@lru_cache(maxsize=2**20)
def _sanitize_label(s: str) -> str:
out = []
for i, ch in enumerate(s):
if ch.isalnum() or ch == "_":
if i == 0 and ch.isdigit():
out.append("_")
out.append(ch)
else:
out.append("_")
return "".join(out) or "_"
@lru_cache(maxsize=2**15) # 32k entries
def _is_third_party_path(p: str) -> bool:
p = p.replace("\\", "/")
# match any path segment "third_party" (not just a substring)
return (
"/third_party/" in p
or p.startswith("third_party/")
or p.endswith("/third_party")
or "/src/third_party/" in p
or p.startswith("src/third_party/")
)
def _build_left_rights_map(grouped: Dict[str, Dict[str, Set[str]]]) -> Dict[str, Set[str]]:
out: Dict[str, Set[str]] = {}
for d, files in grouped.items():
for f, rights in files.items():
out[f"{d}/{f}"] = set(r for r in rights if r.startswith("mongo/"))
return out
@lru_cache(maxsize=2**15)
def _is_header_include_path(p: str) -> bool:
return p.endswith(HDR_EXTS_TUPLE)
@lru_cache(maxsize=2**15)
def _repo_to_file_label(repo_rel: str) -> str:
d, f = repo_rel.rsplit("/", 1)
return f"//{SRC_ROOT_POSIX}/{d}:{f}"
def _dfs_flatten_from_seed(
seed_repo_path: str, lr_map: Dict[str, Set[str]], visited: Set[str], out_labels: Set[str]
) -> None:
srp = seed_repo_path.replace("\\", "/")
if _is_third_party_path(srp) or _is_excluded_right(srp):
return
if srp in visited:
return
visited.add(srp)
# Add terminal label(s)
if _is_header_include_path(srp) or srp.endswith("_gen.h"):
out_labels.add(_repo_to_file_label(srp))
if srp.endswith(".idl") or srp.endswith(".idl.tpl"):
# include the generated header for this IDL
out_labels.add(_idl_gen_header_file_label(srp))
# if we hit a *_gen.h, also walk the owning IDLs imports
if srp.endswith("_gen.h"):
idl_owner = _guess_idl_from_gen_header(srp, lr_map)
if idl_owner:
_dfs_flatten_from_seed(idl_owner, lr_map, visited, out_labels)
# Recurse through children (includes/imports) if known
for child in lr_map.get(srp, ()):
if _is_excluded_right(child):
continue
_dfs_flatten_from_seed(child, lr_map, visited, out_labels)
def _rg_all_files_once(rg_bin: str) -> list[str]:
"""One ripgrep call to list all relevant files under src/mongo/**."""
global _FILE_LIST_CACHE
if _FILE_LIST_CACHE is not None:
return _FILE_LIST_CACHE
# Combine all globs into one invocation.
globs = [
"mongo/**/*.idl",
"mongo/**/*.idl.tpl",
"mongo/**/*.{c,cc,cpp,cxx,h,hh,hpp,hxx,inl}",
]
cmd = [
rg_bin,
"--files",
"--no-config",
"-uu",
*[x for g in globs for x in ("-g", g)],
"mongo",
]
out = _run_cmd(cmd)
# Normalize & filter once.
files = []
for p in out:
rp = _norm_repo(p)
if not rp.startswith("mongo/"):
continue
if _is_third_party_path(rp):
continue
files.append(rp)
_FILE_LIST_CACHE = files
return files
def _load_manifest_dirs() -> set[str]:
try:
with MANIFEST_PATH.open("r", encoding="utf-8") as f:
obj = json.load(f)
if isinstance(obj, dict) and isinstance(obj.get("dirs"), list):
# ensure normalized 'mongo/...'
return {d for d in obj["dirs"] if isinstance(d, str)}
except FileNotFoundError:
pass
except Exception:
pass
return set()
def _store_manifest_dirs(dirs: set[str]) -> None:
MANIFEST_PATH.parent.mkdir(parents=True, exist_ok=True)
tmp = MANIFEST_PATH.with_suffix(".tmp")
with tmp.open("w", encoding="utf-8") as f:
json.dump({"dirs": sorted(dirs)}, f, separators=(",", ":"))
f.flush()
os.fsync(f.fileno())
os.replace(tmp, MANIFEST_PATH)
def _cleanup_from_manifest(prev_dirs: set[str], curr_dirs: set[str]) -> int:
"""Delete stale .auto_header/BUILD.bazel for dirs that disappeared."""
removed = 0
stale = prev_dirs - curr_dirs
# Fast path: string joins to avoid Path overhead in tight loop
root = SRC_ROOT.as_posix() # "src"
ah = AUTO_DIR # ".auto_header"
bn = BUILD_NAME # "BUILD.bazel"
for d in stale:
build_path = f"{root}/{d}/{ah}/{bn}"
try:
os.remove(build_path)
removed += 1
except FileNotFoundError:
pass
# best-effort: remove empty .auto_header dir
ah_dir = f"{root}/{d}/{ah}"
try:
if not any(os.scandir(ah_dir)):
os.rmdir(ah_dir)
except Exception:
pass
return removed
def _compute_flat_idl_from_lr_map(lr_map: Dict[str, Set[str]], seeds: List[str]) -> Set[str]:
out: Set[str] = set()
vis: Set[str] = set()
for seed in seeds:
_dfs_flatten_from_seed(seed, lr_map, vis, out)
return {lab for lab in out if "third_party" not in lab.split("/")}
def _inject_flat_group(grouped: Dict[str, Dict[str, Set[str]]], flat_labels: Set[str]) -> None:
# Store as a synthetic "left" whose rights are already absolute labels.
# We'll special-case its rendering to dump labels verbatim.
grouped.setdefault("mongo", {}).setdefault("idl_headers_flat", set()).update(flat_labels)
def augment_with_idl_placeholders(
grouped: dict[str, dict[str, set[str]]], idl_paths: list[str]
) -> None:
"""
Ensure each IDL gets a left-side entry (=> <idl_basename>_gen) even if it
had zero imports/includes. Adds: grouped[dir][file] = set() when missing.
"""
for p in idl_paths:
if _is_third_party_path(p):
continue
d, sep, f = p.rpartition("/")
if not sep:
continue
grouped.setdefault(d, {}).setdefault(f, set())
def augment_with_generated_left(
grouped: Dict[str, Dict[str, Set[str]]], gen_map: Dict[str, List[str]]
) -> None:
"""
For each generated left entry, ensure a filegroup exists and add the
configured rights. Skips third_party automatically.
"""
for left, rights in gen_map.items():
if not left.startswith("mongo/"):
continue
if "third_party/" in left or left.startswith("third_party/"):
continue
d, sep, f = left.rpartition("/")
if not sep:
continue
dst = grouped.setdefault(d, {}).setdefault(f, set())
for r in rights:
if r and r.startswith("mongo/"):
dst.add(r)
def augment_with_source_placeholders(
grouped: Dict[str, Dict[str, Set[str]]], src_paths: List[str]
) -> None:
"""Seed a filegroup for every left source/header even if it has 0 includes."""
for p in src_paths:
if _is_third_party_path(p):
continue
d, sep, f = p.rpartition("/")
if not sep:
continue
grouped.setdefault(d, {}).setdefault(f, set())
def _render_vis_list(v: list[str]) -> str:
return ", ".join(f'"{x}"' for x in v)
def list_all_idl_paths_py(rg_bin: str) -> list[str]:
files = _rg_all_files_once(rg_bin)
# Keep both .idl and .idl.tpl
return [f for f in files if f.endswith(".idl") or f.endswith(".idl.tpl")]
def list_all_left_sources_py(rg_bin: str) -> list[str]:
files = _rg_all_files_once(rg_bin)
exts = (".c", ".cc", ".cpp", ".cxx", ".h", ".hh", ".hpp", ".hxx", ".inl")
return [f for f in files if f.endswith(exts)]
@lru_cache(maxsize=2**15) # 32k entries
def module_visibility_for_build_dir(src_dir: str) -> list[str]:
parts = src_dir.replace("\\", "/").split("/")
# expect starts with "mongo"
if len(parts) >= 5 and parts[0] == "mongo" and parts[1] == "db" and parts[2] == "modules":
module_name = parts[3]
if module_name == "enterprise":
return [
"//src/mongo/db/modules/enterprise:__subpackages__",
"//src/mongo/db/modules/atlas:__subpackages__",
]
return [f"//src/mongo/db/modules/{module_name}:__subpackages__"]
return ["//visibility:public"]
@lru_cache(maxsize=2**15) # 32k entries
def _filegroup_name_for_left(left_file: str) -> str:
# .idl.tpl -> <base>_gen
fname = left_file.split("/")[-1]
if left_file.endswith(".idl.tpl"):
base = left_file[: -len(".idl.tpl")]
return _sanitize_label(base + "_gen")
if left_file.endswith(".tpl.cpp"):
base = left_file[: -len(".tpl.cpp")]
return _sanitize_label(base + "_cpp")
if left_file.endswith(".tpl.h"):
base = left_file[: -len(".tpl.h")]
return _sanitize_label(base + "_h")
# .idl -> <base>_gen
if left_file.endswith(".idl"):
base = left_file[: -len(".idl")]
return _sanitize_label(base + "_gen")
# *_gen stays as-is
if left_file.endswith(LEFT_PSEUDO_SUFFIX):
return _sanitize_label(left_file)
# keep extension-specific suffix (apple.hpp -> apple_hpp)
for ext in HDR_EXTS_TUPLE:
if fname.endswith(ext):
base = fname[: -len(ext)]
return _sanitize_label(base + "_" + ext[1:])
return _sanitize_label(left_file)
def _owning_labels_for_left(src_dir: str, left_file: str) -> list[str]:
"""
Labels that should be included in the filegroup for `left_file` itself:
- *.idl / *.idl.tpl -> //pkg:<base>_gen.h (own the generated header)
- *.tpl.h -> //pkg:<base>.h (own the rendered header)
- *.tpl.cpp -> //pkg:<base>.cpp (own the rendered source)
- plain headers -> //pkg:<left_file> (own the header)
- otherwise -> []
A manual override map can pin special cases to rules, if needed.
"""
pkg = f"//{SRC_ROOT_POSIX}/{src_dir}"
# IDL/IDL.TPL: include generated header
if left_file.endswith(".idl.tpl"):
base = left_file[: -len(".idl.tpl")]
return [f"{pkg}:{base}_gen.h"]
if left_file.endswith(".idl"):
base = left_file[: -len(".idl")]
return [f"{pkg}:{base}_gen.h"]
# Templates → output filename in same pkg
for tpl_ext, out_ext in {".tpl.h": ".h"}.items():
if left_file.endswith(tpl_ext):
phys = left_file[: -len(tpl_ext)] + out_ext
return [f"{pkg}:{phys}"]
# Plain headers own themselves
if any(left_file.endswith(ext) for ext in HDR_EXTS_TUPLE):
return [f"{pkg}:{left_file}"]
return []
@lru_cache(maxsize=2**15) # 32k entries
def _label_for_right(right_path: str) -> str:
if _is_excluded_right(right_path):
return ""
r_dir, _, fname = right_path.rpartition("/")
if _is_third_party_path(right_path):
return ""
remap = GEN_HEADER_REMAP.get(right_path)
if remap:
return remap
# *_gen.h → *_gen
if fname.endswith("_gen.h"):
base = fname[: -len(".h")]
return f"{AUTO_HEADER_PREFIX}{r_dir}/{AUTO_DIR}:{_sanitize_label(base)}"
# .idl.tpl / .idl → *_gen
if fname.endswith(".idl.tpl"):
base = fname[: -len(".idl.tpl")]
return f"{AUTO_HEADER_PREFIX}{r_dir}/{AUTO_DIR}:{_sanitize_label(base + '_gen')}"
if fname.endswith(".idl"):
base = fname[: -len(".idl")]
return f"{AUTO_HEADER_PREFIX}{r_dir}/{AUTO_DIR}:{_sanitize_label(base + '_gen')}"
# base + "_" + ext-without-dot (so .hpp → _hpp, .h → _h)
for ext in HDR_EXTS_TUPLE:
if fname.endswith(ext):
base = fname[: -len(ext)]
suf = "_" + ext[1:] # strip the leading dot
target = _sanitize_label(base + suf)
return f"{AUTO_HEADER_PREFIX}{r_dir}/{AUTO_DIR}:{target}"
# already *_gen token
if fname.endswith("_gen"):
return f"{AUTO_HEADER_PREFIX}{r_dir}/{AUTO_DIR}:{_sanitize_label(fname)}"
return ""
# ---------- Digest-based skip ----------
HEADER_TPL = """# DIGEST:{digest}
# AUTO-GENERATED. DO NOT EDIT.
# Package: //{pkg}
# Generated from ripgrep scan.
package(default_visibility = [{vis_list}])
"""
def _dir_digest(src_dir: str, files_map: Dict[str, Set[str]], *, visibility: str) -> str:
lines = []
lines.append(f"{VERSION_SALT}|{visibility}|{src_dir}\n")
for left in sorted(files_map):
rights = ",".join(sorted(files_map[left]))
lines.append(f"{left}:{rights}\n")
data = "".join(lines).encode()
return hashlib.sha1(data).hexdigest()[:16]
def _read_existing_digest(path: Path) -> str:
try:
with path.open("r", encoding="utf-8") as f:
for _ in range(5): # scan first few lines defensively
line = f.readline()
if not line:
break
if line.startswith("# DIGEST:"):
return line.split(":", 1)[1].strip()
except FileNotFoundError:
pass
return ""
def _build_content_for_dir(
src_dir: str, file_to_rights: Dict[str, Set[str]], *, visibility: list[str], digest: str
) -> str:
pkg = f"{SRC_ROOT_POSIX}/{src_dir}/{AUTO_DIR}"
buf = StringIO()
write = buf.write
write(HEADER_TPL.format(pkg=pkg, vis_list=_render_vis_list(visibility), digest=digest))
for left_file in sorted(file_to_rights.keys()):
is_flat = src_dir == "mongo" and left_file == "idl_headers_flat"
name = _filegroup_name_for_left(left_file)
this_lbl = f"//{SRC_ROOT_POSIX}/{src_dir}/{AUTO_DIR}:{name}"
emit_name = "idl_headers" if is_flat else name
write("filegroup(\n")
write(f' name = "{emit_name}",\n')
seen: Set[str] = set()
labels: List[str] = []
if not is_flat:
for own in _owning_labels_for_left(src_dir, left_file):
if own and own != this_lbl and own not in seen:
labels.append(own)
seen.add(own)
if left_file.endswith((".idl", ".idl.tpl")) or left_file.endswith("_gen"):
central = f"//{SRC_ROOT_POSIX}/mongo/{AUTO_DIR}:idl_headers"
if central != this_lbl and central not in seen:
labels.append(central)
seen.add(central)
map_right = (lambda r: r) if is_flat else _label_for_right
for r in sorted(file_to_rights[left_file]):
lab = map_right(r)
if lab and lab != this_lbl and lab not in seen:
labels.append(lab)
seen.add(lab)
if not labels:
labels.append("//bazel/auto_header:_ah_placeholder.h")
write(" srcs = [\n")
for lab in labels:
write(f' "{lab}",\n')
write(" ],\n")
write(")\n\n")
return buf.getvalue()
def _guess_idl_from_gen_header(gen_header_repo: str, lr_map: Dict[str, Set[str]]) -> str | None:
if not gen_header_repo.endswith("_gen.h"):
return None
base = gen_header_repo[: -len("_gen.h")]
cand_idl = base + ".idl"
cand_tpl = base + ".idl.tpl"
if cand_idl in lr_map:
return cand_idl
if cand_tpl in lr_map:
return cand_tpl
return None
def _write_build_for_group(
src_dir: str, files_map: Dict[str, Set[str]], *, fsync_write: bool
) -> Tuple[str, bool]:
out_dir = SRC_ROOT / src_dir / AUTO_DIR
out_path = out_dir / BUILD_NAME
visibility = module_visibility_for_build_dir(src_dir)
new_digest = _dir_digest(src_dir, files_map, visibility=_render_vis_list(visibility))
old_digest = _read_existing_digest(out_path)
if new_digest == old_digest:
return (out_path.as_posix(), False)
content = _build_content_for_dir(src_dir, files_map, visibility=visibility, digest=new_digest)
changed = _atomic_write_if_changed(out_path, content, fsync_write=fsync_write)
return (out_path.as_posix(), changed)
def _run_cmd(cmd: list[str]) -> list[str]:
env = os.environ.copy()
env.setdefault("LC_ALL", "C")
env.setdefault("LANG", "C")
res = subprocess.run(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, cwd="src", env=env
)
if res.returncode not in (0, 1):
raise RuntimeError(f"Command failed ({res.returncode}): {' '.join(cmd)}\n{res.stderr}")
return res.stdout.splitlines()
def collect_left_right_pairs(rg_bin: str) -> list[tuple[str, str]]:
cmd_src = [
rg_bin,
"-PH",
"--no-line-number",
"--color=never",
"--no-config",
"-o",
r'^\s*#\s*include\s*[<"](?P<p>mongo/[^\s">]+)[">]',
"-g",
"mongo/**/*.{c,cc,cpp,cxx,h,hh,hpp,inl}",
"mongo",
"--replace",
r"$p",
]
cmd_idl = [
rg_bin,
"-PH",
"--no-line-number",
"--color=never",
"--no-config",
"-o",
r'^\s*-\s*"?(mongo/[^\s">]+)"?',
"-g",
"mongo/**/*.idl",
"-g",
"mongo/**/*.idl.tpl",
".",
"--replace",
r"$1",
]
out1 = _run_cmd(cmd_src)
out2 = _run_cmd(cmd_idl)
def _norm_fast(s: str) -> str:
# avoid hot replace/lstrip if not needed
if "\\" not in s and not s.startswith("./"):
return s
if "\\" in s:
s = s.replace("\\", "/")
if s.startswith("./"):
s = s[2:]
return s
merged: set[tuple[str, str]] = set()
def _ingest(lines: list[str]) -> None:
for line in lines:
if not line:
continue
left, sep, right = line.partition(":")
if not sep:
continue
left = _norm_fast(left)
right = _norm_fast(right)
# early drop: only mongo/, not third_party
if not right.startswith("mongo/"):
continue
if (
"/third_party/" in left
or "/third_party/" in right
or left.startswith("third_party/")
or right.startswith("third_party/")
):
continue
merged.add((left, right))
_ingest(out1)
_ingest(out2)
return list(merged)
def parse_left_right_pairs(pairs: list[tuple[str, str]]) -> Dict[str, Dict[str, Set[str]]]:
by_srcdir = defaultdict(lambda: defaultdict(set))
add = set.add
src_exts = SRC_EXTS_TUPLE
for left, right in pairs:
left_dir, sep, left_file = left.rpartition("/")
if not sep:
continue
if (not left_file.endswith(src_exts)) and (not left_file.endswith(LEFT_PSEUDO_SUFFIX)):
continue
if "/third_party/" in left_dir or left_dir.startswith("third_party/"):
continue
add(by_srcdir[left_dir].setdefault(left_file, set()), right)
return by_srcdir
def _env_bool(var: str, default: bool) -> bool:
v = os.environ.get(var)
if v is None:
return default
return v not in ("0", "false", "False", "no", "No", "")
def gen_auto_headers(repo_root: Path) -> Dict[str, object]:
"""
Runs the header generation once and returns a result dict:
{ ok: bool, err: str|None, wrote: int, skipped: int, t_ms: float }
"""
t0 = time.perf_counter()
cwd0 = Path.cwd()
res = {"ok": True, "err": None, "wrote": 0, "skipped": 0, "t_ms": 0.0}
try:
from bazel.auto_header.ensure_fd import ensure_rg
except Exception as e:
raise RuntimeError("Failed to import ensure_rg (ripgrep bootstrap).") from e
rg_bin = ensure_rg()
no_fsync = _env_bool("AUTOHEADER_NO_FSYNC", True) # skip fsync by default
try:
os.chdir(repo_root)
# load previous
prev_dirs = _load_manifest_dirs()
pairs = collect_left_right_pairs(rg_bin)
grouped = parse_left_right_pairs(pairs)
# Ensure *_gen targets exist for IDLs with no refs
idl_paths = list_all_idl_paths_py(rg_bin)
augment_with_idl_placeholders(grouped, idl_paths)
# Ensure every .c/.cc/.cpp/.cxx/.h/.hh/.hpp/.hxx gets a filegroup even with 0 includes
src_paths = list_all_left_sources_py(rg_bin)
augment_with_source_placeholders(grouped, src_paths)
augment_with_generated_left(grouped, GEN_LEFT_CPP)
lr_map = _build_left_rights_map(grouped) # still needed once
flat = _compute_flat_idl_from_lr_map(lr_map, IDL_HEADERS_RIGHTS)
_inject_flat_group(grouped, flat)
curr_dirs = set(grouped.keys())
# manifest-based cleanup (fast)
cleaned = _cleanup_from_manifest(prev_dirs, curr_dirs)
# 3) Emit per-dir BUILD files (sequential by default; see env knob above)
wrote = 0
skipped = 0
for src_dir, files_map in grouped.items():
if _is_third_party_path(src_dir):
continue
_, changed = _write_build_for_group( # type: ignore[attr-defined]
src_dir,
files_map,
fsync_write=not no_fsync,
)
wrote += int(changed)
skipped += int(not changed)
_store_manifest_dirs(curr_dirs)
res["wrote"] = wrote
res["skipped"] = skipped
return res
except Exception as e:
res["ok"] = False
res["err"] = f"{e.__class__.__name__}: {e}"
return res
finally:
os.chdir(cwd0)
res["t_ms"] = (time.perf_counter() - t0) * 1000.0
if __name__ == "__main__":
import cProfile, pstats
import sys
REPO_ROOT = Path(__file__).parent.parent.parent
sys.path.append(str(REPO_ROOT))
pr = cProfile.Profile()
pr.enable()
# call your entrypoint here:
gen_auto_headers(Path(".")) # or whatever main flow
pr.disable()
ps = pstats.Stats(pr).sort_stats("cumtime")
ps.print_stats(50) # top 50 by cumulative time
ps.sort_stats("tottime").print_stats(50)

View File

@ -54,6 +54,8 @@ def _make_executable(p: Path) -> None:
def _cache_dir() -> Path:
override = os.environ.get("FD_CACHE_DIR")
if not override and os.environ.get("CI"):
return Path(os.getcwd()) / ".cache" / "fd-binaries" / FD_VERSION
if override:
return Path(override).expanduser().resolve() / FD_VERSION
return Path.home() / ".cache" / "fd-binaries" / FD_VERSION
@ -97,3 +99,98 @@ def ensure_fd() -> str | None:
except Exception:
traceback.print_exc()
return None
RG_VERSION = "v15.1.0"
def _rg_cache_dir() -> Path:
override = os.environ.get("RG_CACHE_DIR")
if not override and os.environ.get("CI"):
return Path(os.getcwd()) / ".cache" / "rg-binaries" / FD_VERSION
if override:
return Path(override).expanduser().resolve() / RG_VERSION
return Path.home() / ".cache" / "rg-binaries" / RG_VERSION
def _rg_s3_url_for(sysname: str, arch: str) -> str | None:
"""
Map (os, arch) -> S3 path for our prebuilt rg artifacts.
Filenames match our build scripts:
- macOS: universal2 (single file for both x86_64/arm64)
- Linux: manylinux2014-{x86_64|aarch64|s390x|ppc64le}
- Windows: rg-windows-x86_64.exe (and optional arm64)
"""
base = f"https://mdb-build-public.s3.amazonaws.com/rg-binaries/{RG_VERSION}"
if sysname == "darwin":
# universal2 single binary for both arches
return f"{base}/rg-macos-universal2"
if sysname == "linux":
if arch in ("amd64", "x86_64"):
return f"{base}/rg-manylinux2014-x86_64"
if arch in ("arm64", "aarch64"):
return f"{base}/rg-manylinux2014-aarch64"
if arch == "s390x":
return f"{base}/rg-manylinux2014-s390x"
if arch == "ppc64le":
return f"{base}/rg-manylinux2014-ppc64le"
return None
if sysname == "windows":
if arch in ("amd64", "x86_64"):
return f"{base}/rg-windows-x86_64.exe"
if arch in ("arm64", "aarch64"):
# include if you also publish arm64
return f"{base}/rg-windows-arm64.exe"
return None
return None
def ensure_rg() -> str | None:
"""
Returns absolute path to cached ripgrep (rg) binary, or None if unsupported/failed.
Env overrides:
- FORCE_NO_RG: if set -> return None
- RG_PATH: absolute path to use instead of downloading
- RG_CACHE_DIR: base cache dir (default ~/.cache/rg-binaries/<ver>)
"""
if os.environ.get("FORCE_NO_RG"):
return None
if os.environ.get("RG_PATH"):
return os.environ["RG_PATH"]
sysname, arch = _triplet()
s3_url = _rg_s3_url_for(sysname, arch)
if not s3_url:
return None
exe_name = "rg.exe" if sysname == "windows" else "rg"
# For macOS universal, we dont want the arch in the leaf cache dir name to duplicate entries
leaf = f"{sysname}-{arch}" if sysname != "darwin" else f"{sysname}-universal2"
outdir = _rg_cache_dir() / leaf
outdir.mkdir(parents=True, exist_ok=True)
local = outdir / exe_name
if local.exists():
return str(local.resolve())
try:
from buildscripts.s3_binary.download import download_s3_binary
ok = download_s3_binary(
s3_path=s3_url,
local_path=str(local),
remote_sha_allowed=False,
ignore_file_not_exist=False,
)
if not ok:
return None
_make_executable(local)
return str(local.resolve())
except Exception:
traceback.print_exc()
return None

View File

@ -1,50 +0,0 @@
HEADER_DEP_SUFFIX = "_header_dep"
def create_header_dep_impl(ctx):
compilation_context = cc_common.create_compilation_context(
includes = depset(transitive = [header_dep[CcInfo].compilation_context.includes for header_dep in ctx.attr.header_deps]),
headers = depset(transitive = [header_dep[CcInfo].compilation_context.headers for header_dep in ctx.attr.header_deps]),
)
return CcInfo(compilation_context = compilation_context)
create_header_dep = rule(
create_header_dep_impl,
attrs = {
"header_deps": attr.label_list(providers = [CcInfo]),
},
doc = "create header only CcInfo",
fragments = ["cpp"],
)
def create_link_dep_impl(ctx):
deps = []
for dep in ctx.attr.link_deps:
if dep[CcInfo].linking_context:
for input in dep[CcInfo].linking_context.linker_inputs.to_list():
for library in input.libraries:
if library.dynamic_library and library.resolved_symlink_dynamic_library:
dep = library.resolved_symlink_dynamic_library.path
if dep not in deps:
deps.append(library.resolved_symlink_dynamic_library.path)
if library.static_library:
dep = library.static_library.path
if dep not in deps:
deps.append(library.static_library.path)
link_list = ctx.actions.declare_file(ctx.attr.target_name + "_links.list")
ctx.actions.write(
output = link_list,
content = "\n".join(deps),
)
return DefaultInfo(files = depset([link_list]))
create_link_deps = rule(
create_link_dep_impl,
attrs = {
"target_name": attr.string(),
"link_deps": attr.label_list(providers = [CcInfo]),
},
doc = "create a pseudo target to query link deps for",
)

View File

@ -13,7 +13,7 @@ def mongo_js_library(*args, **kwargs):
def all_subpackage_javascript_files(name = "all_subpackage_javascript_files"):
"""Creates a js_library containing all .js sources from all Bazel subpackages that also contain the all_subpackage_javascript_files macro."""
subpackage_targets = ["//{}/{}:{}".format(native.package_name(), subpackage, name) for subpackage in native.subpackages(include = ["**"], allow_empty = True)]
subpackage_targets = ["//{}/{}:{}".format(native.package_name(), subpackage, name) for subpackage in native.subpackages(include = ["**"], exclude = [".auto_header"], allow_empty = True)]
mongo_js_library(
name = name,

View File

@ -18,11 +18,6 @@ load("@com_github_grpc_grpc//bazel:generate_cc.bzl", "generate_cc")
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load(
"//bazel:header_deps.bzl",
"HEADER_DEP_SUFFIX",
"create_header_dep",
)
load(
"//bazel:separate_debug.bzl",
"CC_SHARED_LIBRARY_SUFFIX",
@ -37,6 +32,7 @@ load("@evergreen_variables//:evergreen_variables.bzl", "UNSAFE_COMPILE_VARIANT",
load("//bazel/toolchains/cc/mongo_windows:mongo_windows_cc_toolchain_config.bzl", "MIN_VER_MAP")
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("//bazel/config:generate_config_header.bzl", "generate_config_header")
load("//bazel/auto_header:auto_header.bzl", "binary_srcs_with_all_headers", "build_selects_and_flat_files", "concat_selects", "dedupe_preserve_order", "maybe_all_headers", "maybe_compute_auto_headers", "strings_only")
# These will throw an error if the following condition is not met:
# (libunwind == on && os == linux) || libunwind == off || libunwind == auto
@ -353,92 +349,6 @@ def tidy_config_filegroup():
visibility = ["//visibility:public"],
)
def _all_headers_label_for_pkg(pkg):
if pkg.startswith("src/mongo/db/modules/enterprise"):
return ["//src/mongo/db/modules/enterprise/.auto_header:all_headers"]
elif pkg.startswith("src/mongo/db/modules/atlas"):
return ["//src/mongo/db/modules/atlas/.auto_header:all_headers"]
else:
return ["//bazel/auto_header/.auto_header:all_headers"]
def _maybe_all_headers(name, hdrs, srcs, private_hdrs):
pkg = native.package_name()
if not (pkg.startswith("src/mongo") or "third_party" in pkg):
return hdrs, srcs + private_hdrs
# 1) Wrap user-provided (possibly configurable) hdrs into a helper filegroup.
# This isolates any select(...) inside the filegroup's srcs where it's legal.
hdr_wrap = name + "_hdrs_wrap"
native.filegroup(
name = hdr_wrap,
srcs = hdrs, # hdrs may already have select(...) — that's fine here
visibility = ["//visibility:private"],
)
# 2) Always-on config header (added outside the select to avoid duplication)
mongo_cfg_hdr = ["//src/mongo:mongo_config_header"]
# 3) Select between the per-package all_headers filegroup and the wrapped hdrs.
# IMPORTANT: both branches are *plain label lists* -> no nested selects.
final_hdrs = (
mongo_cfg_hdr +
select({
"//bazel/config:all_headers_enabled": _all_headers_label_for_pkg(pkg),
"//conditions:default": [":" + hdr_wrap],
})
)
# 4) For srcs: include private_hdrs only when NOT all_headers.
# Again, wrap the potentially-configurable list in a filegroup.
if private_hdrs:
priv_wrap = name + "_private_hdrs_wrap"
native.filegroup(
name = priv_wrap,
srcs = private_hdrs,
visibility = ["//visibility:private"],
)
extra_srcs = select({
"//bazel/config:all_headers_enabled": [],
"//conditions:default": [":" + priv_wrap],
})
else:
extra_srcs = []
final_srcs = srcs + extra_srcs
return final_hdrs, final_srcs
def _binary_srcs_with_all_headers(name, srcs, private_hdrs):
pkg = native.package_name()
if not (pkg.startswith("src/mongo") or "third_party" in pkg):
return srcs + private_hdrs
# Always include the config header via srcs
mongo_cfg_hdr = ["//src/mongo:mongo_config_header"]
# Wrap private_hdrs so any select(...) inside is contained.
if private_hdrs:
priv_wrap = name + "_private_hdrs_wrap"
native.filegroup(
name = priv_wrap,
srcs = private_hdrs,
visibility = ["//visibility:private"],
)
maybe_priv = select({
"//bazel/config:all_headers_enabled": [],
"//conditions:default": [":" + priv_wrap],
})
else:
maybe_priv = []
# Add the per-package all_headers only when all_headers mode is on.
# Both branches are plain lists → no nested selects.
all_hdrs_branch = select({
"//bazel/config:all_headers_enabled": _all_headers_label_for_pkg(pkg),
"//conditions:default": [],
})
return srcs + mongo_cfg_hdr + maybe_priv + all_hdrs_branch
def mongo_cc_library(
name,
srcs = [],
@ -446,7 +356,6 @@ def mongo_cc_library(
textual_hdrs = [],
deps = [],
cc_deps = [],
header_deps = [],
private_hdrs = [],
testonly = False,
visibility = None,
@ -471,6 +380,8 @@ def mongo_cc_library(
skip_windows_crt_flags = False,
shared_lib_name = "",
win_def_file = None,
auto_header = True,
srcs_select = None,
**kwargs):
"""Wrapper around cc_library.
@ -482,8 +393,6 @@ def mongo_cc_library(
compiling them.
deps: The targets the library depends on.
cc_deps: Same as deps, but doesn't get added as shared library dep.
header_deps: The targets the library depends on only for headers, omits
linking.
testonly: Whether or not the target is purely for tests.
visibility: The visibility of the target library.
data: Data targets the library depends on.
@ -527,13 +436,42 @@ def mongo_cc_library(
if "allocator" not in skip_global_deps:
deps += TCMALLOC_DEPS
if native.package_name().startswith("src/mongo"):
if "third_party" not in native.package_name():
hdrs, srcs = _maybe_all_headers(name, hdrs, srcs, private_hdrs)
# 0) Build real select(...) objects + a flat list of files (strings)
_select_objs, _select_flat_files = build_selects_and_flat_files(
srcs_select,
lib_name = name,
debug = False,
)
if name != "boost_assert_shim" and name != "mongoca" and name != "cyrus_sasl_windows_test_plugin":
# 1) What cc_* should see: plain srcs, then fold in each select(...) via '+'
_final_srcs_for_cc = concat_selects(srcs, _select_objs)
pkg = native.package_name()
is_mongo_src = pkg.startswith("src/mongo")
in_third_party = "third_party" in pkg
if is_mongo_src:
if auto_header and not in_third_party:
# Introspection list for auto-headers (strings only!)
_all_concrete_srcs = dedupe_preserve_order(strings_only(srcs) + _select_flat_files)
_ah = maybe_compute_auto_headers(_all_concrete_srcs)
if _ah != None and _ah:
# dedupe only the _ah strings if you want, NOT the selector expression
srcs = _final_srcs_for_cc + dedupe_preserve_order(_ah)
else:
srcs = _final_srcs_for_cc + private_hdrs
elif not in_third_party:
srcs = binary_srcs_with_all_headers(name, _final_srcs_for_cc, private_hdrs)
else:
srcs = _final_srcs_for_cc + private_hdrs
if name != "mongoca" and name != "cyrus_sasl_windows_test_plugin":
deps += MONGO_GLOBAL_SRC_DEPS
features = features + RE_ENABLE_DISABLED_3RD_PARTY_WARNINGS_FEATURES
else:
srcs = _final_srcs_for_cc + private_hdrs
if "modules/enterprise" in native.package_name():
target_compatible_with += select({
@ -603,11 +541,6 @@ def mongo_cc_library(
undefined_ref_flag = []
tags = tags + ["skip_symbol_check"]
create_header_dep(
name = name + HEADER_DEP_SUFFIX,
header_deps = header_deps,
)
tidy_config_filegroup()
# Create a cc_library entry to generate a shared archive of the target.
@ -615,7 +548,7 @@ def mongo_cc_library(
name = name + SHARED_ARCHIVE_SUFFIX,
srcs = srcs + SANITIZER_DENYLIST_HEADERS,
hdrs = hdrs + fincludes_hdr,
deps = deps + cc_deps + [name + HEADER_DEP_SUFFIX],
deps = deps + cc_deps,
textual_hdrs = textual_hdrs,
visibility = visibility,
testonly = testonly,
@ -647,7 +580,7 @@ def mongo_cc_library(
name = name + WITH_DEBUG_SUFFIX,
srcs = srcs + SANITIZER_DENYLIST_HEADERS,
hdrs = hdrs + fincludes_hdr,
deps = deps + cc_deps + [name + HEADER_DEP_SUFFIX],
deps = deps + cc_deps,
textual_hdrs = textual_hdrs,
visibility = visibility,
testonly = testonly,
@ -741,7 +674,7 @@ def mongo_cc_library(
shared_archive = shared_archive,
skip_archive = SKIP_ARCHIVE_ENABLED,
visibility = visibility,
deps = deps + cc_deps + [name + HEADER_DEP_SUFFIX],
deps = deps + cc_deps,
exec_properties = exec_properties,
)
@ -770,7 +703,6 @@ def _mongo_cc_binary_and_test(
name,
srcs = [],
deps = [],
header_deps = [],
private_hdrs = [],
testonly = False,
visibility = None,
@ -790,17 +722,55 @@ def _mongo_cc_binary_and_test(
env = {},
_program_type = "",
skip_windows_crt_flags = False,
auto_header = True,
srcs_select = None,
**kwargs):
if linkstatic == True:
fail("""Linking specific targets statically is not supported.
The mongo build must link entirely statically or entirely dynamically.
This can be configured via //config/bazel:linkstatic.""")
if native.package_name().startswith("src/mongo"):
if "third_party" not in native.package_name():
srcs = _binary_srcs_with_all_headers(name, srcs, private_hdrs)
# 0) Build real select(...) objects + gather a flat, introspectable list of files
_select_objs, _select_flat_files = build_selects_and_flat_files(
srcs_select,
lib_name = name,
debug = False,
)
# 1) What we actually pass to cc_binary as srcs: (plain srcs) + (real select(...)s)
_final_srcs_for_cc = concat_selects(srcs, _select_objs)
pkg = native.package_name()
is_mongo_src = pkg.startswith("src/mongo")
in_third_party = "third_party" in pkg
if is_mongo_src:
if auto_header and not in_third_party:
# What we use for *introspection* (auto-header computation): a plain list of strings
_all_concrete_srcs = dedupe_preserve_order((srcs or []) + _select_flat_files)
# Use the concrete list so the tool can iterate even if _final_srcs_for_cc contains selects
_ah = maybe_compute_auto_headers(_all_concrete_srcs)
if _ah != None:
# Add transitive auto-headers to *srcs* (binary path)
srcs = _final_srcs_for_cc + dedupe_preserve_order(_ah)
else:
# Couldnt compute auto-headers → fall back to adding private_hdrs to srcs
srcs = _final_srcs_for_cc + private_hdrs
elif not in_third_party:
# all_headers mode (binary flavor): returns a srcs list
srcs = binary_srcs_with_all_headers(name, _final_srcs_for_cc, private_hdrs)
else:
# third_party inside src/mongo: append private headers as sources
srcs = _final_srcs_for_cc + private_hdrs
deps += MONGO_GLOBAL_SRC_DEPS
features = features + RE_ENABLE_DISABLED_3RD_PARTY_WARNINGS_FEATURES
else:
# Non-mongo pkgs: append private headers as sources
srcs = _final_srcs_for_cc + private_hdrs
if "modules/enterprise" in native.package_name():
target_compatible_with += select({
@ -843,11 +813,6 @@ def _mongo_cc_binary_and_test(
"//bazel/config:windows_x86_64": [],
})
create_header_dep(
name = name + HEADER_DEP_SUFFIX,
header_deps = header_deps,
)
exec_properties |= select({
"//bazel/config:link_timeout_enabled": {
"cpp_link.timeout": "600",
@ -868,7 +833,7 @@ def _mongo_cc_binary_and_test(
args = {
"name": name + WITH_DEBUG_SUFFIX,
"srcs": srcs + fincludes_hdr + SANITIZER_DENYLIST_HEADERS,
"deps": all_deps + [name + HEADER_DEP_SUFFIX],
"deps": all_deps,
"visibility": visibility,
"testonly": testonly,
"copts": copts,
@ -970,7 +935,6 @@ def mongo_cc_binary(
name,
srcs = [],
deps = [],
header_deps = [],
private_hdrs = [],
testonly = False,
visibility = None,
@ -995,8 +959,6 @@ def mongo_cc_binary(
name: The name of the library the target is compiling.
srcs: The source files to build.
deps: The targets the library depends on.
header_deps: The targets the library depends on only for headers, omits
linking.
testonly: Whether or not the target is purely for tests.
visibility: The visibility of the target library.
data: Data targets the library depends on.
@ -1024,7 +986,6 @@ def mongo_cc_binary(
name,
srcs,
deps,
header_deps,
private_hdrs,
testonly,
visibility,
@ -1050,7 +1011,6 @@ def mongo_cc_test(
name,
srcs = [],
deps = [],
header_deps = [],
private_hdrs = [],
visibility = None,
data = [],
@ -1075,8 +1035,6 @@ def mongo_cc_test(
name: The name of the test target.
srcs: The source files to build.
deps: The targets the library depends on.
header_deps: The targets the library depends on only for headers, omits
linking.
visibility: The visibility of the target library.
data: Data targets the library depends on.
tags: Tags to add to the rule.
@ -1135,7 +1093,6 @@ def mongo_cc_test(
name,
srcs,
deps,
header_deps,
private_hdrs,
True,
visibility,
@ -1177,7 +1134,6 @@ def mongo_cc_unit_test(
name,
srcs = [],
deps = [],
header_deps = [],
private_hdrs = [],
visibility = ["//visibility:public"],
data = [],
@ -1198,7 +1154,6 @@ def mongo_cc_unit_test(
name = name,
srcs = srcs,
deps = deps + ([] if has_custom_mainline else ["//src/mongo/unittest:unittest_main"]),
header_deps = header_deps,
private_hdrs = private_hdrs,
visibility = visibility,
data = data,
@ -1230,7 +1185,12 @@ def idl_generator_impl(ctx):
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
dep_depsets = [dep[IdlInfo].idl_deps for dep in ctx.attr.deps]
transitive_header_outputs = [dep[IdlInfo].header_output for dep in ctx.attr.deps] + [hdr[DefaultInfo].files for hdr in ctx.attr.hdrs]
# Transitive headers from deps + explicit hdrs attr
transitive_header_outputs = (
[dep[IdlInfo].header_output for dep in ctx.attr.deps] +
[hdr[DefaultInfo].files for hdr in ctx.attr.hdrs]
)
# collect deps from python modules and setup the corresponding
# path so all modules can be found by the toolchain.
@ -1238,7 +1198,11 @@ def idl_generator_impl(ctx):
for py_dep in ctx.attr.py_deps:
for path in py_dep[PyInfo].imports.to_list():
if path not in python_path:
python_path.append(ctx.expand_make_variables("python_library_imports", "$(BINDIR)/external/" + path, ctx.var))
python_path.append(ctx.expand_make_variables(
"python_library_imports",
"$(BINDIR)/external/" + path,
ctx.var,
))
py_depsets = [py_dep[PyInfo].transitive_sources for py_dep in ctx.attr.py_deps]
@ -1272,13 +1236,33 @@ def idl_generator_impl(ctx):
env = {"PYTHONPATH": ctx.configuration.host_path_separator.join(python_path)},
)
# Depsets well publish
header_ds = depset([gen_header], transitive = transitive_header_outputs)
all_files = depset([gen_source, gen_header], transitive = transitive_header_outputs)
return [
DefaultInfo(
files = depset([gen_source, gen_header], transitive = transitive_header_outputs),
),
# Keep DefaultInfo as-is so :*_gen works in cc_library(srcs/hdrs)
DefaultInfo(files = all_files),
# Your custom provider (unchanged)
IdlInfo(
idl_deps = depset(ctx.attr.src.files.to_list(), transitive = [dep[IdlInfo].idl_deps for dep in ctx.attr.deps]),
header_output = depset([gen_header], transitive = transitive_header_outputs),
idl_deps = depset(
ctx.attr.src.files.to_list(),
transitive = [dep[IdlInfo].idl_deps for dep in ctx.attr.deps],
),
header_output = header_ds,
),
# NEW: expose header-only view for wrappers in the shadow BUILD
OutputGroupInfo(
# Most consumers use one of these two names—publish both:
hdrs = header_ds,
header_files = header_ds,
# Optional: a cpp-only view if you ever want it
srcs = depset([gen_source]),
cpps = depset([gen_source]),
# (You can omit srcs/cpps if you don't need them.)
),
]
@ -1321,10 +1305,18 @@ idl_generator_rule = rule(
fragments = ["py"],
)
def idl_generator(name, tags = [], **kwargs):
def idl_generator(name, tags = [], hdrs = [], deps = [], idl_self_dep = False, **kwargs):
# Extra headers always pulled by IDL
if not idl_self_dep:
idl_deps = deps + ["//src/mongo/db/query:explain_verbosity_gen"]
else:
idl_deps = deps
idl_generator_rule(
name = name,
tags = tags + ["gen_source"],
hdrs = hdrs + ["//src/mongo:idl_headers"],
deps = idl_deps,
**kwargs
)
@ -1519,6 +1511,7 @@ def mongo_idl_library(
name = name,
srcs = [idl_gen_name],
deps = deps,
auto_header = False,
**kwargs
)
@ -1526,7 +1519,6 @@ def mongo_cc_benchmark(
name,
srcs = [],
deps = [],
header_deps = [],
private_hdrs = [],
visibility = None,
data = [],
@ -1547,7 +1539,6 @@ def mongo_cc_benchmark(
name = name,
srcs = srcs,
deps = deps + ([] if has_custom_mainline else ["//src/mongo/unittest:benchmark_main"]),
header_deps = header_deps,
private_hdrs = private_hdrs,
visibility = visibility,
data = data,
@ -1569,7 +1560,6 @@ def mongo_cc_integration_test(
name,
srcs = [],
deps = [],
header_deps = [],
private_hdrs = [],
visibility = None,
data = [],
@ -1590,7 +1580,6 @@ def mongo_cc_integration_test(
name = name,
srcs = srcs,
deps = deps + ([] if has_custom_mainline else ["//src/mongo/unittest:integration_test_main"]),
header_deps = header_deps,
private_hdrs = private_hdrs,
visibility = visibility,
data = data,
@ -1612,7 +1601,6 @@ def mongo_cc_fuzzer_test(
name,
srcs = [],
deps = [],
header_deps = [],
private_hdrs = [],
visibility = None,
data = [],
@ -1633,7 +1621,6 @@ def mongo_cc_fuzzer_test(
name = name,
srcs = srcs,
deps = deps,
header_deps = header_deps,
private_hdrs = private_hdrs,
visibility = visibility,
data = data,
@ -1663,7 +1650,6 @@ def mongo_cc_extension_shared_library(
name,
srcs = [],
deps = [],
header_deps = [],
private_hdrs = [],
visibility = None,
data = [],
@ -1686,7 +1672,6 @@ def mongo_cc_extension_shared_library(
"//src/mongo/db/extension/public:extensions_api_public",
"//src/mongo/db/extension/sdk:sdk_cpp",
],
header_deps = header_deps,
private_hdrs = private_hdrs,
visibility = visibility,
data = data,

View File

@ -8,39 +8,7 @@ REPO_ROOT = str(pathlib.Path(__file__).parent.parent.parent)
sys.path.append(REPO_ROOT)
from bazel.wrapper_hook.wrapper_debug import wrapper_debug
def get_terminal_stream(fd_env_var: str):
"""Return a Python file object for the original terminal FD."""
fd_str = os.environ.get(fd_env_var)
if not fd_str:
return None
# Handle Windows CON device
if fd_str == "CON":
# On Windows, open CON device for console output
# Use the appropriate stream based on the variable name
if "STDOUT" in fd_env_var:
try:
return open("CON", "w", buffering=1)
except (OSError, IOError):
return None
elif "STDERR" in fd_env_var:
try:
return open("CON", "w", buffering=1)
except (OSError, IOError):
return None
return None
# Handle Unix file descriptors
if fd_str.isdigit():
fd = int(fd_str)
try:
return os.fdopen(fd, "w", buffering=1)
except (OSError, ValueError):
return None
return None
from bazel.wrapper_hook.wrapper_util import get_terminal_stream
def setup_auth_wrapper():

View File

@ -18,6 +18,7 @@ ALLOW_LINES = [
"--dtlto=False",
"--pgo_profile_use=False",
"--bolt_profile_use=False",
"common --all_headers=True",
]

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
import os
import sys
import time
from pathlib import Path
REPO_ROOT = Path(__file__).parent.parent.parent
@ -16,9 +17,56 @@ from bazel.wrapper_hook.wrapper_debug import wrapper_debug
wrapper_debug(f"wrapper hook script is using {sys.executable}")
def _supports_color(stream):
if os.name == "nt":
return False
if os.environ.get("NO_COLOR"):
return False
try:
return stream.isatty()
except Exception:
return False
def _info_prefix(stream):
if _supports_color(stream):
GREEN = "\x1b[0;32m"
RESET = "\x1b[0m"
return f"{GREEN}INFO{RESET}:"
return "INFO:"
def _fmt_duration(seconds: float) -> str:
return f"{seconds*1000:.1f} ms" if seconds < 1 else f"{seconds:.3f} s"
def _info(msg: str, printer=print, stream=None):
from bazel.wrapper_hook.wrapper_util import get_terminal_stream
term_err = get_terminal_stream("MONGO_WRAPPER_STDERR_FD")
# Save current stdout/stderr
old_stdout = sys.stdout
old_stderr = sys.stderr
try:
sys.stdout = term_err
sys.stderr = term_err
stream = stream or sys.stdout
prefix = _info_prefix(stream)
printer(f"{prefix} {msg}")
finally:
# Restore original stdout/stderr to whatever wrapper has
sys.stdout = old_stdout
sys.stderr = old_stderr
def main():
install_modules(sys.argv[1], sys.argv[1:])
from bazel.auto_header.auto_header import gen_auto_headers
from bazel.auto_header.gen_all_headers import spawn_all_headers_thread
from bazel.wrapper_hook.autogenerated_targets import autogenerate_targets
from bazel.wrapper_hook.check_resources import check_resource
@ -30,8 +78,24 @@ def main():
from bazel.wrapper_hook.plus_interface import check_bazel_command_type, test_runner_interface
from bazel.wrapper_hook.set_mongo_variables import write_mongo_variables_bazelrc
# Kick off the fast-path generator BEFORE autogenerate_targets.
th, hdr_state = spawn_all_headers_thread(REPO_ROOT)
th_all_header, hdr_state_all_header = spawn_all_headers_thread(REPO_ROOT)
# Join the header generator before finalizing args.
start = time.perf_counter()
auto_hdr_state = gen_auto_headers(REPO_ROOT)
th_all_header.join()
if hdr_state_all_header["ok"]:
wrapper_debug(f'({"wrote" if hdr_state_all_header["wrote"] else "nochange"})')
else:
print(f'[all_headers] failed: {hdr_state_all_header["err"]!r}')
if auto_hdr_state["ok"]:
wrapper_debug(f'({"wrote" if auto_hdr_state["wrote"] else "nochange"})')
else:
print(f'[auto_headers] failed: {auto_hdr_state["err"]!r}')
t_total_s = time.perf_counter() - start
_info(f"auto_header build generated: {_fmt_duration(t_total_s)}")
# This is used to autogenerate a BUILD.bazel that creates
# Filegroups for select tags - used to group targets for installing
@ -70,30 +134,10 @@ def main():
)
except LinterFail:
# Linter fails preempt bazel run.
# Ensure the header thread is finished before exiting.
th.join()
if hdr_state["ok"]:
wrapper_debug(
f'[all_headers] done in {hdr_state["t_ms"]:.1f} ms '
f'({"wrote" if hdr_state["wrote"] else "nochange"})'
)
else:
print(f'[all_headers] failed: {hdr_state["err"]!r}')
sys.exit(3)
else:
args = sys.argv[2:]
# Join the header generator before finalizing args.
th.join()
if hdr_state["ok"]:
wrapper_debug(
f'[all_headers] done in {hdr_state["t_ms"]:.1f} ms '
f'({"wrote" if hdr_state["wrote"] else "nochange"})'
)
else:
print(f'[all_headers] failed: {hdr_state["err"]!r}')
os.chmod(os.environ.get("MONGO_BAZEL_WRAPPER_ARGS"), 0o644)
with open(os.environ.get("MONGO_BAZEL_WRAPPER_ARGS"), "w") as f:
f.write("\n".join(args))

View File

@ -11,6 +11,39 @@ _UNKNOWN = "Unknown"
_REPO_ROOT = str(pathlib.Path(__file__).parent.parent.parent)
def get_terminal_stream(fd_env_var: str):
"""Return a Python file object for the original terminal FD."""
fd_str = os.environ.get(fd_env_var)
if not fd_str:
return None
# Handle Windows CON device
if fd_str == "CON":
# On Windows, open CON device for console output
# Use the appropriate stream based on the variable name
if "STDOUT" in fd_env_var:
try:
return open("CON", "w", buffering=1)
except (OSError, IOError):
return None
elif "STDERR" in fd_env_var:
try:
return open("CON", "w", buffering=1)
except (OSError, IOError):
return None
return None
# Handle Unix file descriptors
if fd_str.isdigit():
fd = int(fd_str)
try:
return os.fdopen(fd, "w", buffering=1)
except (OSError, ValueError):
return None
return None
def cpu_info() -> str:
"""CPU count - works on all platforms"""
try:

View File

@ -0,0 +1,112 @@
# mongo ripgrep builds
This directory contains scripts to produce **portable, high-performance `ripgrep` binaries** for all major platforms:
- **Linux** (`manylinux2014` glibc 2.17 baseline): `x86_64`, `aarch64`, `s390x`, `ppc64le`
- **macOS** universal2 (`x86_64` + `arm64`)
- **Windows** x86_64 (MSVC)
Each build uses **bundled static PCRE2**, **LTO**, and conservative CPU baselines to maximize portability.
All artifacts are placed in the `dist/` directory.
---
## 📁 Contents
| Script | Platform | Output |
| :---------------------------- | :-------------------------------------- | :----------------------------- |
| `build_rg_manylinux2014.sh` | Linux (x86_64, aarch64, s390x, ppc64le) | `dist/rg-manylinux2014-<arch>` |
| `build_rg_macos_universal.sh` | macOS (universal2) | `dist/rg-macos-universal2` |
| `build_rg_windows_x64.ps1` | Windows (x86_64) | `dist/rg-windows-x86_64.exe` |
---
## 🚀 Quick Start
### 🐧 Linux (manylinux2014 glibc 2.17)
**Requirements:** Docker.
To cross-build using QEMU (for aarch64/s390x/ppc64le), enable binfmt once:
```bash
docker run --privileged --rm tonistiigi/binfmt --install all
```
#### Build native architecture
```bash
./build_rg_manylinux2014.sh
```
#### Cross-build via QEMU
```bash
ARCH=x86_64 PLATFORM=linux/amd64 ./build_rg_manylinux2014.sh
ARCH=aarch64 PLATFORM=linux/arm64 ./build_rg_manylinux2014.sh
ARCH=s390x PLATFORM=linux/s390x ./build_rg_manylinux2014.sh
ARCH=ppc64le PLATFORM=linux/ppc64le ./build_rg_manylinux2014.sh
```
#### Tune CPU baseline
```bash
CPU_BASELINE=x86-64-v2 ./build_rg_manylinux2014.sh
```
---
### 🍎 macOS (universal2)
```bash
./build_rg_macos_universal.sh
```
- Targets macOS **10.13+** (x86_64) and **11.0+** (arm64).
- Uses `lipo` to merge slices.
---
### 🪟 Windows (x86_64)
Run in **Developer PowerShell for VS** (so `cl.exe` is available):
```powershell
.\build_rg_windows_x64.ps1
```
---
## ⚙️ Build Behavior (All Platforms)
- **Release mode** with `LTO=fat`, `codegen-units=1`, `panic=abort`
- **Bundled static PCRE2** (`PCRE2_SYS_BUNDLED=1`, `PCRE2_SYS_STATIC=1`)
- **CPU baseline:**
- Linux x86_64 `x86-64` (override with `CPU_BASELINE`)
- Other Linux `generic`
- macOS `x86-64` / `generic`
- Windows `x86-64`
- **No** `-C lto` in `RUSTFLAGS`; LTO handled via Cargo profile
---
## 🧩 Environment Variables
| Variable | Purpose | Default |
| :------------------------------ | :------------------------------- | :------------------------------------------ |
| `RG_REPO` | Git repo to clone | `https://github.com/BurntSushi/ripgrep.git` |
| `RG_REF` | Branch / tag / commit | `master` |
| `OUT_DIR` | Output directory | `./dist` |
| `ARCH` | Linux target arch | `uname -m` |
| `PLATFORM` | Docker platform | auto |
| `CPU_BASELINE` | CPU baseline (Linux/Windows) | `x86-64` |
| `DEPLOY_X86` | macOS min version (x86_64 slice) | `10.13` |
| `DEPLOY_ARM` | macOS min version (arm64 slice) | `11.0` |
| `CPU_BASE_X86` / `CPU_BASE_ARM` | macOS CPU baselines | `x86-64` / `generic` |
## 📜 License & Attribution
These scripts build **ripgrep** from the official upstream repository
👉 <https://github.com/BurntSushi/ripgrep>
Ripgrep is distributed under the terms of the MIT license.
PCRE2 is statically linked under its respective license via `pcre2-sys`.

View File

@ -0,0 +1,72 @@
#!/usr/bin/env bash
set -euo pipefail
RG_REPO="${RG_REPO:-https://github.com/BurntSushi/ripgrep.git}"
RG_REF="${RG_REF:-master}"
OUT_DIR="${OUT_DIR:-$(pwd)/dist}"
DEPLOY_X86="${DEPLOY_X86:-10.13}"
DEPLOY_ARM="${DEPLOY_ARM:-11.0}"
CPU_BASE_X86="${CPU_BASE_X86:-x86-64}"
CPU_BASE_ARM="${CPU_BASE_ARM:-generic}"
mkdir -p "$OUT_DIR"
# toolchain
if ! command -v rustup >/dev/null 2>&1; then
curl -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
fi
rustup target add x86_64-apple-darwin aarch64-apple-darwin
# repo
test -d ripgrep || git clone --depth=1 --branch "$RG_REF" "$RG_REPO" ripgrep
cd ripgrep
# shared knobs
export PCRE2_SYS_BUNDLED=1
export PCRE2_SYS_STATIC=1
export CARGO_PROFILE_RELEASE_LTO=fat
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_PANIC=abort
SDKROOT="$(xcrun --sdk macosx --show-sdk-path)"
CC_BIN="$(xcrun -f clang)"
# --- x86_64 ---
echo "==> x86_64 (min macOS $DEPLOY_X86)"
export CARGO_TARGET_DIR="$(pwd)/target-x86_64"
rm -rf "$CARGO_TARGET_DIR"
env SDKROOT="$SDKROOT" CC="$CC_BIN" CFLAGS="-mmacosx-version-min=$DEPLOY_X86" \
MACOSX_DEPLOYMENT_TARGET="$DEPLOY_X86" \
RUSTFLAGS="-C target-cpu=$CPU_BASE_X86 -C strip=symbols -C link-arg=-mmacosx-version-min=$DEPLOY_X86" \
cargo build --release --features pcre2 --target x86_64-apple-darwin
RG_X86="$CARGO_TARGET_DIR/x86_64-apple-darwin/release/rg"
# --- arm64 ---
echo "==> arm64 (min macOS $DEPLOY_ARM)"
export CARGO_TARGET_DIR="$(pwd)/target-aarch64"
rm -rf "$CARGO_TARGET_DIR"
env SDKROOT="$SDKROOT" CC="$CC_BIN" CFLAGS="-mmacosx-version-min=$DEPLOY_ARM" \
MACOSX_DEPLOYMENT_TARGET="$DEPLOY_ARM" \
RUSTFLAGS="-C target-cpu=$CPU_BASE_ARM -C strip=symbols -C link-arg=-Wl,-platform_version,macos,${DEPLOY_ARM},${DEPLOY_ARM}" \
cargo build --release --features pcre2 --target aarch64-apple-darwin
RG_ARM="$CARGO_TARGET_DIR/aarch64-apple-darwin/release/rg"
# sanity
[ -f "$RG_X86" ] || {
echo "missing $RG_X86"
exit 1
}
[ -f "$RG_ARM" ] || {
echo "missing $RG_ARM"
exit 1
}
# --- universal2 ---
OUT="$OUT_DIR/rg-macos-universal2"
lipo -create -output "$OUT" "$RG_X86" "$RG_ARM"
strip -S "$OUT" || true
echo "==> Wrote $OUT"
file "$OUT"
otool -L "$OUT"

View File

@ -0,0 +1,105 @@
#!/usr/bin/env bash
set -euo pipefail
# -------- config (overridable via env) --------------------------------------
ARCH="${ARCH:-$(uname -m)}" # x86_64 | aarch64 | s390x | ppc64le
RG_REPO="${RG_REPO:-https://github.com/BurntSushi/ripgrep.git}"
RG_REF="${RG_REF:-master}" # tag like 14.1.0 or a commit
OUT_DIR="${OUT_DIR:-$(pwd)/dist}"
PLATFORM="${PLATFORM:-}" # e.g. linux/arm64 if you want to force
DOCKER_IMAGE="" # filled below
CPU_BASELINE="${CPU_BASELINE:-}" # default per-arch below
# Map arch -> image + defaults
case "$ARCH" in
x86_64 | amd64)
ARCH=x86_64
DOCKER_IMAGE="quay.io/pypa/manylinux2014_x86_64"
CPU_BASELINE="${CPU_BASELINE:-x86-64}" # or x86-64-v2 / v3
;;
aarch64 | arm64)
ARCH=aarch64
DOCKER_IMAGE="quay.io/pypa/manylinux2014_aarch64"
CPU_BASELINE="${CPU_BASELINE:-generic}"
;;
s390x | 390x)
ARCH=s390x
DOCKER_IMAGE="quay.io/pypa/manylinux2014_s390x"
CPU_BASELINE="${CPU_BASELINE:-generic}"
;;
ppc64le | ppc)
ARCH=ppc64le
DOCKER_IMAGE="quay.io/pypa/manylinux2014_ppc64le"
CPU_BASELINE="${CPU_BASELINE:-generic}"
;;
*)
echo "Unsupported ARCH='$ARCH'. Expected x86_64|aarch64|s390x|ppc64le." >&2
exit 1
;;
esac
mkdir -p "$OUT_DIR"
echo "==> Build ripgrep for manylinux2014 ($ARCH)"
echo " Image: $DOCKER_IMAGE"
echo " CPU_BASELINE: $CPU_BASELINE"
[ -n "$PLATFORM" ] && echo " docker --platform: $PLATFORM"
# Compose optional --platform flag
PLATFORM_ARGS=()
[ -n "$PLATFORM" ] && PLATFORM_ARGS=(--platform "$PLATFORM")
docker run --rm -t "${PLATFORM_ARGS[@]}" \
-v "$OUT_DIR":/out \
"$DOCKER_IMAGE" \
bash -lc '
set -euo pipefail
echo "==> glibc baseline:"
ldd --version > /tmp/lddv && head -1 /tmp/lddv
# Enable newer GCC if available; guard against nounset
if [ -f /opt/rh/devtoolset-10/enable ]; then
set +u
# shellcheck disable=SC1091
source /opt/rh/devtoolset-10/enable
set -u
echo "Using devtoolset-10"
fi
yum -y install git cmake make which pkgconfig curl perl binutils >/dev/null 2>&1 || true
echo "==> Install Rust (minimal profile)"
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
# shellcheck disable=SC1091
source "$HOME/.cargo/env"
rustc -V; cargo -V
echo "==> Clone ripgrep ('"$RG_REF"')"
rm -rf /tmp/ripgrep
git clone --depth=1 --branch '"$RG_REF"' '"$RG_REPO"' /tmp/ripgrep
cd /tmp/ripgrep
echo "==> Build with bundled+static PCRE2, LTO, single CGU, conservative CPU"
export PCRE2_SYS_BUNDLED=1
export PCRE2_SYS_STATIC=1
export CARGO_PROFILE_RELEASE_LTO=fat
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_PANIC=abort
export RUSTFLAGS="-C target-cpu='"$CPU_BASELINE"' -C strip=symbols"
cargo clean
cargo build --release --features pcre2
BIN=/tmp/ripgrep/target/release/rg
strip "$BIN" || true
echo "==> GLIBC symbols used:"
objdump -T "$BIN" | grep -o "GLIBC_[0-9]\\+\\.[0-9]\\+" | sort -u || true
OUT_NAME=rg-manylinux2014-'"$ARCH"'
cp "$BIN" /out/$OUT_NAME
echo "==> Wrote /out/$OUT_NAME"
'
echo "Built: $OUT_DIR/rg-manylinux2014-$ARCH"

View File

@ -0,0 +1,82 @@
<# build_rg_windows_x64.ps1
Builds ripgrep (x86_64-pc-windows-msvc) with PCRE2 bundled+static, LTO=fat, codegen-units=1.
Output: .\dist\rg-windows-x86_64.exe
#>
$ErrorActionPreference = "Stop"
# ---- Config (override via env before running) -------------------------------
$RG_REPO = if ($env:RG_REPO) { $env:RG_REPO } else { "https://github.com/BurntSushi/ripgrep.git" }
$RG_REF = if ($env:RG_REF) { $env:RG_REF } else { "master" } # or a tag like 15.0.0 / 14.1.0
$OUT_DIR = if ($env:OUT_DIR) { $env:OUT_DIR } else { Join-Path (Get-Location) "dist" }
$CPU_BASE = if ($env:CPU_BASELINE) { $env:CPU_BASELINE } else { "x86-64" } # portable baseline
New-Item -ItemType Directory -Force -Path $OUT_DIR | Out-Null
Write-Host "==> ripgrep Windows x86_64"
Write-Host " RG_REF=$RG_REF"
Write-Host " OUT_DIR=$OUT_DIR"
Write-Host " CPU_BASE=$CPU_BASE"
# ---- MSVC sanity ------------------------------------------------------------
if (-not (Get-Command cl.exe -ErrorAction SilentlyContinue)) {
Write-Warning "MSVC (cl.exe) not found in PATH. Run this in 'Developer PowerShell for VS' or install VS Build Tools."
}
# ---- Rust toolchain ---------------------------------------------------------
if (-not (Get-Command rustup -ErrorAction SilentlyContinue)) {
Write-Host "Installing rustup..."
Invoke-WebRequest -UseBasicParsing https://win.rustup.rs -OutFile rustup-init.exe
Start-Process -Wait -NoNewWindow .\rustup-init.exe -ArgumentList "-y --profile minimal"
$env:Path += ";$([IO.Path]::Combine($env:USERPROFILE,'.cargo','bin'))"
}
rustup toolchain install stable -q | Out-Null
rustup target add x86_64-pc-windows-msvc -q | Out-Null
# ---- Fetch repo -------------------------------------------------------------
if (-not (Test-Path ripgrep)) {
git clone --depth=1 --branch $RG_REF $RG_REPO ripgrep | Out-Null
}
Set-Location ripgrep
# ---- Build knobs (use Cargo profile for LTO to avoid bitcode conflicts) ----
$env:CARGO_PROFILE_RELEASE_LTO = "fat"
$env:CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1"
$env:CARGO_PROFILE_RELEASE_PANIC = "abort"
# Bundle & link PCRE2 statically so theres no external DLL dependency
$env:PCRE2_SYS_BUNDLED = "1"
$env:PCRE2_SYS_STATIC = "1"
# Conservative CPU baseline for widest compatibility
$env:RUSTFLAGS = "-C target-cpu=$CPU_BASE -C strip=symbols"
# ---- Build (x86_64 only) ---------------------------------------------------
Write-Host "==> Building x86_64-pc-windows-msvc (PCRE2 bundled, LTO=fat)..."
cargo clean
cargo build --release --features pcre2 --target x86_64-pc-windows-msvc
$bin = Join-Path "target\x86_64-pc-windows-msvc\release" "rg.exe"
if (-not (Test-Path $bin)) {
throw "Build finished but $bin not found."
}
# ---- Copy artifact + quick metadata ----------------------------------------
$out = Join-Path $OUT_DIR "rg-windows-x86_64.exe"
Copy-Item $bin $out -Force
Write-Host "==> Wrote $out"
# Print a quick dependency list if dumpbin exists
if (Get-Command dumpbin.exe -ErrorAction SilentlyContinue) {
Write-Host "==> dumpbin /dependents:"
& dumpbin /dependents $out | Select-String -Pattern "Image has the following dependencies|\.dll"
}
# Checksum for release convenience
try {
$sha = (Get-FileHash -Algorithm SHA256 $out).Hash
Write-Host "SHA256 $sha $(Split-Path -Leaf $out)"
} catch { }
Write-Host "Done."

View File

@ -4,6 +4,7 @@ import argparse
import hashlib
import os
import shutil
import subprocess
import sys
import tempfile
import time
@ -11,10 +12,54 @@ import traceback
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
from buildscripts.s3_binary.hashes import S3_SHA256_HASHES
from buildscripts.util.download_utils import (
download_from_s3_with_boto,
download_from_s3_with_requests,
)
def _run(cmd: list[str]) -> tuple[int, str]:
try:
r = subprocess.run(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=False, text=True
)
return r.returncode, r.stdout
except Exception as e:
return 127, f"{type(e).__name__}: {e}"
def _download_with_curl_or_wget(url: str, out_path: str) -> bool:
"""
Try curl, then wget. Returns True on success.
Respects SSL_CERT_FILE / SSL_CERT_DIR if set.
"""
# curl
curl = shutil.which("curl")
if curl:
code, out = _run(
[
curl,
"--fail",
"--location",
"--silent",
"--show-error",
"--retry",
"3",
"--retry-connrefused",
"--connect-timeout",
"15",
"--output",
out_path,
url,
]
)
if code == 0:
return True
# wget
wget = shutil.which("wget")
if wget:
code, out = _run([wget, "-q", *(_wget_cert_args()), "-O", out_path, url])
if code == 0:
return True
return False
def read_sha_file(filename):
@ -30,14 +75,19 @@ def _fetch_remote_sha256_hash(s3_path: str):
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
tempfile_name = temp_file.name
try:
from buildscripts.util.download_utils import download_from_s3_with_boto
download_from_s3_with_boto(s3_path + ".sha256", temp_file.name)
downloaded = True
except Exception:
try:
from buildscripts.util.download_utils import download_from_s3_with_requests
download_from_s3_with_requests(s3_path + ".sha256", temp_file.name)
downloaded = True
except Exception:
pass
# curl/wget fallback
downloaded = _download_with_curl_or_wget(s3_path + ".sha256", temp_file.name)
if downloaded:
result = read_sha_file(tempfile_name)
@ -95,15 +145,31 @@ def _download_and_verify(s3_path, output_path, remote_sha_allowed, ignore_file_n
for i in range(5):
try:
print(f"Downloading {s3_path}...")
ok = False
try:
from buildscripts.util.download_utils import download_from_s3_with_boto
download_from_s3_with_boto(s3_path, output_path)
ok = True
except Exception:
try:
from buildscripts.util.download_utils import download_from_s3_with_requests
download_from_s3_with_requests(s3_path, output_path, raise_on_error=True)
ok = True
except Exception:
if ignore_file_not_exist:
print("Failed to find remote file. Ignoring and skipping...")
return
ok = False
if not ok:
# curl/wget fallback
ok = _download_with_curl_or_wget(s3_path, output_path)
if not ok:
if ignore_file_not_exist:
print("Failed to find remote file. Ignoring and skipping...")
return
raise RuntimeError("All download methods failed")
validate_file(s3_path, output_path, remote_sha_allowed)
break

View File

@ -30,4 +30,10 @@ S3_SHA256_HASHES = {
"https://mdb-build-public.s3.amazonaws.com/db-contrib-tool-binaries/v2.0.1/db-contrib-tool_v2.0.1_rhel8_ppc64le.gz": "ad0bc6188223abc115a653945ada288ac4f6232ec7226b975bb1efda8b898095",
"https://mdb-build-public.s3.amazonaws.com/db-contrib-tool-binaries/v2.0.1/db-contrib-tool_v2.0.1_rhel9_ppc64le.gz": "73805acc4786df9b414b1b28ce40680cd6c9a9a0fb58712928711ee6786c939d",
"https://mdb-build-public.s3.amazonaws.com/db-contrib-tool-binaries/v2.0.1/db-contrib-tool_v2.0.1_windows_x64.exe.gz": "f138b09612d143fc67c8cc8efb8cfbae13ce50cf8049a7d802c5cd262176346a",
"https://mdb-build-public.s3.amazonaws.com/rg-binaries/v15.1.0/rg-manylinux2014-aarch64": "746beac19b27b866546ff43c5f629327409b933856adeec9652d3853d1658a01",
"https://mdb-build-public.s3.amazonaws.com/rg-binaries/v15.1.0/rg-manylinux2014-x86_64": "6ebf46fc6d69d90cb767abdf850b504e2541a5fd72d6efbd4397c0b7d0dae06d",
"https://mdb-build-public.s3.amazonaws.com/rg-binaries/v15.1.0/rg-manylinux2014-ppc64le": "2755083296eb66b5f7eb90dea74ced923f8fec1837e84a6bff5b878c923e4542",
"https://mdb-build-public.s3.amazonaws.com/rg-binaries/v15.1.0/rg-manylinux2014-s390x": "d018b9a755293ec16289e55b37c4b92d4a51e73fbe7aa3414c1809901e7bde04",
"https://mdb-build-public.s3.amazonaws.com/rg-binaries/v15.1.0/rg-macos-universal2": "eb65e7234928e13db25fe75fdcafd798871f248a9763b49821eab6cd469b2832",
"https://mdb-build-public.s3.amazonaws.com/rg-binaries/v15.1.0/rg-windows-x86_64.exe": "bc3a0a1771ad0b44e5319e0edd0dd8bb8544b6f8ca80a6caa2273f41efe1117b",
}

View File

@ -201,206 +201,7 @@ mongo_cc_library(
"//src/mongo/util:version.cpp",
"//src/mongo/util/concurrency:idle_thread_block.cpp",
"//src/mongo/util/concurrency:thread_name.cpp",
] + select({
"//bazel/config:posix": [
"//src/mongo/util:stacktrace_posix.cpp",
],
"@platforms//os:windows": ["//src/mongo/util:stacktrace_windows.cpp"],
"//conditions:default": [],
}) + select({
"//bazel/config:dev_stacktrace_enabled": [
"//src/mongo/logv2:dev_stacktrace_formatter.cpp",
"//src/mongo/logv2:log_plain.cpp",
],
"//conditions:default": [],
}) + select({
"//bazel/config:posix": ["//src/mongo/platform:shared_library_posix.cpp"],
"@platforms//os:windows": ["//src/mongo/platform:shared_library_windows.cpp"],
"//conditions:default": [],
}) + select({
"@platforms//os:linux": ["//src/mongo/platform:stack_locator_linux.cpp"],
"@platforms//os:macos": ["//src/mongo/platform:stack_locator_osx.cpp"],
"@platforms//os:windows": ["//src/mongo/platform:stack_locator_windows.cpp"],
"//conditions:default": [],
}),
hdrs = [
"//src/mongo/base:checked_cast.h",
"//src/mongo/base:clonable_ptr.h",
"//src/mongo/base:compare_numbers.h",
"//src/mongo/base:counter.h",
"//src/mongo/base:data_cursor.h",
"//src/mongo/base:data_range.h",
"//src/mongo/base:data_range_cursor.h",
"//src/mongo/base:data_type.h",
"//src/mongo/base:data_type_endian.h",
"//src/mongo/base:data_type_terminated.h",
"//src/mongo/base:data_view.h",
"//src/mongo/base:dependency_graph.h",
"//src/mongo/base:encoded_value_storage.h",
"//src/mongo/base:error_codes_header",
"//src/mongo/base:error_extra_info.h",
"//src/mongo/base:init.h",
"//src/mongo/base:initializer.h",
"//src/mongo/base:parse_number.h",
"//src/mongo/base:secure_allocator.h",
"//src/mongo/base:shim.h",
"//src/mongo/base:static_assert.h",
"//src/mongo/base:status.h",
"//src/mongo/base:status_with.h",
"//src/mongo/base:string_data.h",
"//src/mongo/base:string_data_comparator.h",
"//src/mongo/bson:bson_comparator_interface_base.h",
"//src/mongo/bson:bson_depth.h",
"//src/mongo/bson:bson_field.h",
"//src/mongo/bson:bson_utf8.h",
"//src/mongo/bson:bsonelement.h",
"//src/mongo/bson:bsonelement_comparator_interface.h",
"//src/mongo/bson:bsonelementvalue.h",
"//src/mongo/bson:bsonmisc.h",
"//src/mongo/bson:bsonobj.h",
"//src/mongo/bson:bsonobj_comparator_interface.h",
"//src/mongo/bson:bsonobjbuilder.h",
"//src/mongo/bson:bsontypes.h",
"//src/mongo/bson:bsontypes_util.h",
"//src/mongo/bson:generator_extended_canonical_2_0_0.h",
"//src/mongo/bson:generator_extended_relaxed_2_0_0.h",
"//src/mongo/bson:generator_legacy_strict.h",
"//src/mongo/bson:json.h",
"//src/mongo/bson:oid.h",
"//src/mongo/bson:ordering.h",
"//src/mongo/bson:simple_bsonelement_comparator.h",
"//src/mongo/bson:simple_bsonobj_comparator.h",
"//src/mongo/bson:timestamp.h",
"//src/mongo/bson/util:builder.h",
"//src/mongo/bson/util:builder_fwd.h",
"//src/mongo/logv2:attribute_storage.h",
"//src/mongo/logv2:attributes.h",
"//src/mongo/logv2:bson_formatter.h",
"//src/mongo/logv2:component_settings_filter.h",
"//src/mongo/logv2:composite_backend.h",
"//src/mongo/logv2:console.h",
"//src/mongo/logv2:constants.h",
"//src/mongo/logv2:domain_filter.h",
"//src/mongo/logv2:file_rotate_sink.h",
"//src/mongo/logv2:json_formatter.h",
"//src/mongo/logv2:log.h",
"//src/mongo/logv2:log_attr.h",
"//src/mongo/logv2:log_component.h",
"//src/mongo/logv2:log_component_settings.h",
"//src/mongo/logv2:log_debug.h",
"//src/mongo/logv2:log_detail.h",
"//src/mongo/logv2:log_domain.h",
"//src/mongo/logv2:log_domain_global.h",
"//src/mongo/logv2:log_domain_internal.h",
"//src/mongo/logv2:log_format.h",
"//src/mongo/logv2:log_manager.h",
"//src/mongo/logv2:log_options.h",
"//src/mongo/logv2:log_service.h",
"//src/mongo/logv2:log_severity.h",
"//src/mongo/logv2:log_source.h",
"//src/mongo/logv2:log_tag.h",
"//src/mongo/logv2:log_truncation.h",
"//src/mongo/logv2:log_util.h",
"//src/mongo/logv2:plain_formatter.h",
"//src/mongo/logv2:ramlog.h",
"//src/mongo/logv2:ramlog_sink.h",
"//src/mongo/logv2:redaction.h",
"//src/mongo/logv2:shared_access_fstream.h",
"//src/mongo/logv2:tagged_severity_filter.h",
"//src/mongo/logv2:text_formatter.h",
"//src/mongo/logv2:uassert_sink.h",
"//src/mongo/platform:atomic.h",
"//src/mongo/platform:atomic_word.h",
"//src/mongo/platform:bits.h",
"//src/mongo/platform:compiler.h",
"//src/mongo/platform:decimal128.h",
"//src/mongo/platform:endian.h",
"//src/mongo/platform:int128.h",
"//src/mongo/platform:overflow_arithmetic.h",
"//src/mongo/platform:process_id.h",
"//src/mongo/platform:random.h",
"//src/mongo/platform:rwmutex.h",
"//src/mongo/platform:shared_library.h",
"//src/mongo/platform:source_location.h",
"//src/mongo/platform:stack_locator.h",
"//src/mongo/platform:strcasestr.h",
"//src/mongo/platform:strnlen.h",
"//src/mongo/platform:waitable_atomic.h",
"//src/mongo/unittest:stringify.h",
"//src/mongo/util:aligned.h",
"//src/mongo/util:allocator.h",
"//src/mongo/util:assert_util.h",
"//src/mongo/util:assert_util_core.h",
"//src/mongo/util:base64.h",
"//src/mongo/util:bufreader.h",
"//src/mongo/util:clock_source.h",
"//src/mongo/util:ctype.h",
"//src/mongo/util:debug_util.h",
"//src/mongo/util:decimal_counter.h",
"//src/mongo/util:decorable.h",
"//src/mongo/util:duration.h",
"//src/mongo/util:dynamic_catch.h",
"//src/mongo/util:errno_util.h",
"//src/mongo/util:exception_filter_win32.h",
"//src/mongo/util:exit.h",
"//src/mongo/util:exit_code.h",
"//src/mongo/util:file.h",
"//src/mongo/util:functional.h",
"//src/mongo/util:future.h",
"//src/mongo/util:future_impl.h",
"//src/mongo/util:hex.h",
"//src/mongo/util:hierarchical_acquisition.h",
"//src/mongo/util:interruptible.h",
"//src/mongo/util:intrusive_counter.h",
"//src/mongo/util:itoa.h",
"//src/mongo/util:lockable_adapter.h",
"//src/mongo/util:modules.h",
"//src/mongo/util:modules_incompletely_marked_header.h",
"//src/mongo/util:murmur3.h",
"//src/mongo/util:observable_mutex.h",
"//src/mongo/util:observable_mutex_registry.h",
"//src/mongo/util:optional_util.h",
"//src/mongo/util:out_of_line_executor.h",
"//src/mongo/util:quick_exit.h",
"//src/mongo/util:registry_list.h",
"//src/mongo/util:scopeguard.h",
"//src/mongo/util:shared_buffer.h",
"//src/mongo/util:shared_buffer_fragment.h",
"//src/mongo/util:shell_exec.h",
"//src/mongo/util:signal_handlers_synchronous.h",
"//src/mongo/util:stacktrace.h",
"//src/mongo/util:stacktrace_somap.h",
"//src/mongo/util:stacktrace_windows.h",
"//src/mongo/util:static_immortal.h",
"//src/mongo/util:str.h",
"//src/mongo/util:str_basic.h",
"//src/mongo/util:str_escape.h",
"//src/mongo/util:string_map.h",
"//src/mongo/util:synchronized_value.h",
"//src/mongo/util:system_clock_source.h",
"//src/mongo/util:system_tick_source.h",
"//src/mongo/util:testing_proctor.h",
"//src/mongo/util:text.h",
"//src/mongo/util:thread_safety_context.h",
"//src/mongo/util:thread_util.h",
"//src/mongo/util:tick_source.h",
"//src/mongo/util:time_support.h",
"//src/mongo/util:timer.h",
"//src/mongo/util:uuid.h",
"//src/mongo/util:version.h",
"//src/mongo/util:versioned_value.h",
"//src/mongo/util:waitable.h",
"//src/mongo/util/concurrency:idle_thread_block.h",
"//src/mongo/util/concurrency:thread_name.h",
"//src/mongo/util/concurrency:with_lock.h",
"//src/mongo/util/tracking:allocator.h",
] + select({
"//bazel/config:dev_stacktrace_enabled": [
"//src/mongo/logv2:dev_stacktrace_formatter.h",
"//src/mongo/logv2:log_plain.h",
],
"//conditions:default": [],
}),
],
linkopts = select({
"//bazel/config:ssl_enabled_linux": ["-lcrypto"],
"//conditions:default": [],
@ -416,6 +217,33 @@ mongo_cc_library(
"//bazel/config:pgo_profile_generate_gcc_enabled": ["MONGO_GCOV"],
"//conditions:default": [],
}),
srcs_select = [
{
"//bazel/config:posix": [
"//src/mongo/util:stacktrace_posix.cpp",
],
"@platforms//os:windows": ["//src/mongo/util:stacktrace_windows.cpp"],
"//conditions:default": [],
},
{
"//bazel/config:dev_stacktrace_enabled": [
"//src/mongo/logv2:dev_stacktrace_formatter.cpp",
"//src/mongo/logv2:log_plain.cpp",
],
"//conditions:default": [],
},
{
"//bazel/config:posix": ["//src/mongo/platform:shared_library_posix.cpp"],
"@platforms//os:windows": ["//src/mongo/platform:shared_library_windows.cpp"],
"//conditions:default": [],
},
{
"@platforms//os:linux": ["//src/mongo/platform:stack_locator_linux.cpp"],
"@platforms//os:macos": ["//src/mongo/platform:stack_locator_osx.cpp"],
"@platforms//os:windows": ["//src/mongo/platform:stack_locator_windows.cpp"],
"//conditions:default": [],
},
],
deps = [
"//src/mongo/stdx",
"//src/mongo/util:boost_assert_shim",
@ -435,446 +263,42 @@ mongo_cc_library(
"@platforms//os:linux": ["//src/mongo/platform:throw_hook"],
"//conditions:default": [],
}) + select({
"//bazel/config:dev_stacktrace_enabled": ["//src/third_party/cpptrace"],
"//bazel/config:dev_stacktrace_enabled": [
"//src/third_party/cpptrace",
],
"//conditions:default": [],
}),
)
# DO NOT ADD TO THIS UNLESS ABSOLUTELY NECESSARY TO UNBLOCK WORK!!
# This library is added as a global dependency to anything in the src/mongo tree
# and is used as a workaround for any headers added that will require a significant
# refactor to get working (ex. many hours of work). This work needs to be done eventually,
# but if resolving a header cycle is blocking critical work this list can be used to
# defer the refactor until later.
#
# Any header added to this list must reference its own TODO ticket to refactor
# the header graph to not require it to be added globally.
#
# If modifying this list please add the Build team as a reviewer to make sure that
# the header can't be used normally without a large refactor.
#
# This list is an absolute last resort; do not add to this list unless you've put
# significant effort into trying to use a header reference without it.
filegroup(
name = "core_headers",
name = "idl_headers",
srcs = [
"//src/mongo/base:clonable_ptr.h",
"//src/mongo/base:data_type_validated.h",
"//src/mongo/base:encoded_value_storage.h",
"//src/mongo/base:secure_allocator.h",
"//src/mongo/bson:bson_duration.h",
"//src/mongo/bson:bson_time_support.h",
"//src/mongo/bson:bson_validate.h",
"//src/mongo/bson:bson_validate_gen",
"//src/mongo/bson:bsonelement_comparator.h",
"//src/mongo/client:authenticate.h",
"//src/mongo/client:client_api_version_parameters_gen",
"//src/mongo/client:connection_string_hdrs",
"//src/mongo/client:constants.h",
"//src/mongo/client:dbclient_base.h",
"//src/mongo/client:dbclient_cursor.h",
"//src/mongo/client:index_spec.h",
"//src/mongo/client:internal_auth.h",
"//src/mongo/client:mongo_uri.h",
"//src/mongo/client:read_preference.h",
"//src/mongo/client:read_preference_gen",
"//src/mongo/client:read_preference_validators.h",
"//src/mongo/client:sasl_client_session.h",
"//src/mongo/crypto:aead_encryption.h",
"//src/mongo/crypto:encryption_fields_gen",
"//src/mongo/crypto:encryption_fields_validation.h",
"//src/mongo/crypto:fle_crypto_predicate.h",
"//src/mongo/crypto:fle_crypto_types.h",
"//src/mongo/crypto:fle_data_frames.h",
"//src/mongo/crypto:fle_fields_util.h",
"//src/mongo/crypto:fle_tokens.h",
"//src/mongo/crypto:hash_block.h",
"//src/mongo/crypto:sha1_block.h",
"//src/mongo/crypto:sha256_block.h",
"//src/mongo/crypto:symmetric_crypto.h",
"//src/mongo/crypto:symmetric_key.h",
"//src/mongo/db:aggregated_index_usage_tracker.h",
"//src/mongo/db:api_parameters.h",
"//src/mongo/db:api_parameters_gen",
"//src/mongo/db:basic_types.h",
"//src/mongo/db:basic_types_gen",
"//src/mongo/db:baton_hdrs",
"//src/mongo/db:client.h",
"//src/mongo/db:collection_index_usage_tracker.h",
"//src/mongo/base:data_range.h",
"//src/mongo/base:string_data.h",
"//src/mongo/bson:bsonobj.h",
"//src/mongo/bson:bsonobjbuilder.h",
"//src/mongo/bson:simple_bsonobj_comparator.h",
"//src/mongo/db:commands.h",
"//src/mongo/db:database_name_hdrs",
"//src/mongo/db:dbmessage.h",
"//src/mongo/db:feature_compatibility_version_document_gen",
"//src/mongo/db:feature_compatibility_version_parser.h",
"//src/mongo/db:feature_flag.h",
"//src/mongo/db:version_context.h",
"//src/mongo/db:version_context_metadata_gen",
"//src/mongo/db:feature_flag_server_parameter.h",
"//src/mongo/db:field_ref.h",
"//src/mongo/db:index_names.h",
"//src/mongo/db:keypattern.h",
"//src/mongo/db/local_catalog/ddl:list_collections_gen",
"//src/mongo/db:logical_time_hdrs",
"//src/mongo/db:namespace_spec_gen",
"//src/mongo/db:namespace_string_hdrs",
"//src/mongo/db:operation_context_hdrs",
"//src/mongo/db:operation_id_hdrs",
"//src/mongo/db:read_concern_support_result.h",
"//src/mongo/db:read_write_concern_provenance_base_gen",
"//src/mongo/db:read_write_concern_provenance_hdrs",
"//src/mongo/db:record_id.h",
"//src/mongo/db:record_id_helpers_hdrs",
"//src/mongo/db:request_execution_context.h",
"//src/mongo/db:server_options_hdrs",
"//src/mongo/db:server_parameter_hdrs",
"//src/mongo/db:server_parameter_with_storage_hdrs",
"//src/mongo/db:service_context_hdrs",
"//src/mongo/db/sharding_environment:shard_id.h",
"//src/mongo/db:tenant_id_hdrs",
"//src/mongo/db:update_index_data.h",
"//src/mongo/db:write_concern.h",
"//src/mongo/db:write_concern_gen",
"//src/mongo/db:write_concern_idl_hdrs",
"//src/mongo/db:write_concern_options.h",
"//src/mongo/db:write_concern_options_hdrs",
"//src/mongo/db:yieldable.h",
"//src/mongo/db/admission:execution_admission_context_hdrs",
"//src/mongo/db/auth:action_set_hdrs",
"//src/mongo/db/auth:action_type.h",
"//src/mongo/db/auth:action_type_gen",
"//src/mongo/db/auth:action_type_hdrs",
"//src/mongo/db/auth:auth_name.h",
"//src/mongo/db/auth:auth_name_hdrs",
"//src/mongo/db/auth:authorization_manager.h",
"//src/mongo/db/auth:authorization_router.h",
"//src/mongo/db/auth:builtin_roles.h",
"//src/mongo/db/auth:ldap_cumulative_operation_stats.h",
"//src/mongo/db/auth:ldap_operation_stats.h",
"//src/mongo/db/auth:privilege.h",
"//src/mongo/db/auth:privilege_format.h",
"//src/mongo/db/auth:privilege_hdrs",
"//src/mongo/db/auth:resolve_role_option.h",
"//src/mongo/db/auth:resource_pattern.h",
"//src/mongo/db/auth:resource_pattern_hdrs",
"//src/mongo/db/auth:restriction.h",
"//src/mongo/db/auth:restriction_environment.h",
"//src/mongo/db/auth:restriction_set.h",
"//src/mongo/db/auth:role_name.h",
"//src/mongo/db/auth:role_name_or_string.h",
"//src/mongo/db/auth:user.h",
"//src/mongo/db/auth:user_acquisition_stats.h",
"//src/mongo/db/auth:user_cache_access_stats.h",
"//src/mongo/db/auth:user_management_commands_parser_gen",
"//src/mongo/db/auth:user_name.h",
"//src/mongo/db/auth:validated_tenancy_scope.h",
"//src/mongo/db:server_parameter.h",
"//src/mongo/db:server_parameter_with_storage.h",
"//src/mongo/db/auth:authorization_contract.h",
"//src/mongo/db/auth:validated_tenancy_scope_factory.h",
"//src/mongo/db/auth:validated_tenancy_scope_factory_hdrs",
"//src/mongo/db/auth:validated_tenancy_scope_hdrs",
"//src/mongo/db/local_catalog:clustered_collection_options_gen",
"//src/mongo/db/local_catalog:collection.h",
"//src/mongo/db/local_catalog:collection_type.h",
"//src/mongo/db/local_catalog:collection_operation_source.h",
"//src/mongo/db/local_catalog:collection_options.h",
"//src/mongo/db/local_catalog:collection_options_gen",
"//src/mongo/db/local_catalog:collection_options_validation.h",
"//src/mongo/db:database_name_reserved.h",
"//src/mongo/util:database_name_util.h",
"//src/mongo/db/local_catalog:durable_catalog_entry.h",
"//src/mongo/db/local_catalog:durable_catalog_entry_metadata.h",
"//src/mongo/db/local_catalog:index_catalog.h",
"//src/mongo/db/local_catalog:index_catalog_entry.h",
"//src/mongo/db:namespace_string_reserved.h",
"//src/mongo/util:namespace_string_util.h",
"//src/mongo/db/local_catalog/util:partitioned.h",
"//src/mongo/db/local_catalog/shard_role_api:resource_yielder.h",
"//src/mongo/db/local_catalog/shard_role_api:transaction_resources.h",
"//src/mongo/db/local_catalog/shard_role_catalog:collection_metadata.h",
"//src/mongo/db/local_catalog/shard_role_catalog:scoped_collection_metadata.h",
"//src/mongo/db/validate:validate_results.h",
"//src/mongo/db/local_catalog/ddl:create_gen",
"//src/mongo/db/commands:feature_compatibility_version.h",
"//src/mongo/db/commands:fle2_cleanup_gen",
"//src/mongo/db/local_catalog/ddl:list_databases_gen",
"//src/mongo/db/commands/server_status:server_status_metric.h",
"//src/mongo/db/commands:set_feature_compatibility_version_gen",
"//src/mongo/db/commands:test_commands_enabled.h",
"//src/mongo/db/local_catalog:index_descriptor.h",
"//src/mongo/db/local_catalog/lock_manager:cond_var_lock_grant_notification.h",
"//src/mongo/db/local_catalog/lock_manager:d_concurrency.h",
"//src/mongo/db/local_catalog/lock_manager:fast_map_noalloc.h",
"//src/mongo/db/local_catalog/lock_manager:lock_manager_defs.h",
"//src/mongo/db/local_catalog/lock_manager:lock_stats.h",
"//src/mongo/db/local_catalog/lock_manager:locker.h",
"//src/mongo/db/exec:collection_scan_common.h",
"//src/mongo/db/exec:shard_filterer.h",
"//src/mongo/db/exec/classic:working_set.h",
"//src/mongo/db/exec/classic:working_set_common.h",
"//src/mongo/db/exec/document_value:document.h",
"//src/mongo/db/exec/document_value:document_comparator.h",
"//src/mongo/db/exec/document_value:document_internal.h",
"//src/mongo/db/exec/document_value:document_metadata_fields.h",
"//src/mongo/db/exec/document_value:value.h",
"//src/mongo/db/exec/document_value:value_comparator.h",
"//src/mongo/db/exec/document_value:value_internal.h",
"//src/mongo/db/exec/mutable_bson:api.h",
"//src/mongo/db/exec/matcher:match_details.h",
"//src/mongo/db/exec/mutable_bson:const_element.h",
"//src/mongo/db/exec/mutable_bson:document.h",
"//src/mongo/db/exec/mutable_bson:element.h",
"//src/mongo/db/exec/sbe/values:bson.h",
"//src/mongo/db/exec/sbe/values:key_string_entry.h",
"//src/mongo/db/exec/sbe/values:value.h",
"//src/mongo/db/fts:fts_basic_phrase_matcher.h",
"//src/mongo/db/fts:fts_language.h",
"//src/mongo/db/fts:fts_matcher.h",
"//src/mongo/db/fts:fts_phrase_matcher.h",
"//src/mongo/db/fts:fts_query_impl.h",
"//src/mongo/db/fts:fts_spec.h",
"//src/mongo/db/fts:fts_tokenizer.h",
"//src/mongo/db/fts:fts_unicode_phrase_matcher.h",
"//src/mongo/db/fts:stemmer.h",
"//src/mongo/db/fts:stop_words.h",
"//src/mongo/db/fts:tokenizer.h",
"//src/mongo/db/fts/unicode:codepoints.h",
"//src/mongo/db/index:multikey_paths.h",
"//src/mongo/db/index_builds:index_builds.h",
"//src/mongo/db/index_builds:resumable_index_builds_gen",
"//src/mongo/db/matcher:expression.h",
"//src/mongo/db/matcher:expression_leaf.h",
"//src/mongo/db/query/compiler/parsers/matcher:expression_parser.h",
"//src/mongo/db/matcher:expression_path.h",
"//src/mongo/db/matcher:expression_text_base.h",
"//src/mongo/db/matcher:expression_tree.h",
"//src/mongo/db/matcher:expression_type.h",
"//src/mongo/db/matcher:expression_visitor.h",
"//src/mongo/db/matcher:expression_where_base.h",
"//src/mongo/db/matcher:expression_with_placeholder.h",
"//src/mongo/db/matcher:extensions_callback.h",
"//src/mongo/db/matcher:extensions_callback_noop.h",
"//src/mongo/db/matcher:in_list_data.h",
"//src/mongo/db/matcher:matchable.h",
"//src/mongo/db/matcher:matcher_type_set.h",
"//src/mongo/db/matcher:path.h",
"//src/mongo/db/matcher/schema:encrypt_schema_types.h",
"//src/mongo/db/matcher/schema:expression_internal_schema_allowed_properties.h",
"//src/mongo/db/matcher/schema:json_pointer.h",
"//src/mongo/db/pipeline:accumulator_percentile_enum_gen",
"//src/mongo/db/pipeline:change_stream_pre_and_post_images_options_gen",
"//src/mongo/db/query/compiler/dependency_analysis:dependencies.h",
"//src/mongo/db/pipeline:document_path_support.h",
"//src/mongo/db/pipeline:document_source_change_stream_gen",
"//src/mongo/db/pipeline:document_source_merge_gen",
"//src/mongo/db/pipeline:document_source_out_gen",
"//src/mongo/db/pipeline:expression.h",
"//src/mongo/db/pipeline:expression_context.h",
"//src/mongo/db/pipeline:expression_context_builder.h",
"//src/mongo/db/pipeline:expression_visitor.h",
"//src/mongo/db/pipeline:expression_walker.h",
"//src/mongo/db/pipeline:field_path.h",
"//src/mongo/db/pipeline:javascript_execution.h",
"//src/mongo/db/pipeline:lite_parsed_document_source.h",
"//src/mongo/db/pipeline:monotonic_expression.h",
"//src/mongo/db/pipeline:percentile_algo.h",
"//src/mongo/db/pipeline:percentile_algo_accurate.h",
"//src/mongo/db/pipeline:percentile_algo_continuous.h",
"//src/mongo/db/pipeline:percentile_algo_discrete.h",
"//src/mongo/db/pipeline:resume_token.h",
"//src/mongo/db/pipeline:sharded_agg_helpers_targeting_policy.h",
"//src/mongo/db/pipeline:storage_stats_spec_gen",
"//src/mongo/db/pipeline:variables.h",
"//src/mongo/db/pipeline/process_interface:mongo_process_interface.h",
"//src/mongo/db/query:allowed_contexts.h",
"//src/mongo/db/query:bson_typemask.h",
"//src/mongo/db/query:distinct_command_gen",
"//src/mongo/db/query:explain_verbosity_gen",
"//src/mongo/db/query:find_command.h",
"//src/mongo/db/query:find_command_gen",
"//src/mongo/db/query:hint_parser.h",
"//src/mongo/db/query:index_hint.h",
"//src/mongo/db/query/compiler/physical_model/index_bounds:index_bounds.h",
"//src/mongo/db/query/compiler/physical_model/interval:interval.h",
"//src/mongo/db/query:lru_key_value.h",
"//src/mongo/db/query:partitioned_cache.h",
"//src/mongo/db/query:query_feature_flags_gen",
"//src/mongo/db/query:query_knob_configuration.h",
"//src/mongo/db/query:query_knob_expressions.h",
"//src/mongo/db/query:query_knobs_gen",
"//src/mongo/db/query:record_id_bound.h",
"//src/mongo/db/query/compiler/logical_model/sort_pattern:sort_pattern.h",
"//src/mongo/db/query:tailable_mode.h",
"//src/mongo/db/query:tailable_mode_gen",
"//src/mongo/db/query/client_cursor:generic_cursor.h",
"//src/mongo/db/query/client_cursor:generic_cursor_gen",
"//src/mongo/db/query/collation:collation_spec.h",
"//src/mongo/db/query/collation:collator_factory_interface.h",
"//src/mongo/db/query/compiler/optimizer/join:join_predicate.h",
"//src/mongo/db/query/plan_cache:sbe_plan_cache_on_parameter_change.h",
"//src/mongo/db/query/query_settings:index_hints_serialization.h",
"//src/mongo/db/query/query_settings:query_framework_serialization.h",
"//src/mongo/db/query/query_settings:query_settings_comment.h",
"//src/mongo/db/query/query_shape:serialization_options_hdrs",
"//src/mongo/db/query/query_stats:query_stats_on_parameter_change.h",
"//src/mongo/db/query/util:deferred.h",
"//src/mongo/db/query/util:make_data_structure.h",
"//src/mongo/db/query/util:memory_util.h",
"//src/mongo/db/query/util:named_enum.h",
"//src/mongo/db/query/write_ops:single_write_result_gen",
"//src/mongo/db/query/write_ops:update_result.h",
"//src/mongo/db/query/write_ops:write_ops.h",
"//src/mongo/db/query/write_ops:write_ops_exec.h",
"//src/mongo/db/query/write_ops:write_ops_exec_util.h",
"//src/mongo/db/query/write_ops:write_ops_gen",
"//src/mongo/db/query/write_ops:write_ops_parsers.h",
"//src/mongo/db/repl:apply_ops_gen",
"//src/mongo/db/repl:intent_guard.h",
"//src/mongo/db/repl:intent_registry.h",
"//src/mongo/db/repl:member_data.h",
"//src/mongo/db/repl:member_state.h",
"//src/mongo/db/repl:oplog.h",
"//src/mongo/db/repl:oplog_constraint_violation_logger.h",
"//src/mongo/db/repl:oplog_entry.h",
"//src/mongo/db/repl:oplog_entry_or_grouped_inserts.h",
"//src/mongo/db/repl:oplog_entry_serialization.h",
"//src/mongo/db/repl:optime_hdrs",
"//src/mongo/db/repl:read_concern_gen",
"//src/mongo/db/repl:read_concern_level.h",
"//src/mongo/db/repl:repl_client_info.h",
"//src/mongo/db/repl:repl_server_parameters_gen",
"//src/mongo/db/repl:repl_set_heartbeat_response.h",
"//src/mongo/db/repl:repl_settings.h",
"//src/mongo/db/repl:replication_coordinator.h",
"//src/mongo/db/repl:replication_coordinator_fwd.h",
"//src/mongo/db/repl:split_prepare_session_manager.h",
"//src/mongo/db/repl:sync_source_selector.h",
"//src/mongo/db/sharding_environment:range_arithmetic.h",
"//src/mongo/db/session:internal_session_pool.h",
"//src/mongo/db/session:logical_session_cache_gen",
"//src/mongo/db/session:logical_session_id_gen",
"//src/mongo/db/session:logical_session_id_hdrs",
"//src/mongo/db/session:logical_session_id_helpers_hdrs",
"//src/mongo/db/sorter:sorter_gen",
"//src/mongo/db/storage:backup_block.h",
"//src/mongo/db/storage:backup_cursor_hooks.h",
"//src/mongo/db/storage:backup_cursor_state.h",
"//src/mongo/db/storage:compact_options.h",
"//src/mongo/db/storage:container.h",
"//src/mongo/db/storage:duplicate_key_error_info.h",
"//src/mongo/db/storage:ident.h",
"//src/mongo/db/storage:index_entry_comparison.h",
"//src/mongo/db/storage:key_format.h",
"//src/mongo/db/storage:record_data.h",
"//src/mongo/db/storage:record_store_hdrs",
"//src/mongo/db/storage:damage_vector.h",
"//src/mongo/db/storage:recovery_unit_hdrs",
"//src/mongo/db/storage:snapshot.h",
"//src/mongo/db/storage:sorted_data_interface.h",
"//src/mongo/db/storage:spill_table.h",
"//src/mongo/db/storage:storage_engine.h",
"//src/mongo/db/storage:storage_engine_init.h",
"//src/mongo/db/storage:storage_metrics.h",
"//src/mongo/db/storage:storage_stats.h",
"//src/mongo/db/storage:temporary_record_store.h",
"//src/mongo/db/storage:write_unit_of_work.h",
"//src/mongo/db/storage:write_unit_of_work_hdrs",
"//src/mongo/db/timeseries:timeseries_global_options.h",
"//src/mongo/db/update:document_diff_applier.h",
"//src/mongo/db/update:document_diff_serialization.h",
"//src/mongo/db/update:pattern_cmp.h",
"//src/mongo/db/views:view.h",
"//src/mongo/executor:connection_metrics.h",
"//src/mongo/executor:remote_command_request.h",
"//src/mongo/executor:remote_command_response.h",
"//src/mongo/executor:task_executor.h",
"//src/mongo/idl:basic_types_serialization.h",
"//src/mongo/db/query/query_shape:serialization_options.h",
"//src/mongo/idl:command_generic_argument.h",
"//src/mongo/idl:generic_argument.h",
"//src/mongo/idl:generic_argument_gen",
"//src/mongo/idl:idl_parser.h",
"//src/mongo/platform:visibility.h",
"//src/mongo/rpc:get_status_from_command_result.h",
"//src/mongo/rpc:get_status_from_command_result_write_util.h",
"//src/mongo/rpc:message_hdrs",
"//src/mongo/rpc:metadata.h",
"//src/mongo/rpc:object_check.h",
"//src/mongo/rpc:op_msg_hdrs",
"//src/mongo/rpc:protocol.h",
"//src/mongo/rpc:reply_builder_interface.h",
"//src/mongo/rpc:reply_interface.h",
"//src/mongo/rpc:topology_version_gen",
"//src/mongo/rpc:unique_message.h",
"//src/mongo/rpc/metadata:audit_metadata_gen",
"//src/mongo/rpc/metadata:oplog_query_metadata.h",
"//src/mongo/db/global_catalog:chunk.h",
"//src/mongo/db/global_catalog:chunk_manager.h",
"//src/mongo/db/versioning_protocol:chunk_version.h",
"//src/mongo/db/versioning_protocol:database_version.h",
"//src/mongo/db/versioning_protocol:database_version_base_gen",
"//src/mongo/db/global_catalog:shard_key_pattern.h",
"//src/mongo/db/versioning_protocol:shard_version.h",
"//src/mongo/db/versioning_protocol:stale_exception.h",
"//src/mongo/db/global_catalog:type_collection_common_types_gen",
"//src/mongo/db/global_catalog:type_chunk.h",
"//src/mongo/db/global_catalog:type_chunk_base_gen",
"//src/mongo/db/global_catalog:type_chunk_range.h",
"//src/mongo/db/global_catalog:type_chunk_range_base_gen",
"//src/mongo/s/resharding:type_collection_fields_gen",
"//src/mongo/scripting:engine.h",
"//src/mongo/transport:baton.h",
"//src/mongo/transport:message_compressor_base.h",
"//src/mongo/transport:message_compressor_manager.h",
"//src/mongo/transport:service_executor.h",
"//src/mongo/transport:session_hdrs",
"//src/mongo/transport:session_id.h",
"//src/mongo/transport:ssl_connection_context.h",
"//src/mongo/transport:transport_layer.h",
"//src/mongo/util:cancellation.h",
"//src/mongo/util:container_size_helper.h",
"//src/mongo/util:headers",
"//src/mongo/util:inline_memory.h",
"//src/mongo/util:invalidating_lru_cache.h",
"//src/mongo/util:lazily_initialized.h",
"//src/mongo/util:lru_cache.h",
"//src/mongo/util:make_array_type.h",
"//src/mongo/util:modules.h",
"//src/mongo/util:pcre.h",
"//src/mongo/util:periodic_runner.h",
"//src/mongo/util:read_through_cache.h",
"//src/mongo/util:represent_as.h",
"//src/mongo/util:safe_num.h",
"//src/mongo/util:scoped_unlock.h",
"//src/mongo/util:secure_compare_memory.h",
"//src/mongo/rpc:op_msg.h",
"//src/mongo/stdx:unordered_map.h",
"//src/mongo/util:decimal_counter.h",
"//src/mongo/util:overloaded_visitor.h",
"//src/mongo/util:serialization_context.h",
"//src/mongo/util/concurrency:admission_context.h",
"//src/mongo/util/concurrency:headers",
"//src/mongo/util/concurrency:lock_free_read_list.h",
"//src/mongo/util/concurrency:notification.h",
"//src/mongo/util/concurrency:spin_lock.h",
"//src/mongo/util/concurrency:thread_pool_interface.h",
"//src/mongo/util/concurrency:ticketholder.h",
"//src/mongo/util/net:cidr.h",
"//src/mongo/util/net:headers",
"//src/mongo/util/net:hostandport.h",
"//src/mongo/util/net:sock.h",
"//src/mongo/util/net:sockaddr.h",
"//src/mongo/util/net:ssl_manager.h",
"//src/mongo/util/net:ssl_options.h",
"//src/mongo/util/net:ssl_peer_info.h",
"//src/mongo/util/net:ssl_types.h",
"//src/mongo/util/net/ssl:apple.hpp",
"//src/mongo/util/version:releases_header",
#Extras
"//src/mongo/db/query:explain_options.h",
"//src/mongo/db/auth:cluster_auth_mode.h",
"//src/mongo/db/topology:cluster_role.h",
"//src/mongo/db:flow_control_ticketholder.h",
"//src/mongo/db/stats:counter_ops.h",
"//src/mongo/db/query/datetime:date_time_support.h",
"//src/mongo/util:string_map.h",
"//src/mongo/util/options_parser:environment.h",
"//src/mongo/util/options_parser:option_description.h",
"//src/mongo/util/options_parser:option_section.h",
"//src/mongo/util/options_parser:startup_option_init.h",
"//src/mongo/util/options_parser:startup_options.h",
],
)
# Necessary if used in cc_test since it doesn't have a hdrs field
# and will try to compile idl gen files in the core_headers filegroup.
mongo_cc_library(
name = "core_headers_library",
hdrs = ["core_headers"],
)

View File

@ -71,9 +71,6 @@ mongo_cc_library(
srcs = [
"environment_buffer.cpp",
],
hdrs = [
"environment_buffer.h",
],
)
mongo_cc_library(
@ -81,9 +78,6 @@ mongo_cc_library(
srcs = [
"system_error.cpp",
],
hdrs = [
"system_error.h",
],
deps = [
"//src/mongo:base",
],
@ -94,9 +88,6 @@ mongo_cc_library(
srcs = [
"secure_allocator.cpp",
],
hdrs = [
"secure_allocator.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/bson:bson_validate",
@ -130,7 +121,6 @@ mongo_cc_unit_test(
"system_error_test.cpp",
"uuid_test.cpp",
],
private_hdrs = [":data_type_validated.h"],
tags = [
"mongo_unittest_seventh_group",
"platform",

View File

@ -23,14 +23,6 @@ mongo_cc_library(
"bson_validate.cpp",
":bson_validate_gen",
],
hdrs = [
"bson_validate.h",
"//src/mongo/crypto:encryption_fields_util.h",
"//src/mongo/crypto:fle_field_schema_gen",
],
header_deps = [
"//src/mongo/db/pipeline/process_interface:mongo_process_interface",
],
deps = [
"//src/mongo:base",
"//src/mongo/bson/column",
@ -55,10 +47,6 @@ mongo_cc_unit_test(
"ordering_test.cpp",
"simple_bsonobj_comparator_test.cpp",
],
private_hdrs = [
":bsonelement_comparator.h",
":bsonobj_comparator.h",
],
tags = [
"mongo_unittest_first_group",
"server-programmability",
@ -90,7 +78,6 @@ mongo_cc_fuzzer_test(
"bson_validate_fuzzer.cpp",
"bson_validate_old.cpp",
],
private_hdrs = [":bson_validate_old.h"],
deps = [
"//src/mongo:base",
"//src/mongo/bson:bson_validate",

View File

@ -18,23 +18,6 @@ mongo_cc_library(
"bsoncolumnbuilder.cpp",
"simple8b_type_util.cpp",
],
hdrs = [
"binary_reopen.h",
"bson_element_storage.h",
"bsoncolumn.h",
"bsoncolumn.inl",
"bsoncolumn_helpers.h",
"bsoncolumn_interleaved.h",
"bsoncolumn_util.h",
"bsoncolumnbuilder.h",
"bsonobj_traversal.h",
"simple8b.h",
"simple8b.inl",
"simple8b_builder.h",
"simple8b_helpers.h",
"simple8b_type_util.h",
"//src/mongo/util:overloaded_visitor.h",
],
deps = [
"//src/mongo:base",
],
@ -45,9 +28,6 @@ mongo_cc_library(
srcs = [
"bsoncolumn_fuzzer_impl.cpp",
],
hdrs = [
"bsoncolumn_fuzzer_impl.h",
],
deps = [
":column",
"//src/mongo:base",
@ -59,11 +39,6 @@ mongo_cc_library(
srcs = [
"bsoncolumn_fuzzer_util.cpp",
],
hdrs = [
"bsoncolumn_expressions.h",
"bsoncolumn_expressions_internal.h",
"bsoncolumn_fuzzer_util.h",
],
deps = [
":column",
"//src/mongo:base",
@ -76,11 +51,6 @@ mongo_cc_library(
srcs = [
"bsoncolumn_test_util.cpp",
],
hdrs = [
"bsoncolumn_expressions.h",
"bsoncolumn_expressions_internal.h",
"bsoncolumn_test_util.h",
],
deps = [
":column",
"//src/mongo:base",

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"dotted_path_support.cpp",
],
hdrs = [
"dotted_path_support.h",
],
deps = [
"//src/mongo:base",
],

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"bson_extract.cpp",
],
hdrs = [
"bson_extract.h",
],
deps = [
"//src/mongo:base",
],
@ -29,12 +26,10 @@ mongo_cc_unit_test(
"bson_extract_test.cpp",
"builder_test.cpp",
],
private_hdrs = [":bson_check.h"],
tags = ["mongo_unittest_eighth_group"],
deps = [
":bson_extract",
"//src/mongo:base",
"//src/mongo:core_headers_library",
"//src/mongo/util:safe_num",
],
)

View File

@ -18,14 +18,6 @@ mongo_cc_library(
"connection_string.cpp",
"mongo_uri.cpp",
],
hdrs = [
"connection_string.h",
"mongo_uri.h",
],
private_hdrs = [
"//src/mongo/db/auth:sasl_command_constants.h",
"//src/mongo/util:dns_name.h",
],
deps = [
"//src/mongo/util:dns_query",
"//src/mongo/util/net:network",
@ -38,9 +30,6 @@ mongo_cc_library(
srcs = [
"internal_auth.cpp",
],
hdrs = [
"internal_auth.h",
],
deps = [
":connection_string",
"//src/mongo/bson/util:bson_extract",
@ -96,33 +85,15 @@ mongo_cc_library(
"sasl_oidc_client_types_gen",
"sasl_plain_client_conversation.cpp",
"sasl_scram_client_conversation.cpp",
] + select({
],
srcs_select = [{
"//bazel/config:ssl_enabled": [
"sasl_aws_client_conversation.cpp",
"sasl_aws_client_options_gen",
"sasl_x509_client_conversation.cpp",
],
"//conditions:default": [],
}),
hdrs = [
"native_sasl_client_session.h",
"sasl_aws_client_options.h",
"sasl_client_authenticate.h",
"sasl_client_conversation.h",
"sasl_client_session.h",
"sasl_oidc_client_conversation.h",
"sasl_oidc_client_params.h",
"sasl_plain_client_conversation.h",
"sasl_scram_client_conversation.h",
"sasl_x509_client_conversation.h",
"scram_client_cache.h",
"//src/mongo/crypto:mechanism_scram.h",
] + select({
"//bazel/config:ssl_enabled": [
"sasl_aws_client_conversation.h",
],
"//conditions:default": [],
}),
}],
deps = [
":connection_string",
"//src/mongo/base:secure_allocator", # TODO(SERVER-93876): Remove.
@ -152,9 +123,6 @@ mongo_cc_library(
srcs = [
"authenticate.cpp",
],
hdrs = [
"authenticate.h",
],
deps = [
":connection_string", # TODO(SERVER-93876): Remove.
":internal_auth", # TODO(SERVER-93876): Remove.
@ -171,9 +139,6 @@ mongo_cc_library(
srcs = [
"async_client.cpp",
],
hdrs = [
"async_client.h",
],
deps = [
":authentication",
"//src/mongo/db:connection_health_metrics_parameter", # TODO(SERVER-93876): Remove.
@ -234,11 +199,6 @@ mongo_cc_library(
"index_spec.cpp",
"mongo_shell_options_gen",
],
hdrs = [
"dbclient_base.h",
"dbclient_cursor.h",
"index_spec.h",
],
deps = [
":authentication",
":connection_string", # TODO(SERVER-93876): Remove.
@ -263,6 +223,17 @@ idl_generator(
],
)
mongo_cc_library(
name = "grpc_clientdriver_network",
srcs = [
"dbclient_grpc_stream.cpp",
],
no_undefined_ref_DO_NOT_USE = False,
deps = [
"//src/mongo/transport/grpc:grpc_transport_layer",
],
)
mongo_cc_library(
name = "clientdriver_network",
srcs = [
@ -284,35 +255,7 @@ mongo_cc_library(
"streamable_replica_set_monitor_discovery_time_processor.cpp",
"streamable_replica_set_monitor_error_handler.cpp",
"streamable_replica_set_monitor_query_processor.cpp",
] + select({
"//bazel/config:build_grpc_enabled": [
"dbclient_grpc_stream.cpp",
],
"//conditions:default": [],
}),
hdrs = [
"connpool.h",
"dbclient_connection.h",
"dbclient_rs.h",
"dbclient_session.h",
"global_conn_pool.h",
"replica_set_change_notifier.h",
"replica_set_monitor.h",
"replica_set_monitor_interface.h",
"replica_set_monitor_manager.h",
"replica_set_monitor_stats.h",
"server_discovery_monitor.h",
"server_ping_monitor.h",
"streamable_replica_set_monitor.h",
"streamable_replica_set_monitor_discovery_time_processor.h",
"streamable_replica_set_monitor_error_handler.h",
"streamable_replica_set_monitor_query_processor.h",
] + select({
"//bazel/config:build_grpc_enabled": [
"dbclient_grpc_stream.h",
],
"//conditions:default": [],
}),
],
deps = [
":clientdriver_minimal",
":read_preference", # TODO(SERVER-93876): Remove.
@ -335,6 +278,7 @@ mongo_cc_library(
"//src/mongo/util/net:ssl_manager",
] + select({
"//bazel/config:build_grpc_enabled": [
"grpc_clientdriver_network",
"//src/mongo/transport/grpc:grpc_transport_layer",
],
"//conditions:default": [],
@ -377,10 +321,6 @@ mongo_cc_library(
srcs = [
":sasl_aws_protocol_common_gen",
],
hdrs = [
"//src/mongo/db:basic_types_gen",
"//src/mongo/db/query:explain_verbosity_gen",
],
deps = [
"//src/mongo/db:server_base",
],
@ -392,9 +332,6 @@ mongo_cc_library(
"replica_set_monitor_server_parameters.cpp",
":replica_set_monitor_server_parameters_gen",
],
hdrs = [
"replica_set_monitor_server_parameters.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -406,16 +343,6 @@ mongo_cc_library(
"sasl_aws_client_protocol.cpp",
"sasl_aws_client_protocol_gen",
],
hdrs = [
"sasl_aws_client_protocol.h",
"sasl_aws_protocol_common.h",
"sasl_aws_protocol_common_gen",
"//src/mongo/bson:bson_validate_gen",
"//src/mongo/util:kms_message_support.h",
],
header_deps = [
"//src/mongo/db/repl:oplog_buffer_batched_queue",
],
target_compatible_with = select({
"//bazel/config:ssl_enabled": [],
"//conditions:default": ["@platforms//:incompatible"],
@ -444,9 +371,6 @@ mongo_cc_library(
srcs = [
"remote_command_retry_scheduler.cpp",
],
hdrs = [
"remote_command_retry_scheduler.h",
],
deps = [
":retry_strategy",
"//src/mongo:base", # TODO(SERVER-93876): Remove.
@ -459,9 +383,6 @@ mongo_cc_library(
srcs = [
"fetcher.cpp",
],
hdrs = [
"fetcher.h",
],
deps = [
":remote_command_retry_scheduler",
":retry_strategy",
@ -480,13 +401,6 @@ mongo_cc_library(
"remote_command_targeter_rs.cpp",
"remote_command_targeter_standalone.cpp",
],
hdrs = [
"remote_command_targeter.h",
"remote_command_targeter_factory.h",
"remote_command_targeter_factory_impl.h",
"remote_command_targeter_rs.h",
"remote_command_targeter_standalone.h",
],
deps = [
":clientdriver_network",
"//src/mongo:base",
@ -507,10 +421,6 @@ mongo_cc_library(
"sasl_sspi_options.cpp",
"sasl_sspi_options_gen",
],
hdrs = [
"cyrus_sasl_client_session.h",
"sasl_sspi_options.h",
],
linkopts = [
"-lsasl2",
] + select({
@ -536,10 +446,6 @@ mongo_cc_library(
"remote_command_targeter_factory_mock.cpp",
"remote_command_targeter_mock.cpp",
],
hdrs = [
"remote_command_targeter_factory_mock.h",
"remote_command_targeter_mock.h",
],
deps = [
":remote_command_targeter",
"//src/mongo/client:retry_strategy",
@ -553,9 +459,6 @@ mongo_cc_library(
srcs = [
"streamable_replica_set_monitor_for_testing.cpp",
],
hdrs = [
"streamable_replica_set_monitor_for_testing.h",
],
deps = [
":replica_set_monitor_protocol_test_util",
"//src/mongo/client:clientdriver_network",
@ -569,9 +472,6 @@ mongo_cc_library(
srcs = [
"replica_set_monitor_protocol_test_util.cpp",
],
hdrs = [
"replica_set_monitor_protocol_test_util.h",
],
deps = [
"clientdriver_network",
],
@ -580,7 +480,6 @@ mongo_cc_library(
mongo_cc_library(
name = "dbclient_mockcursor",
srcs = ["dbclient_mockcursor.cpp"],
hdrs = ["dbclient_mockcursor.h"],
deps = ["clientdriver_minimal"],
)
@ -609,10 +508,6 @@ mongo_cc_unit_test(
data = [
"//src/mongo/client/mongo_uri_tests:test_data",
],
private_hdrs = [
"//src/mongo/util:executor_test_util.h",
"//src/mongo/util:future_test_utils.h",
],
tags = ["mongo_unittest_fourth_group"],
target_compatible_with = select({
"//bazel/config:use_wiredtiger_enabled": [],
@ -638,7 +533,6 @@ mongo_cc_unit_test(
"//src/mongo/executor:network_interface_mock",
"//src/mongo/executor:task_executor_test_fixture",
"//src/mongo/executor:thread_pool_task_executor_test_fixture",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/rpc:command_status",
"//src/mongo/transport:transport_layer_common",
"//src/mongo/unittest:task_executor_proxy",
@ -658,7 +552,6 @@ mongo_cc_unit_test(
":replica_set_monitor_test_helper",
"//src/mongo/db:service_context_test_fixture",
"//src/mongo/dbtests:mocklib",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/util:clock_source_mock",
],
)
@ -761,9 +654,6 @@ mongo_cc_library(
srcs = [
"backoff_with_jitter.cpp",
],
hdrs = [
"backoff_with_jitter.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -775,13 +665,8 @@ mongo_cc_library(
"retry_strategy.cpp",
":retry_strategy_server_parameters_gen",
],
hdrs = [
"retry_strategy.h",
"//src/mongo/base:error_codes_header",
],
deps = [
":backoff_with_jitter",
"//src/mongo:core_headers_library",
"//src/mongo/db:error_labels",
"//src/third_party/folly:folly_token_bucket",
],

View File

@ -27,18 +27,6 @@ mongo_cc_library(
"topology_state_machine.cpp",
":sdam_configuration_parameters_gen",
],
hdrs = [
"election_id_set_version_pair.h",
"sdam.h",
"sdam_configuration.h",
"sdam_datatypes.h",
"server_description.h",
"server_selector.h",
"topology_description.h",
"topology_listener.h",
"topology_manager.h",
"topology_state_machine.h",
],
deps = [
"//src/mongo/client:read_preference", # TODO(SERVER-93876): Remove.
"//src/mongo/db:server_base",
@ -63,13 +51,6 @@ mongo_cc_library(
"topology_description_builder.cpp",
"topology_listener_mock.cpp",
],
hdrs = [
"mock_topology_manager.h",
"sdam_test_base.h",
"server_description_builder.h",
"topology_description_builder.h",
"topology_listener_mock.h",
],
deps = [
":sdam",
"//src/mongo:base",
@ -82,9 +63,6 @@ mongo_cc_library(
"json_test_arg_parser.cpp",
":json_test_runner_cli_options_gen",
],
hdrs = [
"json_test_arg_parser.h",
],
deps = [
":sdam",
"//src/mongo:base",

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"aead_encryption.cpp",
],
hdrs = [
"aead_encryption.h",
],
deps = [
":fle_fields",
":sha_block",
@ -43,10 +40,6 @@ mongo_cc_library(
"encryption_fields_validation.cpp",
"fle_numeric.cpp",
],
hdrs = [
"encryption_fields_validation.h",
"fle_numeric.h",
],
deps = [
"//src/mongo/db:common", # TODO(SERVER-93876): Remove.
"//src/mongo/db:server_base", # TODO(SERVER-93876): Remove.
@ -61,9 +54,6 @@ mongo_cc_library(
"fle_field_schema_gen",
"fle_fields_util.cpp",
],
hdrs = [
"fle_fields_util.h",
],
deps = [
":encrypted_field_config",
":fle_tokens",
@ -79,15 +69,6 @@ mongo_cc_library(
"mongocryptbuffer.cpp",
"mongocryptstatus.cpp",
],
hdrs = [
"fle_util.h",
"libbsonvalue.h",
"mongocrypt_definitions.h",
"mongocryptbuffer.h",
"mongocryptstatus.h",
"//src/mongo/base:data_type_validated.h", # Validated<BSONObj>
"//src/mongo/rpc:object_check.h", # Validated<BSONObj>
],
local_defines = [
"MLIB_USER",
],
@ -109,14 +90,6 @@ mongo_cc_library(
"fle_stats_gen",
"fle_tags.cpp",
],
hdrs = [
"encryption_fields_util.h",
"fle_crypto.h",
"fle_crypto_predicate.h",
"fle_crypto_types.h",
"fle_stats.h",
"fle_tags.h",
],
local_defines = [
"MLIB_USER",
],
@ -178,11 +151,6 @@ mongo_cc_library(
"fle_tokens.cpp",
":fle_tokens_gen",
],
hdrs = [
"fle_key_types.h",
"fle_tokens.h",
"//src/mongo:core_headers",
],
local_defines = [
"MLIB_USER",
],
@ -240,11 +208,6 @@ mongo_cc_library(
srcs = [
"sha1_block.cpp",
],
hdrs = [
"hash_block.h",
"sha1_block.h",
"//src/mongo:core_headers",
],
deps = [
"//src/mongo:base",
"//src/mongo/util:secure_compare_memory",
@ -256,11 +219,6 @@ mongo_cc_library(
srcs = [
"sha256_block.cpp",
],
hdrs = [
"hash_block.h",
"sha256_block.h",
"//src/mongo:core_headers",
],
deps = [
"//src/mongo:base",
"//src/mongo/util:secure_compare_memory",
@ -287,6 +245,7 @@ mongo_cc_library(
hdrs = [
"sha512_block.h",
],
auto_header = False,
local_defines = select({
"//bazel/config:mongo_crypto_tom": ["LTC_NO_PROTOTYPES"],
"//conditions:default": [],
@ -314,7 +273,8 @@ mongo_cc_library(
srcs = [
"symmetric_crypto.cpp",
"symmetric_key.cpp",
] + select({
],
srcs_select = [{
"//bazel/config:mongo_crypto_{}".format(mongo_crypto): ["symmetric_crypto_{}.cpp".format(mongo_crypto)]
for mongo_crypto in [
"windows",
@ -324,12 +284,7 @@ mongo_cc_library(
]
} | {
"//conditions:default": [],
}),
hdrs = [
"block_packer.h",
"symmetric_crypto.h",
"symmetric_key.h",
],
}],
deps = [
"//src/mongo/base:secure_allocator",
"//src/mongo/util:secure_zero_memory",
@ -352,7 +307,8 @@ mongo_cc_library(
"jwks_fetcher_impl.cpp",
"jws_validated_token.cpp",
":jwt_parameters_gen",
] + select({
],
srcs_select = [{
"//bazel/config:ssl_provider_{}".format(provider): [
"jws_validator_{}.cpp".format(provider),
]
@ -362,14 +318,7 @@ mongo_cc_library(
"windows",
"none",
]
}),
hdrs = [
"jwk_manager.h",
"jwks_fetcher.h",
"jwks_fetcher_impl.h",
"jws_validated_token.h",
"jws_validator.h",
],
}],
deps = [
":jwt_types",
"//src/mongo:base",
@ -383,12 +332,7 @@ mongo_cc_library(
mongo_cc_library(
name = "jwk_manager_test_framework",
srcs = [],
hdrs = [
"jwk_manager_test_framework.h",
"jwks_fetcher_mock.h",
],
deps = [
"//src/mongo/idl:server_parameter_test_controller",
],
)
@ -410,22 +354,11 @@ mongo_cc_unit_test(
"sha256_block_test.cpp",
"sha512_block_test.cpp",
"symmetric_crypto_test.cpp",
] + select({
],
srcs_select = [{
"//bazel/config:mongo_crypto_openssl": ["jwt_test.cpp"],
"//conditions:default": [],
}),
private_hdrs = [
"//src/mongo/crypto/test_vectors:edges_decimal128.cstruct.h",
"//src/mongo/crypto/test_vectors:edges_double.cstruct.h",
"//src/mongo/crypto/test_vectors:edges_int32.cstruct.h",
"//src/mongo/crypto/test_vectors:edges_int64.cstruct.h",
"//src/mongo/crypto/test_vectors:mincover_decimal128.cstruct.h",
"//src/mongo/crypto/test_vectors:mincover_decimal128_precision.cstruct.h",
"//src/mongo/crypto/test_vectors:mincover_double.cstruct.h",
"//src/mongo/crypto/test_vectors:mincover_double_precision.cstruct.h",
"//src/mongo/crypto/test_vectors:mincover_int32.cstruct.h",
"//src/mongo/crypto/test_vectors:mincover_int64.cstruct.h",
],
}],
tags = ["mongo_unittest_eighth_group"],
deps = [
":aead_encryption",
@ -454,7 +387,6 @@ mongo_cc_unit_test(
"jws_validated_token_test.cpp",
"jws_validator_test.cpp",
],
private_hdrs = [":jwks_fetcher_mock.h"],
tags = ["mongo_unittest_fourth_group"],
target_compatible_with = select({
"//bazel/config:mongo_crypto_openssl": [],

File diff suppressed because it is too large Load Diff

View File

@ -23,9 +23,6 @@ mongo_cc_library(
"ingress_request_rate_limiter.cpp",
":ingress_request_rate_limiter_gen",
],
hdrs = [
"ingress_request_rate_limiter.h",
],
deps = [
":rate_limiter",
"//src/mongo:base",
@ -48,9 +45,6 @@ mongo_cc_library(
"ingress_admission_controller.cpp",
":ingress_admission_control_gen",
],
hdrs = [
"ingress_admission_controller.h",
],
deps = [
":ingress_admission_context",
":rate_limiter",
@ -71,11 +65,6 @@ mongo_cc_library(
"throughput_probing_gen",
"ticketing_system.cpp",
],
hdrs = [
"concurrency_adjustment_validator.h",
"throughput_probing.h",
"ticketing_system.h",
],
no_undefined_ref_DO_NOT_USE = False,
deps = [
"//src/mongo/db:server_base",
@ -116,9 +105,6 @@ mongo_cc_library(
srcs = [
"execution_admission_context.cpp",
],
hdrs = [
"execution_admission_context.h",
],
deps = [
"//src/mongo/util/concurrency:admission_context",
],
@ -129,9 +115,6 @@ mongo_cc_library(
srcs = [
"ingress_admission_context.cpp",
],
hdrs = [
"ingress_admission_context.h",
],
deps = [
"//src/mongo/db:service_context",
"//src/mongo/util/concurrency:admission_context",
@ -143,9 +126,6 @@ mongo_cc_library(
srcs = [
"rate_limiter.cpp",
],
hdrs = [
"rate_limiter.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:server_base",
@ -174,9 +154,6 @@ mongo_cc_library(
srcs = [
"flow_control.cpp",
],
hdrs = [
"flow_control.h",
],
deps = [
":flow_control_parameters",
"//src/mongo/db:server_base",

View File

@ -16,9 +16,6 @@ mongo_cc_library(
srcs = [
"cluster_auth_mode.cpp",
],
hdrs = [
"cluster_auth_mode.h",
],
deps = [
"//src/mongo:base",
],
@ -68,12 +65,6 @@ mongo_cc_library(
"address_restriction.cpp",
":address_restriction_gen",
],
private_hdrs = [
":address_restriction.h",
":restriction.h",
":restriction_environment.h",
":restriction_set.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/idl:idl_parser", # TODO(SERVER-93876): Remove.
@ -136,14 +127,6 @@ mongo_cc_library(
"authz_session_external_state.cpp",
":authorization_manager_impl_parameters_gen",
],
hdrs = [
"authorization_manager_impl.h",
"authorization_router_impl.h",
"authorization_session_impl.h",
"authz_session_external_state.h",
"resource_pattern_search_list.h",
],
private_hdrs = [":user_request_x509.h"],
deps = [
":address_restriction",
":auth",
@ -189,9 +172,6 @@ mongo_cc_library(
"user_cache_invalidator_job.cpp",
":user_cache_invalidator_job_parameters_gen",
],
hdrs = [
"user_cache_invalidator_job.h",
],
deps = [
":auth",
":authorization_manager_global",
@ -215,9 +195,6 @@ mongo_cc_library(
srcs = [
"security_key.cpp",
],
hdrs = [
"security_key.h",
],
deps = [
":auth",
":cluster_auth_mode",
@ -239,10 +216,6 @@ mongo_cc_library(
"authorization_manager_global.cpp",
"authorization_manager_global_parameters_gen",
],
hdrs = [
"authorization_manager_impl.h",
"authorization_router_impl.h",
],
deps = [
":auth",
":cluster_auth_mode",
@ -271,10 +244,6 @@ mongo_cc_library(
"sasl_payload.cpp",
":sasl_commands_gen",
],
hdrs = [
"sasl_commands.h",
"sasl_payload.h",
],
deps = [
":auth",
":auth_impl_internal",
@ -292,9 +261,6 @@ mongo_cc_library(
srcs = [
"security_file.cpp",
],
hdrs = [
"security_file.h",
],
deps = [
"//src/mongo:base",
"//src/third_party/yaml-cpp:yaml",
@ -344,16 +310,6 @@ mongo_cc_library(
"privilege.cpp",
"resource_pattern.cpp",
],
hdrs = [
"access_checks_gen",
"action_type_gen",
"auth_types_gen",
"authorization_contract_guard.h",
"parsed_privilege_gen",
"//src/mongo/db:basic_types_gen",
"//src/mongo/db/auth:privilege_format.h",
"//src/mongo/db/query:explain_verbosity_gen",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:common",
@ -370,10 +326,6 @@ mongo_cc_library(
"oauth_discovery_factory.cpp",
"oidc_protocol_gen",
],
hdrs = [
"oauth_discovery_factory.h",
"//src/mongo/db/query:explain_verbosity_gen",
],
deps = [
"//src/mongo:base",
"//src/mongo/idl:idl_parser",
@ -386,20 +338,6 @@ mongo_cc_library(
srcs = [
"sasl_options.cpp",
],
hdrs = [
"sasl_options.h",
"//src/mongo/db/auth:sasl_options_gen",
"//src/mongo/util/options_parser:constraints.h",
"//src/mongo/util/options_parser:environment.h",
"//src/mongo/util/options_parser:option_description.h",
"//src/mongo/util/options_parser:option_section.h",
"//src/mongo/util/options_parser:startup_option_init.h",
"//src/mongo/util/options_parser:startup_options.h",
"//src/mongo/util/options_parser:value.h",
],
header_deps = [
"//src/mongo/db/commands/server_status:server_status_core",
],
deps = [
"//src/mongo/db:server_base",
"//src/mongo/db/exec/document_value",
@ -438,9 +376,6 @@ mongo_cc_library(
srcs = [
"role_name_or_string.cpp",
],
hdrs = [
"role_name_or_string.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -458,14 +393,6 @@ mongo_cc_library(
"authorization_manager_factory.cpp",
"authorization_router.cpp",
],
hdrs = [
"authorization_backend_interface.h",
"authorization_client_handle.h",
"authorization_manager_factory.h",
"//src/mongo/db/commands:authentication_commands.h",
"//src/mongo/util:sequence_util.h",
],
private_hdrs = ["//src/mongo/util/concurrency:thread_pool.h"],
deps = [
"auth_options",
"cluster_auth_mode",
@ -489,15 +416,6 @@ mongo_cc_library(
"authz_session_external_state_shard.cpp",
":enable_localhost_auth_bypass_parameter_gen",
],
hdrs = [
"authorization_backend_local.h",
"authorization_client_handle_router.h",
"authorization_client_handle_shard.h",
"authorization_manager_factory_impl.h",
"authz_session_external_state_router.h",
"authz_session_external_state_server_common.h",
"authz_session_external_state_shard.h",
],
deps = [
":auth",
":authorization_manager_global",
@ -522,12 +440,6 @@ mongo_cc_library(
"authorization_manager_factory_mock.cpp",
"authz_session_external_state_mock.cpp",
],
hdrs = [
"authorization_backend_mock.h",
"authorization_manager_factory_mock.h",
"authorization_router_impl_for_test.h",
"authz_session_external_state_mock.h",
],
deps = [
":auth",
":auth_impl_internal",
@ -546,10 +458,6 @@ mongo_cc_library(
srcs = [
"authorization_checks.cpp",
],
hdrs = [
"authorization_checks.h",
"//src/mongo/db/local_catalog/ddl:coll_mod_gen",
],
deps = [
":auth",
":authprivilege",
@ -570,9 +478,6 @@ mongo_cc_library(
srcs = [
"user_management_commands_parser.cpp",
],
hdrs = [
"user_management_commands_parser.h",
],
deps = [
":address_restriction", # TODO(SERVER-93876): Remove.
":auth",
@ -590,9 +495,6 @@ mongo_cc_library(
srcs = [
"builtin_roles.cpp",
],
hdrs = [
"builtin_roles.h",
],
deps = [
"auth",
"auth_options",
@ -619,10 +521,6 @@ mongo_cc_library(
"security_token_authentication_guard.cpp",
"validated_tenancy_scope_factory.cpp",
],
hdrs = [
"security_token_authentication_guard.h",
"validated_tenancy_scope_factory.h",
],
deps = [
"authprivilege",
"security_token",
@ -640,9 +538,6 @@ mongo_cc_library(
srcs = [
"user.cpp",
],
hdrs = [
"user.h",
],
deps = [
"auth",
"authprivilege",
@ -658,11 +553,6 @@ mongo_cc_library(
"ldap_operation_stats.cpp",
"user_cache_access_stats.cpp",
],
hdrs = [
"ldap_cumulative_operation_stats.h",
"ldap_operation_stats.h",
"user_cache_access_stats.h",
],
deps = [
"auth",
"//src/mongo/db:server_base",
@ -675,9 +565,6 @@ mongo_cc_library(
srcs = [
"user_document_parser.cpp",
],
hdrs = [
"user_document_parser.h",
],
deps = [
"address_restriction",
"auth",
@ -704,9 +591,6 @@ mongo_cc_library(
"oidc_protocol_gen",
"x509_protocol_gen",
],
hdrs = [
"oauth_discovery_factory.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/idl:idl_parser",
@ -719,10 +603,6 @@ mongo_cc_library(
srcs = [
"user_request_x509.cpp",
],
hdrs = [
"user_name.h",
"user_request_x509.h",
],
deps = [
":auth",
":user",
@ -740,27 +620,14 @@ mongo_cc_library(
"sasl_mechanism_registry.cpp",
"sasl_plain_server_conversation.cpp",
"sasl_scram_server_conversation.cpp",
] + select({
],
private_hdrs = ["//src/mongo/crypto:mechanism_scram.h"],
srcs_select = [{
"//bazel/config:ssl_enabled": [
"sasl_x509_server_conversation.cpp",
],
"//conditions:default": [],
}),
hdrs = [
"authentication_metrics.h",
"authentication_session.h",
"sasl_command_constants.h",
"sasl_mechanism_policies.h",
"sasl_mechanism_registry.h",
"sasl_plain_server_conversation.h",
"sasl_scram_server_conversation.h",
] + select({
"//bazel/config:ssl_enabled": [
"sasl_x509_server_conversation.h",
],
"//conditions:default": [],
}),
private_hdrs = ["//src/mongo/crypto:mechanism_scram.h"],
}],
deps = [
# TODO(SERVER-93876): Remove all except authorization_manager_global.
"//src/mongo/base:secure_allocator",
@ -791,9 +658,6 @@ mongo_cc_library(
srcs = [
"authentication_session.cpp",
],
hdrs = [
"authentication_session.h",
],
deps = [
":auth", # TODO(SERVER-93876): Remove.
":saslauth",
@ -809,9 +673,6 @@ mongo_cc_library(
srcs = [
"auth_op_observer.cpp",
],
hdrs = [
"auth_op_observer.h",
],
deps = [
":auth",
"//src/mongo:base",
@ -830,10 +691,6 @@ mongo_cc_library(
"authorization_session_for_test.cpp",
"authorization_session_test_fixture.cpp",
],
hdrs = [
"authorization_session_for_test.h",
"authorization_session_test_fixture.h",
],
deps = [
":auth",
":auth_impl_internal",
@ -869,17 +726,14 @@ mongo_cc_unit_test(
"user_acquisition_stats_test.cpp",
"user_document_parser_test.cpp",
"validated_tenancy_scope_test.cpp",
] + select({
"//bazel/config:ssl_enabled": ["sasl_x509_test.cpp"],
"//conditions:default": [],
}),
],
data = [
"//jstests/libs:test_pem_files",
],
private_hdrs = [
":authorization_router_impl_for_test.h",
":restriction_mock.h",
],
srcs_select = [{
"//bazel/config:ssl_enabled": ["sasl_x509_test.cpp"],
"//conditions:default": [],
}],
tags = [
# Segfaults in sandbox
"code_coverage_quarantine",
@ -899,8 +753,6 @@ mongo_cc_unit_test(
":user",
":user_request_x509",
"//src/mongo:base",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/util:tick_source_mock",
"//src/mongo/util/net:mock_http_client",
],
)

View File

@ -38,6 +38,7 @@
#include "mongo/db/change_stream_options_gen.h"
#include "mongo/db/change_stream_options_manager.h"
#include "mongo/db/collection_crud/collection_write_path.h"
#include "mongo/db/curop.h"
#include "mongo/db/local_catalog/shard_role_api/transaction_resources.h"
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/query/plan_executor.h"

View File

@ -15,10 +15,6 @@ mongo_cc_library(
"capped_collection_maintenance.cpp",
"collection_write_path.cpp",
],
hdrs = [
"capped_collection_maintenance.h",
"collection_write_path.h",
],
deps = [
"//src/mongo/db:record_id_helpers", # TODO(SERVER-93876): Remove.
"//src/mongo/db:shard_role_api", # TODO(SERVER-93876): Remove.
@ -39,9 +35,6 @@ mongo_cc_library(
srcs = [
"container_write.cpp",
],
hdrs = [
"container_write.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:shard_role_api_stor_ex",

View File

@ -20,7 +20,6 @@ mongo_cc_library(
"test_commands_enabled.cpp",
":test_commands_enabled_gen",
],
private_hdrs = [":test_commands_enabled.h"],
deps = [
"//src/mongo/db:server_base",
],
@ -41,7 +40,6 @@ mongo_cc_library(
"buildinfo_common.cpp",
":buildinfo_common_gen",
],
private_hdrs = [":buildinfo_common.h"],
deps = [
"//src/mongo:base",
"//src/mongo/db:commands",
@ -111,9 +109,6 @@ mongo_cc_library(
srcs = [
":shardsvr_run_search_index_command_gen",
],
hdrs = [
"//src/mongo/db/auth:authorization_contract.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/local_catalog/lock_manager:flow_control_ticketholder",
@ -252,9 +247,6 @@ mongo_cc_library(
"authentication_commands.cpp",
"authentication_commands_gen",
],
hdrs = [
"authentication_commands.h",
],
deps = [
# TODO SERVER-78809 - remove dependencies
"//src/mongo/db/auth",
@ -287,9 +279,6 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/local_catalog/ddl:create_gen",
],
hdrs = [
"//src/mongo/db/local_catalog/ddl:create_command_validation.h",
],
deps = [
"//src/mongo/crypto:encrypted_field_config",
"//src/mongo/db:server_base",
@ -429,9 +418,6 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/local_catalog/ddl:list_collections_filter.cpp",
],
hdrs = [
"//src/mongo/db/local_catalog/ddl:list_collections_filter.h",
],
deps = [
"//src/mongo:base",
],
@ -442,9 +428,6 @@ mongo_cc_library(
srcs = [
":user_management_commands_gen",
],
hdrs = [
"//src/mongo/db/auth:umc_info_command_arg.h",
],
deps = [
"//src/mongo/db:common",
"//src/mongo/db:server_base",
@ -459,9 +442,6 @@ mongo_cc_library(
srcs = [
":set_feature_compatibility_version_gen",
],
header_deps = [
"//src/mongo/db/user_write_block:set_user_write_block_mode_idl",
],
deps = [
"//src/mongo/db:server_base",
],
@ -509,11 +489,6 @@ mongo_cc_library(
"shutdown.cpp",
"shutdown_gen",
],
hdrs = [
"shutdown.h",
"//src/mongo/db/auth:authorization_contract.h",
"//src/mongo/util:ntservice.h",
],
deps = [
"//src/mongo/bson:bson_validate",
"//src/mongo/db:server_base",
@ -529,11 +504,6 @@ mongo_cc_library(
":profile_gen",
"//src/mongo/db:profile_filter_impl.cpp",
],
hdrs = [
"profile_common.h",
"set_profiling_filter_globally_cmd.h",
"//src/mongo/db:profile_filter_impl.h",
],
deps = [
"//src/mongo/db:commands",
"//src/mongo/db:profile_settings",
@ -553,9 +523,6 @@ mongo_cc_library(
srcs = [
"profile_cmd_test_utils.cpp",
],
hdrs = [
"profile_cmd_test_utils.h",
],
deps = [
":profile_common",
"//src/mongo/unittest",
@ -568,9 +535,6 @@ mongo_cc_library(
"feature_compatibility_version.cpp",
":feature_compatibility_version_gen",
],
hdrs = [
"feature_compatibility_version.h",
],
deps = [
"//src/mongo/db:commands",
"//src/mongo/db:dbdirectclient",
@ -590,9 +554,6 @@ mongo_cc_library(
"fsync.cpp",
":fsync_gen",
],
hdrs = [
"fsync.h",
],
deps = [
"//src/mongo/db:commands",
"//src/mongo/db:dbdirectclient",
@ -647,11 +608,6 @@ mongo_cc_library(
"//src/mongo/db/commands/server_status:server_status_command.cpp",
"//src/mongo/db/local_catalog/ddl:rename_collection_common.cpp",
],
hdrs = [
"fle2_compact.h",
"parse_log_component_settings.h",
"//src/mongo/db/local_catalog/ddl:rename_collection_common.h",
],
deps = [
":shardsvr_run_search_index_command_idl",
":test_commands_enabled",
@ -691,13 +647,6 @@ mongo_cc_library(
"//src/mongo/db/cluster_parameters:get_cluster_parameter_invocation.cpp",
"//src/mongo/db/cluster_parameters:set_cluster_parameter_invocation.cpp",
],
hdrs = [
"//src/mongo/db/cluster_parameters:get_cluster_parameter_invocation.h",
"//src/mongo/db/cluster_parameters:set_cluster_parameter_invocation.h",
],
header_deps = [
"//src/mongo/db:dbhelpers",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:audit",
@ -713,9 +662,6 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/cluster_parameters:set_cluster_parameter_replset_impl.cpp",
],
hdrs = [
"//src/mongo/db/cluster_parameters:set_cluster_parameter_replset_impl.h",
],
deps = [
":cluster_server_parameter_commands_invocation",
":mongod_fcv",
@ -730,9 +676,6 @@ mongo_cc_library(
srcs = [
"dbcheck_command.cpp",
],
hdrs = [
"dbcheck_command.h",
],
deps = [
"//src/mongo/db:dbhelpers",
"//src/mongo/db:query_exec",
@ -761,9 +704,6 @@ mongo_cc_library(
"whats_my_uri_cmd.cpp",
":sysprofile_gen",
],
hdrs = [
"test_commands.h",
],
deps = [
":test_commands_enabled",
"//src/mongo:base",
@ -784,9 +724,6 @@ mongo_cc_library(
srcs = [
":kill_operations_gen",
],
hdrs = [
"//src/mongo/db/auth:authorization_contract.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -797,9 +734,6 @@ mongo_cc_library(
srcs = [
"kill_op_cmd_base.cpp",
],
hdrs = [
"kill_op_cmd_base.h",
],
deps = [
":kill_operations_idl",
"//src/mongo/db:audit",
@ -835,21 +769,14 @@ mongo_cc_library(
":rotate_certificates_gen",
"//src/mongo/db/commands/query_cmd:mr_common.cpp",
"//src/mongo/db/commands/server_status:logical_session_server_status_section.cpp",
] + select({
],
srcs_select = [{
"//bazel/config:xray_enabled": [
"xray_commands.cpp",
":xray_commands_gen",
],
"//conditions:default": [],
}),
hdrs = [
"user_management_commands_common.h",
"//src/mongo/db/commands/query_cmd:map_reduce_gen",
"//src/mongo/db/commands/query_cmd:map_reduce_global_variable_scope.h",
"//src/mongo/db/commands/query_cmd:map_reduce_javascript_code.h",
"//src/mongo/db/commands/query_cmd:map_reduce_out_options.h",
"//src/mongo/db/commands/query_cmd:mr_common.h",
],
}],
deps = [
":authentication_commands",
":core",
@ -927,25 +854,6 @@ mongo_cc_library(
"//src/mongo/db/local_catalog/ddl:rename_collection_cmd.cpp",
"//src/mongo/db/local_catalog/lock_manager:lock_info.cpp",
],
hdrs = [
"killoperations_common.h",
"//src/mongo/bson/util:bson_check.h",
"//src/mongo/db/commands/query_cmd:acquire_locks.h",
"//src/mongo/db/commands/query_cmd:aggregation_execution_state.h",
"//src/mongo/db/commands/query_cmd:analyze_cmd.h",
"//src/mongo/db/commands/query_cmd:index_filter_commands.h",
"//src/mongo/db/commands/query_cmd:killcursors_common.h",
"//src/mongo/db/commands/query_cmd:plan_cache_commands.h",
"//src/mongo/db/commands/query_cmd:release_memory_cmd.h",
"//src/mongo/db/commands/query_cmd:run_aggregate.h",
"//src/mongo/db/global_catalog/ddl:shuffle_list_command_results.h",
"//src/mongo/db/local_catalog:validate_db_metadata_common.h",
"//src/mongo/db/local_catalog/ddl:list_databases_common.h",
"//src/mongo/db/local_catalog/ddl:list_indexes_allowed_fields.h",
"//src/mongo/db/query/query_stats:count_key.h",
"//src/mongo/db/query/query_stats:distinct_key.h",
"//src/mongo/db/repl:sync_source_resolver.h",
],
no_undefined_ref_DO_NOT_USE = False,
deps = [
"buildinfo_common",
@ -1078,11 +986,6 @@ mongo_cc_library(
"//src/mongo/db/local_catalog/ddl:internal_rename_if_options_and_indexes_match_gen",
"//src/mongo/db/user_write_block:set_user_write_block_mode_command.cpp",
],
hdrs = [
"oplog_application_checks.h",
"//src/mongo/db/commands/query_cmd:map_reduce_command_base.h",
"//src/mongo/s/commands:internal_transactions_test_command.h",
],
deps = [
"cluster_server_parameter_commands_invocation",
"core",
@ -1195,7 +1098,6 @@ mongo_cc_unit_test(
"//src/mongo/db:service_context_non_d",
"//src/mongo/db/auth:authmocks",
"//src/mongo/db/auth:authorization_manager_global",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/unittest",
],
)
@ -1217,16 +1119,13 @@ mongo_cc_unit_test(
"//src/mongo/db/commands/server_status:server_status_metric_test.cpp",
"//src/mongo/db/local_catalog/ddl:create_command_test.cpp",
"//src/mongo/db/local_catalog/ddl:list_collections_filter_test.cpp",
] + select({
],
srcs_select = [{
"//bazel/config:js_engine_none": [],
"//bazel/config:js_engine_mozjs": [
"//src/mongo/db/commands/query_cmd:mr_test.cpp",
],
}),
private_hdrs = [
":db_command_test_fixture.h",
"//src/mongo/db/local_catalog:collection_mock.h",
],
}],
tags = ["mongo_unittest_fourth_group"],
deps = [
":cluster_server_parameter_commands_invocation",
@ -1269,7 +1168,6 @@ mongo_cc_unit_test(
"//src/mongo/db/s:shard_server_test_fixture",
"//src/mongo/db/storage:record_store_base",
"//src/mongo/idl:idl_parser",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/shell:kms_idl",
"//src/mongo/util:version_impl",
],

View File

@ -14,7 +14,6 @@ idl_generator(
src = "explain.idl",
deps = [
"//src/mongo/db:basic_types_gen",
"//src/mongo/db/query:explain_verbosity_gen",
"//src/mongo/idl:generic_argument_gen",
],
)
@ -41,10 +40,6 @@ mongo_cc_library(
"bulk_write_parser.cpp",
":bulk_write_gen",
],
hdrs = [
"bulk_write_crud_op.h",
"bulk_write_parser.h",
],
deps = [
"//src/mongo/crypto:fle_fields",
"//src/mongo/db:commands", # TODO(SERVER-93876): Remove.
@ -73,9 +68,6 @@ mongo_cc_library(
srcs = [
"current_op_common.cpp",
],
hdrs = [
"current_op_common.h",
],
deps = [
"//src/mongo/db:commands",
"//src/mongo/db:server_base",
@ -112,14 +104,6 @@ mongo_cc_library(
"map_reduce_out_options.cpp",
":map_reduce_gen",
],
hdrs = [
"map_reduce_global_variable_scope.h",
"map_reduce_javascript_code.h",
"map_reduce_out_options.h",
],
header_deps = [
"//src/mongo/db/user_write_block:set_user_write_block_mode_idl",
],
deps = [
"//src/mongo/db:server_base",
],
@ -130,9 +114,6 @@ mongo_cc_library(
srcs = [
"update_metrics.cpp",
],
hdrs = [
"update_metrics.h",
],
deps = [
"//src/mongo/db/commands/server_status:server_status_core", # TODO(SERVER-93876): Remove.
"//src/mongo/db/query/write_ops:write_ops_parsers",
@ -144,9 +125,6 @@ mongo_cc_library(
srcs = [
"write_commands_common.cpp",
],
hdrs = [
"write_commands_common.h",
],
deps = [
":update_metrics",
"//src/mongo/db:local_executor",
@ -162,15 +140,6 @@ mongo_cc_library(
srcs = [
"bulk_write_common.cpp",
],
hdrs = [
"bulk_write_common.h",
"//src/mongo/db/exec/sbe:in_list.h",
"//src/mongo/db/query:explain.h",
"//src/mongo/db/query:multiple_collection_accessor.h",
"//src/mongo/db/query/plan_cache:sbe_plan_cache.h",
"//src/mongo/db/query/stage_builder/sbe:builder_data.h",
"//src/mongo/db/query/write_ops:update_request.h",
],
deps = [
":bulk_write_parser",
":update_metrics",
@ -218,11 +187,6 @@ mongo_cc_library(
":query_settings_cmds_gen",
"query_settings_cmds.cpp",
],
hdrs = [
"//src/mongo/db/exec/agg:query_settings_stage.h",
"//src/mongo/db/pipeline:document_source_query_settings.h",
"//src/mongo/s/query/exec:async_results_merger_params_gen",
],
deps = [
"//src/mongo/client:clientdriver_minimal",
"//src/mongo/db:commands",
@ -243,9 +207,6 @@ mongo_cc_library(
srcs = [
"bulk_write.cpp",
],
hdrs = [
"bulk_write.h",
],
deps = [
":bulk_write_common",
":bulk_write_parser",
@ -291,9 +252,6 @@ mongo_cc_library(
srcs = [
"map_reduce_agg.cpp",
],
hdrs = [
"map_reduce_agg.h",
],
deps = [
":map_reduce_parser",
"//src/mongo/db:query_exec",
@ -331,9 +289,6 @@ mongo_cc_library(
srcs = [
"release_memory_cmd.cpp",
],
hdrs = [
"release_memory_cmd.h",
],
deps = [
"//src/mongo/db:commands",
"//src/mongo/db/auth:auth_checks",

View File

@ -14,283 +14,6 @@ mongo_cc_library(
srcs = [
"server_status.cpp",
],
hdrs = [
"server_status.h",
"//src/mongo/base:error_codes_header",
"//src/mongo/bson:bson_validate_gen",
"//src/mongo/bson:bsonelement_comparator.h",
"//src/mongo/client:client_api_version_parameters_gen",
"//src/mongo/client:connpool.h",
"//src/mongo/client:hedging_mode_gen",
"//src/mongo/client:read_preference_gen",
"//src/mongo/client:replica_set_change_notifier.h",
"//src/mongo/crypto:aead_encryption.h",
"//src/mongo/crypto:encryption_fields_gen",
"//src/mongo/crypto:fle_crypto_predicate.h",
"//src/mongo/crypto:fle_crypto_types.h",
"//src/mongo/crypto:fle_data_frames.h",
"//src/mongo/crypto:fle_field_schema_gen",
"//src/mongo/crypto:fle_stats_gen",
"//src/mongo/crypto:symmetric_crypto.h",
"//src/mongo/crypto:symmetric_key.h",
"//src/mongo/db:api_parameters_gen",
"//src/mongo/db:basic_types_gen",
"//src/mongo/db:curop.h",
"//src/mongo/db:curop_bson_helpers.h",
"//src/mongo/db:hasher.h",
"//src/mongo/db:multitenancy_gen",
"//src/mongo/db:namespace_spec_gen",
"//src/mongo/db:op_debug.h",
"//src/mongo/db:operation_cpu_timer.h",
"//src/mongo/db:read_write_concern_provenance_base_gen",
"//src/mongo/db:write_concern_gen",
"//src/mongo/db:yieldable.h",
"//src/mongo/db/auth:access_checks_gen",
"//src/mongo/db/auth:action_type_gen",
"//src/mongo/db/auth:auth_types_gen",
"//src/mongo/db/auth:authorization_session.h",
"//src/mongo/db/auth:authz_session_external_state.h",
"//src/mongo/db/cluster_parameters:cluster_server_parameter_gen",
"//src/mongo/db/exec:field_name_bloom_filter.h",
"//src/mongo/db/exec:scoped_timer.h",
"//src/mongo/db/exec:shard_filterer.h",
"//src/mongo/db/exec:sort_key_comparator.h",
"//src/mongo/db/exec/agg:exec_pipeline.h",
"//src/mongo/db/exec/agg:stage.h",
"//src/mongo/db/exec/classic:eof.h",
"//src/mongo/db/exec/classic:plan_stage.h",
"//src/mongo/db/exec/classic:working_set.h",
"//src/mongo/db/exec/classic:working_set_common.h",
"//src/mongo/db/exec/document_value:document_comparator.h",
"//src/mongo/db/exec/document_value:value_comparator.h",
"//src/mongo/db/exec/sbe/values:bson.h",
"//src/mongo/db/exec/sbe/values:key_string_entry.h",
"//src/mongo/db/exec/sbe/values:value.h",
"//src/mongo/db/fts:fts_basic_phrase_matcher.h",
"//src/mongo/db/fts:fts_language.h",
"//src/mongo/db/fts:fts_matcher.h",
"//src/mongo/db/fts:fts_phrase_matcher.h",
"//src/mongo/db/fts:fts_query_impl.h",
"//src/mongo/db/fts:fts_spec.h",
"//src/mongo/db/fts:fts_tokenizer.h",
"//src/mongo/db/fts:fts_unicode_phrase_matcher.h",
"//src/mongo/db/fts:stemmer.h",
"//src/mongo/db/fts:stop_words.h",
"//src/mongo/db/fts:tokenizer.h",
"//src/mongo/db/fts/unicode:codepoints.h",
"//src/mongo/db/global_catalog:chunk.h",
"//src/mongo/db/global_catalog:chunk_manager.h",
"//src/mongo/db/global_catalog:shard_key_pattern.h",
"//src/mongo/db/global_catalog:type_chunk.h",
"//src/mongo/db/global_catalog:type_chunk_base_gen",
"//src/mongo/db/global_catalog:type_chunk_range.h",
"//src/mongo/db/global_catalog:type_chunk_range_base_gen",
"//src/mongo/db/global_catalog:type_collection_common_types_gen",
"//src/mongo/db/global_catalog:type_database_gen",
"//src/mongo/db/global_catalog:types_validators.h",
"//src/mongo/db/global_catalog/ddl:sharding_migration_critical_section.h",
"//src/mongo/db/global_catalog/router_role_api:gossiped_routing_cache_gen",
"//src/mongo/db/index:btree_key_generator.h",
"//src/mongo/db/index:sort_key_generator.h",
"//src/mongo/db/index_builds:resumable_index_builds_gen",
"//src/mongo/db/local_catalog:clustered_collection_options_gen",
"//src/mongo/db/local_catalog:collection.h",
"//src/mongo/db/local_catalog:collection_catalog.h",
"//src/mongo/db/local_catalog:collection_options_gen",
"//src/mongo/db/local_catalog:durable_catalog_entry.h",
"//src/mongo/db/local_catalog:durable_catalog_entry_metadata.h",
"//src/mongo/db/local_catalog:historical_catalogid_tracker.h",
"//src/mongo/db/local_catalog:views_for_database.h",
"//src/mongo/db/local_catalog/ddl:replica_set_ddl_tracker.h", # TODO(SERVER-109911): Remove.
"//src/mongo/db/local_catalog/shard_role_api:post_resharding_placement.h",
"//src/mongo/db/local_catalog/shard_role_api:shard_role.h",
"//src/mongo/db/local_catalog/shard_role_api:transaction_resources.h",
"//src/mongo/db/local_catalog/shard_role_catalog:collection_metadata.h",
"//src/mongo/db/local_catalog/shard_role_catalog:collection_sharding_state.h",
"//src/mongo/db/local_catalog/shard_role_catalog:database_sharding_state.h",
"//src/mongo/db/local_catalog/shard_role_catalog:operation_sharding_state.h",
"//src/mongo/db/local_catalog/shard_role_catalog:scoped_collection_metadata.h",
"//src/mongo/db/matcher:copyable_match_expression.h",
"//src/mongo/db/matcher:expression_algo.h",
"//src/mongo/db/matcher:expression_hasher.h",
"//src/mongo/db/matcher:expression_leaf.h",
"//src/mongo/db/matcher:expression_path.h",
"//src/mongo/db/matcher:expression_text_base.h",
"//src/mongo/db/matcher:expression_tree.h",
"//src/mongo/db/matcher:expression_type.h",
"//src/mongo/db/matcher:expression_where_base.h",
"//src/mongo/db/matcher:expression_with_placeholder.h",
"//src/mongo/db/matcher:extensions_callback.h",
"//src/mongo/db/matcher:extensions_callback_noop.h",
"//src/mongo/db/matcher:in_list_data.h",
"//src/mongo/db/matcher:matcher.h",
"//src/mongo/db/matcher:matcher_type_set.h",
"//src/mongo/db/matcher/schema:encrypt_schema_gen",
"//src/mongo/db/matcher/schema:encrypt_schema_types.h",
"//src/mongo/db/matcher/schema:expression_internal_schema_allowed_properties.h",
"//src/mongo/db/matcher/schema:json_pointer.h",
"//src/mongo/db/memory_tracking:memory_usage_tracker.h",
"//src/mongo/db/pipeline:accumulation_statement.h",
"//src/mongo/db/pipeline:accumulator.h",
"//src/mongo/db/pipeline:accumulator_for_window_functions.h",
"//src/mongo/db/pipeline:accumulator_multi.h",
"//src/mongo/db/pipeline:accumulator_percentile.h",
"//src/mongo/db/pipeline:accumulator_percentile_enum_gen",
"//src/mongo/db/pipeline:accumulator_percentile_gen",
"//src/mongo/db/pipeline:change_stream_pre_and_post_images_options_gen",
"//src/mongo/db/pipeline:document_path_support.h",
"//src/mongo/db/pipeline:document_source.h",
"//src/mongo/db/pipeline:document_source_change_stream_gen",
"//src/mongo/db/pipeline:document_source_match.h",
"//src/mongo/db/pipeline:document_source_set_window_fields_gen",
"//src/mongo/db/pipeline:expression.h",
"//src/mongo/db/pipeline:expression_context.h",
"//src/mongo/db/pipeline:expression_from_accumulator_quantile.h",
"//src/mongo/db/pipeline:expression_visitor.h",
"//src/mongo/db/pipeline:expression_walker.h",
"//src/mongo/db/pipeline:group_from_first_document_transformation.h",
"//src/mongo/db/pipeline:javascript_execution.h",
"//src/mongo/db/pipeline:legacy_runtime_constants_gen",
"//src/mongo/db/pipeline:match_processor.h",
"//src/mongo/db/pipeline:memory_token_container_util.h",
"//src/mongo/db/pipeline:monotonic_expression.h",
"//src/mongo/db/pipeline:percentile_algo.h",
"//src/mongo/db/pipeline:percentile_algo_accurate.h",
"//src/mongo/db/pipeline:percentile_algo_discrete.h",
"//src/mongo/db/pipeline:pipeline.h",
"//src/mongo/db/pipeline:pipeline_split_state.h",
"//src/mongo/db/pipeline:resume_token.h",
"//src/mongo/db/pipeline:shard_role_transaction_resources_stasher_for_pipeline.h",
"//src/mongo/db/pipeline:stage_constraints.h",
"//src/mongo/db/pipeline:storage_stats_spec_gen",
"//src/mongo/db/pipeline:transformer_interface.h",
"//src/mongo/db/pipeline/window_function:window_bounds.h",
"//src/mongo/db/pipeline/window_function:window_function.h",
"//src/mongo/db/pipeline/window_function:window_function_avg.h",
"//src/mongo/db/pipeline/window_function:window_function_covariance.h",
"//src/mongo/db/pipeline/window_function:window_function_expression.h",
"//src/mongo/db/pipeline/window_function:window_function_integral.h",
"//src/mongo/db/pipeline/window_function:window_function_min_max.h",
"//src/mongo/db/pipeline/window_function:window_function_min_max_scaler.h",
"//src/mongo/db/pipeline/window_function:window_function_min_max_scaler_util.h",
"//src/mongo/db/pipeline/window_function:window_function_statement.h",
"//src/mongo/db/pipeline/window_function:window_function_sum.h",
"//src/mongo/db/query:bson_typemask.h",
"//src/mongo/db/query:canonical_distinct.h",
"//src/mongo/db/query:canonical_query.h",
"//src/mongo/db/query:canonical_query_encoder.h",
"//src/mongo/db/query:count_command_gen",
"//src/mongo/db/query:count_request.h",
"//src/mongo/db/query:distinct_command_gen",
"//src/mongo/db/query:explain_verbosity_gen",
"//src/mongo/db/query:find_command_gen",
"//src/mongo/db/query:parsed_find_command.h",
"//src/mongo/db/query:plan_executor.h",
"//src/mongo/db/query:plan_explainer.h",
"//src/mongo/db/query:plan_ranking_decision.h",
"//src/mongo/db/query:plan_yield_policy.h",
"//src/mongo/db/query:query_feature_flags_gen",
"//src/mongo/db/query:query_knob_configuration.h",
"//src/mongo/db/query:query_knobs_gen",
"//src/mongo/db/query:query_request_helper.h",
"//src/mongo/db/query:restore_context.h",
"//src/mongo/db/query:tailable_mode.h",
"//src/mongo/db/query:tailable_mode_gen",
"//src/mongo/db/query/client_cursor:cursor_response_gen",
"//src/mongo/db/query/client_cursor:generic_cursor_gen",
"//src/mongo/db/query/collation:collator_factory_interface.h",
"//src/mongo/db/query/compiler/dependency_analysis:expression_dependencies.h",
"//src/mongo/db/query/compiler/logical_model/projection:projection.h",
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast.h",
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast_visitor.h",
"//src/mongo/db/query/compiler/logical_model/projection:projection_policies.h",
"//src/mongo/db/query/compiler/logical_model/sort_pattern:sort_pattern.h",
"//src/mongo/db/query/compiler/metadata:index_entry.h",
"//src/mongo/db/query/compiler/optimizer/index_bounds_builder:interval_evaluation_tree.h",
"//src/mongo/db/query/compiler/parsers/matcher:expression_parser.h",
"//src/mongo/db/query/compiler/physical_model/index_bounds:index_bounds.h",
"//src/mongo/db/query/compiler/physical_model/interval:interval.h",
"//src/mongo/db/query/compiler/physical_model/query_solution:query_solution.h",
"//src/mongo/db/query/compiler/rewrites/matcher:expression_optimizer.h",
"//src/mongo/db/query/compiler/stats:stats_for_histograms_gen",
"//src/mongo/db/query/compiler/stats:value_utils.h",
"//src/mongo/db/query/plan_cache:classic_plan_cache.h",
"//src/mongo/db/query/plan_cache:plan_cache.h",
"//src/mongo/db/query/plan_cache:plan_cache_callbacks.h",
"//src/mongo/db/query/plan_cache:plan_cache_debug_info.h",
"//src/mongo/db/query/plan_cache:plan_cache_key_info.h",
"//src/mongo/db/query/plan_cache:plan_cache_log_utils.h",
"//src/mongo/db/query/plan_enumerator:plan_enumerator_explain_info.h",
"//src/mongo/db/query/query_settings:query_settings_gen",
"//src/mongo/db/query/query_settings:query_settings_hash.h",
"//src/mongo/db/query/query_shape:query_shape.h",
"//src/mongo/db/query/query_shape:query_shape_hash.h",
"//src/mongo/db/query/query_stats:key.h",
"//src/mongo/db/query/query_stats:transform_algorithm_gen",
"//src/mongo/db/query/timeseries:bucket_spec.h",
"//src/mongo/db/query/util:deferred.h",
"//src/mongo/db/query/util:make_data_structure.h",
"//src/mongo/db/query/util:named_enum.h",
"//src/mongo/db/query/write_ops:single_write_result_gen",
"//src/mongo/db/query/write_ops:write_ops_gen",
"//src/mongo/db/repl:apply_ops_gen",
"//src/mongo/db/repl:member_config_gen",
"//src/mongo/db/repl:oplog_entry_gen",
"//src/mongo/db/repl:optime_base_gen",
"//src/mongo/db/repl:read_concern_gen",
"//src/mongo/db/repl:repl_server_parameters_gen",
"//src/mongo/db/repl:repl_set_config_gen",
"//src/mongo/db/repl:repl_set_config_params_gen",
"//src/mongo/db/session:logical_session_cache_gen",
"//src/mongo/db/session:logical_session_id_gen",
"//src/mongo/db/sharding_environment:range_arithmetic.h",
"//src/mongo/db/sorter:sorter_gen",
"//src/mongo/db/stats:counters.h",
"//src/mongo/db/storage:index_entry_comparison.h",
"//src/mongo/db/storage:sorted_data_interface.h",
"//src/mongo/db/timeseries:timeseries_gen",
"//src/mongo/db/update:pattern_cmp.h",
"//src/mongo/db/vector_clock:vector_clock_gen",
"//src/mongo/db/versioning_protocol:chunk_version_gen",
"//src/mongo/db/versioning_protocol:database_version_base_gen",
"//src/mongo/db/views:view.h",
"//src/mongo/db/views:view_graph.h",
"//src/mongo/executor:connection_pool.h",
"//src/mongo/executor:connection_pool_stats.h",
"//src/mongo/executor:egress_connection_closer.h",
"//src/mongo/executor:egress_connection_closer_manager.h",
"//src/mongo/idl:generic_argument_gen",
"//src/mongo/rpc:topology_version_gen",
"//src/mongo/rpc/metadata:audit_metadata_gen",
"//src/mongo/rpc/metadata:client_metadata.h",
"//src/mongo/s:sharding_task_executor_pool_controller.h",
"//src/mongo/s/resharding:common_types_gen",
"//src/mongo/s/resharding:type_collection_fields_gen",
"//src/mongo/scripting:engine.h",
"//src/mongo/util:elapsed_tracker.h",
"//src/mongo/util:histogram.h",
"//src/mongo/util:lazily_initialized.h",
"//src/mongo/util:pcre.h",
"//src/mongo/util:processinfo.h",
"//src/mongo/util:represent_as.h",
"//src/mongo/util/immutable:map.h",
"//src/mongo/util/immutable:unordered_map.h",
"//src/mongo/util/immutable:unordered_set.h",
"//src/mongo/util/immutable/details:map.h",
"//src/mongo/util/immutable/details:memory_policy.h",
"//src/mongo/util/version:releases_header",
],
header_deps = [
"//src/mongo/db/pipeline/process_interface:mongo_process_interface",
"//src/mongo/db/query:hint_parser",
"//src/mongo/db/storage:duplicate_key_error_info",
"//src/mongo/util:background_job",
"//src/mongo/util:progress_meter",
"//src/mongo/util:summation",
] + select({
"//bazel/config:build_enterprise_enabled": ["//src/mongo/db/modules/enterprise/src/streams/util:streams_util"],
"//conditions:default": [],
}),
deps = [
"//src/mongo/db:profile_settings",
"//src/mongo/db/extension/host:extension_operation_metrics_registry",
@ -306,9 +29,6 @@ mongo_cc_library(
srcs = [
"server_status_metric.cpp",
],
hdrs = [
"server_status_metric.h",
],
deps = [
"//src/mongo/db:server_base",
],

View File

@ -15,10 +15,6 @@ mongo_cc_library(
"sort_executor.cpp",
"sort_key_comparator.cpp",
],
hdrs = [
"sort_executor.h",
"sort_key_comparator.h",
],
deps = [
":working_set",
"//src/mongo/db/pipeline/spilling:spilling_stats",
@ -37,9 +33,6 @@ mongo_cc_library(
srcs = [
"js_function.cpp",
],
hdrs = [
"js_function.h",
],
deps = [
"//src/mongo/db:service_context",
"//src/mongo/db/auth",
@ -54,9 +47,6 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/exec/classic:working_set.cpp",
],
hdrs = [
"//src/mongo/db/exec/classic:working_set.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/bson/dotted_path:dotted_path_support",
@ -75,9 +65,6 @@ mongo_cc_library(
srcs = [
"scoped_timer.cpp",
],
hdrs = [
"scoped_timer.h",
],
deps = [
"//src/mongo/db:service_context",
"//src/mongo/util/net:network",
@ -89,9 +76,6 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/exec/timeseries:bucket_unpacker.cpp",
],
hdrs = [
"//src/mongo/db/exec/timeseries:bucket_unpacker.h",
],
deps = [
"//src/mongo/bson/column",
"//src/mongo/db:query_expressions",
@ -109,17 +93,6 @@ mongo_cc_library(
"projection_executor_builder.cpp",
"projection_node.cpp",
],
hdrs = [
"add_fields_projection_executor.h",
"exclusion_projection_executor.h",
"inclusion_projection_executor.h",
"projection_executor_builder.h",
"projection_node.h",
],
private_hdrs = [
"//src/mongo/base:exact_cast.h",
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast_path_tracking_visitor.h",
],
deps = [
"//src/mongo/db:query_expressions",
"//src/mongo/db/matcher:expression_algo",
@ -132,9 +105,6 @@ mongo_cc_library(
srcs = [
"str_trim_utils.cpp",
],
hdrs = [
"str_trim_utils.h",
],
deps = [
"//src/mongo:base",
],
@ -145,9 +115,6 @@ mongo_cc_library(
srcs = [
"substr_utils.cpp",
],
hdrs = [
"substr_utils.h",
],
deps = [
"//src/mongo:base",
],
@ -213,10 +180,6 @@ mongo_cc_unit_test(
"//src/mongo/db/exec/matcher:matcher_test.cpp",
"//src/mongo/db/exec/timeseries:bucket_unpacker_test.cpp",
],
private_hdrs = [
"//src/mongo/db/exec/expression:evaluate_test_helpers.h",
"//src/mongo/db/pipeline:document_source_test_optimizations.h",
],
tags = ["mongo_unittest_fourth_group"],
deps = [
":projection_executor",
@ -238,7 +201,6 @@ mongo_cc_unit_test(
"//src/mongo/db/query/collation:collator_interface_mock",
"//src/mongo/db/timeseries:bucket_compression",
"//src/mongo/dbtests:mocklib",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/util:clock_source_mock",
],
)
@ -248,15 +210,11 @@ mongo_cc_library(
srcs = [
"expression_bm_fixture.cpp",
],
hdrs = [
"expression_bm_fixture.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/exec/document_value",
"//src/mongo/db/query:query_fcv_environment_for_test",
"//src/mongo/db/query:query_test_service_context",
"//src/mongo/idl:server_parameter_test_controller",
"//src/third_party/benchmark",
],
)
@ -277,9 +235,6 @@ mongo_cc_benchmark(
mongo_cc_library(
name = "docval_to_sbeval",
hdrs = [
"docval_to_sbeval.h",
],
deps = [
"//src/mongo/db:sbe_values",
],
@ -290,9 +245,6 @@ mongo_cc_library(
srcs = [
"convert_utils.cpp",
],
hdrs = [
"convert_utils.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/exec/document_value",

View File

@ -22,9 +22,6 @@ mongo_cc_library(
srcs = [
"query_shard_server_test_fixture.cpp",
],
hdrs = [
"query_shard_server_test_fixture.h",
],
deps = [
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/db/query:query_test_service_context",

View File

@ -18,15 +18,6 @@ mongo_cc_library(
"value.cpp",
"value_comparator.cpp",
],
hdrs = [
"document.h",
"document_comparator.h",
"document_metadata_fields.h",
"value.h",
"value_comparator.h",
"//src/mongo/db:feature_flag.h",
"//src/mongo/db/query:query_feature_flags_gen",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/pipeline:field_path",
@ -41,9 +32,6 @@ mongo_cc_library(
srcs = [
"document_value_test_util.cpp",
],
hdrs = [
"document_value_test_util.h",
],
deps = [
":document_value",
"//src/mongo/unittest",

View File

@ -15,16 +15,9 @@ mongo_cc_library(
"document.cpp",
"element.cpp",
],
hdrs = [
"algorithm.h",
"const_element.h",
"document.h",
"element.h",
],
mongo_api_name = "mutable_bson",
deps = [
"//src/mongo:base",
"//src/mongo/db/storage:damage_vector",
"//src/mongo/util:safe_num",
],
)

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"classic_runtime_planner_for_sbe_test_util.cpp",
],
hdrs = [
"classic_runtime_planner_for_sbe_test_util.h",
],
deps = [
"//src/mongo/db:sbe_values",
"//src/mongo/db/exec:scoped_timer",
@ -34,6 +31,5 @@ mongo_cc_unit_test(
":classic_runtime_planner_for_sbe_test_util",
"//src/mongo/db/local_catalog:catalog_test_fixture",
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/idl:server_parameter_test_controller",
],
)

View File

@ -15,10 +15,6 @@ mongo_cc_library(
"makeobj_spec.cpp",
"size_estimator.cpp",
],
hdrs = [
"makeobj_spec.h",
"size_estimator.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:sbe_values",
@ -65,27 +61,6 @@ mongo_cc_library(
"//src/mongo/db/exec/sbe/vm:vm_instruction.cpp",
"//src/mongo/db/exec/sbe/vm:vm_printer.cpp",
],
hdrs = [
"sbe_pattern_value_cmp.h",
"sort_spec.h",
"//src/mongo/db/exec/sbe:accumulator_sum_value_enum.h",
"//src/mongo/db/exec/sbe:in_list.h",
"//src/mongo/db/exec/sbe/expressions:compile_ctx.h",
"//src/mongo/db/exec/sbe/expressions:expression.h",
"//src/mongo/db/exec/sbe/expressions:runtime_environment.h",
"//src/mongo/db/exec/sbe/util:debug_print.h",
"//src/mongo/db/exec/sbe/util:pcre.h",
"//src/mongo/db/exec/sbe/util:spilling.h",
"//src/mongo/db/exec/sbe/util:stage_results_printer.h",
"//src/mongo/db/exec/sbe/vm:code_fragment.h",
"//src/mongo/db/exec/sbe/vm:vm.h",
"//src/mongo/db/exec/sbe/vm:vm_builtin.h",
"//src/mongo/db/exec/sbe/vm:vm_datetime.h",
"//src/mongo/db/exec/sbe/vm:vm_instruction.h",
"//src/mongo/db/exec/sbe/vm:vm_memory.h",
"//src/mongo/db/exec/sbe/vm:vm_printer.h",
],
private_hdrs = ["//src/mongo/db/query:multiple_collection_accessor.h"],
deps = [
"//src/mongo:base",
"//src/mongo/bson/dotted_path:dotted_path_support",
@ -117,40 +92,11 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/exec/sbe/stages:plan_stats.cpp",
],
hdrs = [
"//src/mongo:core_headers",
"//src/mongo/db/exec:plan_stats.h",
"//src/mongo/db/exec:plan_stats_visitor.h",
"//src/mongo/db/exec:plan_stats_walker.h",
"//src/mongo/db/exec/sbe/stages:plan_stats.h",
"//src/mongo/db/query:explain_options.h",
"//src/mongo/db/query:explain_verbosity_gen",
"//src/mongo/db/query:plan_summary_stats.h",
"//src/mongo/db/query:plan_summary_stats_visitor.h",
"//src/mongo/db/query:query_feature_flags_gen",
"//src/mongo/db/query:record_id_bound.h",
"//src/mongo/db/query:tree_walker.h",
"//src/mongo/db/query/collation:collation_spec.h",
"//src/mongo/db/query/collation:collator_interface.h",
"//src/mongo/db/query/compiler/physical_model/query_solution:eof_node_type.h",
"//src/mongo/db/query/compiler/physical_model/query_solution:stage_types.h",
"//src/mongo/db/query/datetime:date_time_support.h",
"//src/mongo/db/query/query_shape:serialization_options.h",
"//src/mongo/db/query/query_stats:data_bearing_node_metrics.h",
],
header_deps = [
"//src/mongo/bson/column",
"//src/mongo/db/auth:cluster_auth_mode",
"//src/mongo/db/fts:fts_query_noop",
"//src/mongo/platform:visibility_test_libcommon",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:cluster_role",
"//src/mongo/db/pipeline/spilling:spilling_stats",
"//src/mongo/db/query/client_cursor:cursor_response_idl",
"//src/mongo/db/stats:counter_ops",
"//src/mongo/db/storage:damage_vector",
],
)
@ -187,49 +133,6 @@ mongo_cc_library(
"//src/mongo/db/exec/sbe/stages:virtual_scan.cpp",
"//src/mongo/db/exec/sbe/stages:window.cpp",
],
hdrs = [
"//src/mongo/db/exec/sbe/stages:agg_project.h",
"//src/mongo/db/exec/sbe/stages:block_hashagg.h",
"//src/mongo/db/exec/sbe/stages:block_to_row.h",
"//src/mongo/db/exec/sbe/stages:branch.h",
"//src/mongo/db/exec/sbe/stages:bson_scan.h",
"//src/mongo/db/exec/sbe/stages:co_scan.h",
"//src/mongo/db/exec/sbe/stages:extract_field_paths.h",
"//src/mongo/db/exec/sbe/stages:filter.h",
"//src/mongo/db/exec/sbe/stages:hash_agg.h",
"//src/mongo/db/exec/sbe/stages:hash_agg_accumulator.h",
"//src/mongo/db/exec/sbe/stages:hash_join.h",
"//src/mongo/db/exec/sbe/stages:hash_lookup.h",
"//src/mongo/db/exec/sbe/stages:hash_lookup_unwind.h",
"//src/mongo/db/exec/sbe/stages:hashagg_base.h",
"//src/mongo/db/exec/sbe/stages:limit_skip.h",
"//src/mongo/db/exec/sbe/stages:lookup_hash_table.h",
"//src/mongo/db/exec/sbe/stages:loop_join.h",
"//src/mongo/db/exec/sbe/stages:makeobj.h",
"//src/mongo/db/exec/sbe/stages:merge_join.h",
"//src/mongo/db/exec/sbe/stages:project.h",
"//src/mongo/db/exec/sbe/stages:search_cursor.h",
"//src/mongo/db/exec/sbe/stages:sort.h",
"//src/mongo/db/exec/sbe/stages:sorted_merge.h",
"//src/mongo/db/exec/sbe/stages:sorted_stream_merger.h",
"//src/mongo/db/exec/sbe/stages:stage_visitors.h",
"//src/mongo/db/exec/sbe/stages:ts_bucket_to_cell_block.h",
"//src/mongo/db/exec/sbe/stages:union.h",
"//src/mongo/db/exec/sbe/stages:unique.h",
"//src/mongo/db/exec/sbe/stages:unwind.h",
"//src/mongo/db/exec/sbe/stages:virtual_scan.h",
"//src/mongo/db/exec/sbe/stages:window.h",
"//src/mongo/db/query/util:hash_roaring_set.h",
"//src/mongo/util:roaring_bitmaps.h",
],
private_hdrs = [
"//src/mongo/db/query/plan_cache:sbe_plan_cache.h",
"//src/mongo/db/query/stage_builder/sbe:builder_data.h",
"//src/mongo/db/query:explain.h",
"//src/mongo/db/query:plan_explainer_sbe.h",
"//src/mongo/db/query:plan_ranker.h",
"//src/mongo/db/query:sbe_plan_ranker.h",
],
deps = [
":query_sbe",
":query_sbe_plan_stats",
@ -266,11 +169,6 @@ mongo_cc_library(
"//src/mongo/db/exec/sbe/stages:ix_scan.cpp",
"//src/mongo/db/exec/sbe/stages:scan.cpp",
],
hdrs = [
"//src/mongo/db/exec/sbe/stages:collection_helpers.h",
"//src/mongo/db/exec/sbe/stages:ix_scan.h",
"//src/mongo/db/exec/sbe/stages:scan.h",
],
deps = [
":query_sbe",
"//src/mongo/db:shard_role",
@ -287,9 +185,6 @@ mongo_cc_library(
srcs = [
"sbe_plan_stage_test.cpp",
],
hdrs = [
"sbe_plan_stage_test.h",
],
deps = [
":query_sbe",
":query_sbe_stages",
@ -312,10 +207,6 @@ mongo_cc_library(
srcs = [
"sbe_unittest.cpp",
],
hdrs = [
"expression_test_base.h",
"sbe_unittest.h",
],
deps = [
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/db/query:query_test_service_context",
@ -444,14 +335,6 @@ mongo_cc_unit_test(
data = [
"//src/mongo/db/test_output/exec/sbe:test_data",
],
private_hdrs = [
":sbe_block_test_helpers.h",
":sbe_hash_lookup_shared_test.h",
":sbe_pattern_value_cmp.h",
":sbe_plan_stage_test.h",
"//src/mongo/db/exec:shard_filterer_mock.h",
"//src/mongo/db/query/stage_builder/sbe/tests:sbe_builder_test_fixture.h",
],
tags = ["mongo_unittest_eighth_group"],
deps = [
":sbe_plan_stage_test",
@ -462,7 +345,6 @@ mongo_cc_unit_test(
"//src/mongo/db/query:query_test_service_context",
"//src/mongo/db/query/collation:collator_interface_mock",
"//src/mongo/db/timeseries:bucket_compression",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/unittest",
"//src/mongo/util:pcre_wrapper",
],
@ -481,7 +363,6 @@ mongo_cc_benchmark(
"//src/mongo/db/exec:expression_bm_fixture",
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/db/query:query_test_service_context",
"//src/mongo/idl:server_parameter_test_controller",
],
)

View File

@ -34,15 +34,6 @@ mongo_cc_library(
"document_source_extension_optimizable.cpp",
"extension_stage.cpp",
],
hdrs = [
"document_source_extension.h",
"document_source_extension_expandable.h",
"document_source_extension_optimizable.h",
"extension_stage.h",
"host_portal.h",
"query_execution_context.h",
"static_properties_util.h",
],
deps = [
":extension_operation_metrics_registry",
"//src/mongo:base",
@ -63,15 +54,9 @@ mongo_cc_library(
"load_stub_parsers.cpp",
"//src/mongo/db/pipeline:document_source_list_extensions.cpp",
],
hdrs = [
"load_extension.h",
"load_extension_test_util.h",
"load_stub_parsers.h",
],
deps = [
":extension_host",
"//src/mongo:base",
"//src/mongo:core_headers_library",
"//src/mongo/db/query:query_knobs",
"//src/third_party/yaml-cpp:yaml",
],
@ -125,7 +110,6 @@ mongo_cc_unit_test(
deps = [
":extension_loader",
"//src/mongo/db/pipeline:aggregation_context_fixture",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/unittest",
],
)

View File

@ -11,11 +11,6 @@ exports_files(
mongo_cc_library(
name = "aggregation_stage",
srcs = [],
hdrs = [
"ast_node.h",
"executable_agg_stage.h",
"parse_node.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/extension/public:api",

View File

@ -17,14 +17,6 @@ mongo_cc_library(
"query_execution_context_adapter.cpp",
"query_shape_opts_adapter.cpp",
],
hdrs = [
"extension_handle.h",
"host_portal_adapter.h",
"host_services_adapter.h",
"query_execution_context_adapter.h",
"query_shape_opts_adapter.h",
"//src/mongo/db/extension/host:host_portal.h",
],
deps = [
"//src/mongo/db/extension/public:extensions_api_public",
# Note, for the time being we are linking in the C++ SDK here to reduce code duplication.
@ -45,14 +37,8 @@ mongo_cc_library(
"host_services_adapter.cpp",
"logger_adapter.cpp",
],
hdrs = [
"executable_agg_stage_adapter.h",
"host_services_adapter.h",
"logger_adapter.h",
],
deps = [
"//src/mongo:base",
"//src/mongo:core_headers_library",
"//src/mongo/db/extension/host/aggregation_stage",
"//src/mongo/db/extension/public:api",
"//src/mongo/db/extension/sdk:sdk_cpp",

View File

@ -10,9 +10,6 @@ exports_files(
mongo_cc_library(
name = "host_handles",
hdrs = [
"host_operation_metrics_handle.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:server_base",

View File

@ -14,19 +14,14 @@ mongo_cc_library(
":extension_agg_stage_static_properties_gen",
":extension_error_types_gen",
],
hdrs = [],
deps = [
":api",
"//src/mongo:base",
"//src/mongo:core_headers_library",
"//src/mongo/idl:idl_parser",
],
)
mongo_cc_library(
name = "api",
hdrs = ["api.h"],
)
mongo_cc_library(name = "api")
idl_generator(
name = "extension_error_types_gen",

View File

@ -16,26 +16,6 @@ mongo_cc_library(
"query_execution_context_handle.cpp",
"query_shape_opts_handle.cpp",
],
hdrs = [
"aggregation_stage.h",
"api_version_vector_to_span.h",
"assert_util.h",
"extension.h",
"extension_factory.h",
"extension_helper.h",
"extension_operation_metrics_handle.h",
"host_portal.h",
"host_services.h",
"log_util.h",
"logger.h",
"operation_metrics_adapter.h",
"query_execution_context_handle.h",
"query_shape_opts_handle.h",
"raii_vector_to_abi_array.h",
"test_extension_factory.h",
"test_extension_util.h",
"versioned_extension.h",
],
visibility = ["//visibility:public"],
deps = [
"//src/mongo:base",

View File

@ -10,7 +10,6 @@ exports_files(
mongo_cc_library(
name = "shared_test_stages",
hdrs = ["shared_test_stages.h"],
deps = [
"//src/mongo:base",
"//src/mongo/db/extension/host/aggregation_stage",

View File

@ -14,12 +14,6 @@ mongo_cc_library(
"byte_buf.cpp",
"extension_status.cpp",
],
hdrs = [
"byte_buf.h",
"byte_buf_utils.h",
"extension_status.h",
"get_next_result.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/extension/public:api",

View File

@ -11,10 +11,6 @@ exports_files(
mongo_cc_library(
name = "handle",
srcs = [],
hdrs = [
"byte_buf_handle.h",
"handle.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/extension/public:api",

View File

@ -17,13 +17,6 @@ mongo_cc_library(
"parse_node.cpp",
"stage_descriptor.cpp",
],
hdrs = [
"ast_node.h",
"executable_agg_stage.h",
"logical.h",
"parse_node.h",
"stage_descriptor.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:server_base",

View File

@ -54,6 +54,8 @@ extensions_with_config(
],
)
pkg_name = "//" + package_name() + "/"
############################## EXTENSIONS FOR PASSTHROUGH TESTS ##############################
### Any extension name suffix'ed with "_mongo_extension" with be automatically picked up by
### the extension passthroughs and loaded on all nodes, if it is also added to
@ -77,7 +79,7 @@ extensions_with_config(
[
mongo_cc_extension_shared_library(
name = extension_name + "_mongo_extension",
srcs = ["desugar/" + extension_name + ".cpp"],
srcs = [pkg_name + "desugar:" + extension_name + ".cpp"],
)
for extension_name in [
"match_topN",
@ -89,7 +91,7 @@ extensions_with_config(
[
mongo_cc_extension_shared_library(
name = extension_name + "_mongo_extension",
srcs = ["extension_options/" + extension_name + ".cpp"],
srcs = [pkg_name + "extension_options:" + extension_name + ".cpp"],
)
for extension_name in [
"test_options",
@ -102,7 +104,7 @@ extensions_with_config(
[
mongo_cc_extension_shared_library(
name = extension_name + "_mongo_extension",
srcs = ["loading/" + extension_name + ".cpp"],
srcs = [pkg_name + "loading:" + extension_name + ".cpp"],
)
for extension_name in [
"host_version_succeeds",
@ -115,7 +117,7 @@ extensions_with_config(
[
mongo_cc_extension_shared_library(
name = extension_name + "_mongo_extension",
srcs = ["host_services/" + extension_name + ".cpp"],
srcs = [pkg_name + "host_services:" + extension_name + ".cpp"],
)
for extension_name in [
"logging",
@ -128,7 +130,7 @@ extensions_with_config(
[
mongo_cc_extension_shared_library(
name = extension_name + "_mongo_extension",
srcs = ["observability/" + extension_name + ".cpp"],
srcs = [pkg_name + "observability:" + extension_name + ".cpp"],
)
for extension_name in [
"sharded_execution_serialization",
@ -148,7 +150,7 @@ extensions_with_config(
[
mongo_cc_extension_shared_library(
name = extension_name + "_bad_extension",
srcs = ["fail_to_load/" + extension_name + ".cpp"],
srcs = [pkg_name + "fail_to_load:" + extension_name + ".cpp"],
)
for extension_name in [
"no_symbol",

View File

@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])
exports_files(
glob([
"*.h",
"*.cpp",
]),
)

View File

@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])
exports_files(
glob([
"*.h",
"*.cpp",
]),
)

View File

@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])
exports_files(
glob([
"*.h",
"*.cpp",
]),
)

View File

@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])
exports_files(
glob([
"*.h",
"*.cpp",
]),
)

View File

@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])
exports_files(
glob([
"*.h",
"*.cpp",
]),
)

View File

@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])
exports_files(
glob([
"*.h",
"*.cpp",
]),
)

View File

@ -57,20 +57,6 @@ mongo_cc_library(
"util.cpp",
":ftdc_feature_flag_gen",
],
hdrs = [
"block_compressor.h",
"collector.h",
"compressor.h",
"config.h",
"constants.h",
"controller.h",
"decompressor.h",
"file_manager.h",
"file_reader.h",
"file_writer.h",
"metadata_compressor.h",
"util.h",
],
deps = [
":ftdc_collection_metrics",
"//src/mongo/bson:bson_validate",
@ -91,7 +77,8 @@ mongo_cc_library(
"ftdc_server.cpp",
"ftdc_system_stats.cpp",
":ftdc_server_gen",
] + select({
],
srcs_select = [{
config: [
"ftdc_system_stats_{}.cpp".format(os_file_suffix),
]
@ -100,14 +87,7 @@ mongo_cc_library(
"@platforms//os:linux": "linux",
"@platforms//os:macos": "osx",
}.items()
}),
hdrs = [
"ftdc_server.h",
"ftdc_system_stats.h",
"//src/mongo/db:mirror_maestro.h",
"//src/mongo/db:mirror_maestro_gen",
"//src/mongo/transport:transport_layer_manager",
],
}],
deps = [
":ftdc",
"//src/mongo/db:commands",
@ -145,9 +125,6 @@ mongo_cc_library(
srcs = [
"ftdc_mongos.cpp",
],
hdrs = [
"ftdc_mongos.h",
],
deps = [
":ftdc_commands",
":ftdc_server",
@ -165,9 +142,6 @@ mongo_cc_library(
"ftdc_mongod.cpp",
":ftdc_mongod_gen",
],
hdrs = [
"ftdc_mongod.h",
],
deps = [
":ftdc_commands",
":ftdc_mongos",
@ -198,7 +172,6 @@ mongo_cc_unit_test(
"ftdc_util_test.cpp",
"metadata_compressor_test.cpp",
],
private_hdrs = [":ftdc_test.h"],
tags = ["mongo_unittest_second_group"],
deps = [
":ftdc",
@ -214,9 +187,6 @@ mongo_cc_library(
srcs = [
"collection_metrics.cpp",
],
hdrs = [
"collection_metrics.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:service_context",
@ -235,7 +205,6 @@ mongo_cc_library(
],
deps = [
"//src/mongo:base",
"//src/mongo:core_headers_library",
"//src/mongo/stdx",
],
)

View File

@ -13,11 +13,6 @@ exports_files(
mongo_cc_library(
name = "fts_query_noop",
srcs = ["fts_query_noop.cpp"],
hdrs = [
"fts_query.h",
"fts_query_noop.h",
"fts_util.h",
],
deps = [
"//src/mongo:base",
],
@ -42,7 +37,7 @@ STOP_WORD_LANGUAGES = [
]
render_template(
name = "stop_words_list_cpp_gen",
name = "stop_words_list_cpp",
srcs = [
"stop_words_{}.txt".format(lang)
for lang in STOP_WORD_LANGUAGES
@ -78,26 +73,8 @@ mongo_cc_library(
"fts_util.cpp",
"stemmer.cpp",
"stop_words.cpp",
"stop_words_list.cpp",
"tokenizer.cpp",
":stop_words_list_cpp_gen",
],
hdrs = [
"fts_basic_phrase_matcher.h",
"fts_basic_tokenizer.h",
"fts_element_iterator.h",
"fts_index_format.h",
"fts_language.h",
"fts_matcher.h",
"fts_query_impl.h",
"fts_query_parser.h",
"fts_spec.h",
"fts_unicode_phrase_matcher.h",
"fts_unicode_tokenizer.h",
"fts_util.h",
"stemmer.h",
"stop_words.h",
"stop_words_list.h",
"tokenizer.h",
],
deps = [
"//src/mongo:base",

View File

@ -64,16 +64,6 @@ mongo_cc_library(
"codepoints_diacritic_map.cpp",
"string.cpp",
],
hdrs = [
"byte_vector.h",
"codepoints.h",
"string.h",
] + select({
"@platforms//cpu:x86_64": ["byte_vector_sse2.h"],
"@platforms//cpu:aarch64": ["byte_vector_neon.h"],
"@platforms//cpu:ppc": ["byte_vector_altivec.h"],
"//conditions:default": [],
}),
deps = [
"//src/mongo:base",
"//src/mongo/shell:linenoise_utf8",

View File

@ -18,13 +18,6 @@ mongo_cc_library(
"r2_region_coverer.cpp",
"shapes.cpp",
],
hdrs = [
"big_polygon.h",
"hash.h",
"r2_region_coverer.h",
"shapes.h",
],
private_hdrs = ["//src/mongo/util/transitional_tools_do_not_use:vector_spooling.h"],
deps = [
"//src/mongo:base", # TODO(SERVER-93876): Remove.
"//src/mongo/db:common",
@ -40,11 +33,6 @@ mongo_cc_library(
"geometry_container.cpp",
"geoparser.cpp",
],
hdrs = [
"geoconstants.h",
"geometry_container.h",
"geoparser.h",
],
deps = [
":geometry",
"//src/mongo:base", # TODO(SERVER-93876): Remove.

View File

@ -126,29 +126,6 @@ mongo_cc_library(
srcs = [
"sharding_catalog_client.cpp",
],
hdrs = [
"sharding_catalog_client.h",
"type_namespace_placement_gen",
"type_shard.h",
"type_tags.h",
"//src/mongo/db/commands/query_cmd:bulk_write_crud_op.h",
"//src/mongo/db/commands/query_cmd:bulk_write_gen",
"//src/mongo/db/commands/query_cmd:bulk_write_parser.h",
"//src/mongo/db/global_catalog/ddl:placement_history_commands_gen",
"//src/mongo/db/pipeline:aggregate_command_gen",
"//src/mongo/db/pipeline:aggregation_request_helper.h",
"//src/mongo/db/query:count_request.h",
"//src/mongo/db/repl:optime_with.h",
"//src/mongo/db/sharding_environment/client:shard_gen",
"//src/mongo/rpc:write_concern_error_detail.h",
"//src/mongo/s/write_ops:batched_command_request.h",
"//src/mongo/s/write_ops:batched_command_response.h",
"//src/mongo/s/write_ops:batched_upsert_detail.h",
],
header_deps = [
"//src/mongo/db/commands/server_status:server_status_core",
"//src/mongo/db/exec/mutable_bson:mutable_bson",
],
deps = [
"//src/mongo/db:keys_collection_document",
"//src/mongo/db:server_base",
@ -161,10 +138,6 @@ mongo_cc_library(
srcs = [
"sharding_catalog_client_impl.cpp",
],
hdrs = [
"sharding_catalog_client_impl.h",
"//src/mongo/db/pipeline:aggregate_command_gen",
],
deps = [
":sharding_catalog_client",
"//src/mongo/db/pipeline",
@ -185,9 +158,6 @@ mongo_cc_library(
srcs = [
"sharding_catalog_client_mock.cpp",
],
hdrs = [
"sharding_catalog_client_mock.h",
],
deps = [
":sharding_catalog_client",
"//src/mongo/s/client:shard_interface",

View File

@ -404,9 +404,6 @@ mongo_cc_library(
srcs = [
":notify_sharding_event_gen",
],
header_deps = [
"//src/mongo/db/user_write_block:set_user_write_block_mode_idl",
],
deps = [
"//src/mongo/db:server_base",
],

View File

@ -16,11 +16,6 @@ mongo_cc_library(
"expression_params.cpp",
"s2_common.cpp",
],
hdrs = [
"2d_common.h",
"expression_params.h",
"s2_common.h",
],
deps = [
"//src/mongo/bson/util:bson_extract", # TODO(SERVER-93876): Remove.
"//src/mongo/db:mongohasher",
@ -38,9 +33,6 @@ mongo_cc_library(
srcs = [
"multikey_paths.cpp",
],
hdrs = [
"multikey_paths.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:common",
@ -66,28 +58,6 @@ mongo_cc_library(
"wildcard_validation.cpp",
"//src/mongo/db/local_catalog:index_descriptor.cpp",
],
hdrs = [
"2d_access_method.h",
"2d_key_generator.h",
"btree_access_method.h",
"btree_key_generator.h",
"expression_keys_private.h",
"fts_access_method.h",
"hash_access_method.h",
"index_access_method.h",
"multikey_metadata_access_stats.h",
"multikey_paths.h",
"s2_access_method.h",
"s2_bucket_access_method.h",
"s2_key_generator.h",
"sort_key_generator.h",
"wildcard_access_method.h",
"wildcard_key_generator.h",
"wildcard_validation.h",
"//src/mongo/db/exec:index_path_projection.h",
"//src/mongo/db/local_catalog:index_descriptor.h",
],
private_hdrs = ["//src/mongo/db/storage/kv:kv_engine.h"],
deps = [
":expression_params",
":multikey_paths",
@ -151,10 +121,6 @@ mongo_cc_library(
srcs = [
"preallocated_container_pool.cpp",
],
hdrs = [
"preallocated_container_pool.h",
"//src/mongo/util:auto_clear_ptr.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/storage/key_string",
@ -193,7 +159,6 @@ mongo_cc_unit_test(
"//src/mongo/db/query/compiler/logical_model/sort_pattern",
"//src/mongo/db/sorter:sorter_stats",
"//src/mongo/db/storage:storage_options",
"//src/mongo/idl:server_parameter_test_controller",
"//src/third_party/snappy",
],
)

View File

@ -15,9 +15,6 @@ mongo_cc_library(
"commit_quorum_options.cpp",
":commit_quorum_gen",
],
hdrs = [
"commit_quorum_options.h",
],
deps = [
"//src/mongo/bson/util:bson_extract",
"//src/mongo/db:server_base",
@ -29,9 +26,6 @@ mongo_cc_library(
srcs = [
"index_build_block.cpp",
],
hdrs = [
"index_build_block.h",
],
deps = [
":index_builds_common",
"//src/mongo/db:audit",
@ -54,9 +48,6 @@ mongo_cc_library(
srcs = [
"index_build_entry_helpers.cpp",
],
hdrs = [
"index_build_entry_helpers.h",
],
deps = [
":commit_quorum_options",
":index_build_entry_idl",
@ -87,9 +78,6 @@ mongo_cc_library(
srcs = [
"index_build_oplog_entry.cpp",
],
hdrs = [
"index_build_oplog_entry.h",
],
no_undefined_ref_DO_NOT_USE = False,
deps = [
":commit_quorum_options",
@ -108,9 +96,6 @@ mongo_cc_library(
srcs = [
"index_builds_common.cpp",
],
hdrs = [
"index_builds_common.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:server_base",
@ -128,13 +113,6 @@ mongo_cc_library(
"rebuild_indexes.cpp",
"repl_index_build_state.cpp",
],
hdrs = [
"active_index_builds.h",
"index_builds_coordinator.h",
"index_builds_manager.h",
"rebuild_indexes.h",
"repl_index_build_state.h",
],
deps = [
":commit_quorum_options",
":index_build_entry_helpers",
@ -171,18 +149,6 @@ mongo_cc_library(
srcs = [
"index_builds_coordinator_mock.cpp",
],
hdrs = [
"index_builds_coordinator_mock.h",
],
header_deps = [
":resumable_index_builds_idl",
":index_build_entry_helpers",
":two_phase_index_build_knobs_idl",
"//src/mongo/db:shard_role",
"//src/mongo/executor:task_executor_interface",
"//src/mongo/db/local_catalog:collection_catalog",
"//src/mongo/db/s:forwardable_operation_metadata",
],
deps = [
":index_builds_coordinator",
],
@ -196,13 +162,7 @@ mongo_cc_library(
"skipped_record_tracker.cpp",
":index_build_interceptor_gen",
],
hdrs = [
"duplicate_key_tracker.h",
"index_build_interceptor.h",
"skipped_record_tracker.h",
],
no_undefined_ref_DO_NOT_USE = False,
private_hdrs = ["//src/mongo/db/index:index_access_method.h"],
deps = [
":index_builds_common",
":two_phase_index_build_knobs_idl",
@ -223,9 +183,6 @@ mongo_cc_library(
srcs = [
"index_builds_coordinator_mongod.cpp",
],
hdrs = [
"index_builds_coordinator_mongod.h",
],
deps = [
":index_build_entry_helpers",
":index_build_entry_idl",
@ -252,9 +209,6 @@ mongo_cc_library(
"multi_index_block.cpp",
":multi_index_block_gen",
],
hdrs = [
"multi_index_block.h",
],
deps = [
":index_build_block",
":resumable_index_builds_idl",

View File

@ -11,10 +11,6 @@ exports_files(
mongo_cc_library(
name = "index_catalog_mock",
hdrs = [
"index_catalog_mock.h",
],
private_hdrs = [":index_catalog_entry_mock.h"],
deps = [
],
)
@ -24,9 +20,6 @@ mongo_cc_library(
srcs = [
"cannot_convert_index_to_unique_info.cpp",
],
hdrs = [
"cannot_convert_index_to_unique_info.h",
],
deps = [
"//src/mongo:base",
],
@ -60,13 +53,6 @@ mongo_cc_library(
"collection_options_gen",
"collection_options_validation.cpp",
],
hdrs = [
"clustered_collection_util.h",
"collection_options.h",
"collection_options_validation.h",
"//src/mongo/db/index:index_constants.h",
],
private_hdrs = ["//src/mongo/db/local_catalog/ddl:create_command_validation.h"],
deps = [
# TODO(SERVER-93876): Technically only requires `//src/mongo/db:common`.
"//src/mongo/crypto:encrypted_field_config",
@ -86,9 +72,6 @@ mongo_cc_library(
srcs = [
"local_oplog_info.cpp",
],
hdrs = [
"local_oplog_info.h",
],
deps = [
"//src/mongo/db:server_base", # TODO(SERVER-93876): Remove.
"//src/mongo/db:vector_clock_mutable",
@ -107,9 +90,6 @@ mongo_cc_library(
srcs = [
"durable_catalog.cpp",
],
hdrs = [
"durable_catalog.h",
],
deps = [
":collection_record_store_options",
":durable_catalog_entry_metadata",
@ -128,9 +108,6 @@ mongo_cc_library(
srcs = [
"durable_catalog_entry_metadata.cpp",
],
hdrs = [
"durable_catalog_entry_metadata.h",
],
deps = [
":collection_options",
"//src/mongo/db:common",
@ -147,13 +124,6 @@ mongo_cc_library(
"uncommitted_multikey.cpp",
"views_for_database.cpp",
],
hdrs = [
"collection_catalog.h",
"historical_catalogid_tracker.h",
"uncommitted_catalog_updates.h",
"uncommitted_multikey.h",
"views_for_database.h",
],
deps = [
":durable_catalog",
":durable_catalog_entry_metadata",
@ -164,7 +134,6 @@ mongo_cc_library(
"//src/mongo/db/collection_crud",
"//src/mongo/db/query/collation:collator_factory_interface", # TODO(SERVER-93876): Remove.
"//src/mongo/db/query/query_stats", # TODO(SERVER-93876): Remove.
"//src/mongo/db/storage:exceptions",
"//src/mongo/db/storage:mdb_catalog",
"//src/mongo/db/storage:storage_options", # TODO(SERVER-93876): Remove.
"//src/mongo/db/views", # TODO(SERVER-93876): Remove.
@ -179,12 +148,6 @@ mongo_cc_library(
"//src/mongo/db/query:query_settings_decoration.cpp",
"//src/mongo/db/query/plan_cache:plan_cache_key_factory.cpp",
],
hdrs = [
"//src/mongo/db/query:collection_index_usage_tracker_decoration.h",
"//src/mongo/db/query:collection_query_info.h",
"//src/mongo/db/query:query_settings_decoration.h",
"//src/mongo/db/query/plan_cache:plan_cache_key_factory.h",
],
deps = [
"index_catalog",
"//src/mongo/db:collection_index_usage_tracker",
@ -213,9 +176,6 @@ mongo_cc_library(
srcs = [
"collection_uuid_mismatch_info.cpp",
],
hdrs = [
"collection_uuid_mismatch_info.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -237,73 +197,6 @@ mongo_cc_library(
"index_catalog.cpp",
"index_catalog_entry.cpp",
],
hdrs = [
"clustered_collection_options_gen",
"collection_options_gen",
"index_catalog.h",
"index_catalog_entry.h",
"//src/mongo/base:error_codes_header",
"//src/mongo/bson:bson_validate_gen",
"//src/mongo/client:client_api_version_parameters_gen",
"//src/mongo/client:hedging_mode_gen",
"//src/mongo/client:read_preference_gen",
"//src/mongo/crypto:encryption_fields_gen",
"//src/mongo/crypto:fle_stats_gen",
"//src/mongo/db:api_parameters_gen",
"//src/mongo/db:basic_types_gen",
"//src/mongo/db:multitenancy_gen",
"//src/mongo/db:namespace_spec_gen",
"//src/mongo/db:read_write_concern_provenance_base_gen",
"//src/mongo/db:write_concern_gen",
"//src/mongo/db/auth:access_checks_gen",
"//src/mongo/db/auth:action_type_gen",
"//src/mongo/db/auth:auth_types_gen",
"//src/mongo/db/cluster_parameters:cluster_server_parameter_gen",
"//src/mongo/db/global_catalog:type_collection_common_types_gen",
"//src/mongo/db/global_catalog/router_role_api:gossiped_routing_cache_gen",
"//src/mongo/db/matcher/schema:encrypt_schema_gen",
"//src/mongo/db/pipeline:change_stream_pre_and_post_images_options_gen",
"//src/mongo/db/pipeline:document_source_change_stream_gen",
"//src/mongo/db/pipeline:legacy_runtime_constants_gen",
"//src/mongo/db/pipeline:storage_stats_spec_gen",
"//src/mongo/db/query:distinct_command_gen",
"//src/mongo/db/query:explain_verbosity_gen",
"//src/mongo/db/query:find_command_gen",
"//src/mongo/db/query:query_feature_flags_gen",
"//src/mongo/db/query:query_knobs_gen",
"//src/mongo/db/query:tailable_mode_gen",
"//src/mongo/db/query/client_cursor:cursor_response_gen",
"//src/mongo/db/query/client_cursor:generic_cursor_gen",
"//src/mongo/db/query/query_settings:query_settings_gen",
"//src/mongo/db/query/write_ops:single_write_result_gen",
"//src/mongo/db/query/write_ops:write_ops_gen",
"//src/mongo/db/repl:apply_ops_gen",
"//src/mongo/db/repl:member_config_gen",
"//src/mongo/db/repl:oplog_entry_gen",
"//src/mongo/db/repl:optime_base_gen",
"//src/mongo/db/repl:read_concern_gen",
"//src/mongo/db/repl:repl_server_parameters_gen",
"//src/mongo/db/repl:repl_set_config_gen",
"//src/mongo/db/repl:repl_set_config_params_gen",
"//src/mongo/db/session:logical_session_cache_gen",
"//src/mongo/db/session:logical_session_id_gen",
"//src/mongo/db/sorter:sorter_gen",
"//src/mongo/db/timeseries:timeseries_gen",
"//src/mongo/db/vector_clock:vector_clock_gen",
"//src/mongo/db/versioning_protocol:chunk_version_gen",
"//src/mongo/db/versioning_protocol:database_version_base_gen",
"//src/mongo/idl:generic_argument_gen",
"//src/mongo/rpc:topology_version_gen",
"//src/mongo/rpc/metadata:audit_metadata_gen",
"//src/mongo/util/version:releases_header",
],
header_deps = [
"//src/mongo/db/exec/mutable_bson:mutable_bson",
"//src/mongo/db/pipeline/process_interface:mongo_process_interface",
"//src/mongo/db/query:hint_parser",
"//src/mongo/db/repl:oplog_buffer_batched_queue",
"//src/mongo/db/storage:duplicate_key_error_info",
],
deps = [
"//src/mongo/crypto:fle_fields",
"//src/mongo/db:server_base",
@ -317,13 +210,6 @@ mongo_cc_library(
srcs = [
"database_holder.cpp",
],
hdrs = [
"database.h",
"database_holder.h",
"virtual_collection_options.h",
"//src/mongo/db:dbcommands_gen",
"//src/mongo/db/pipeline:external_data_source_option_gen",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:service_context",
@ -332,9 +218,6 @@ mongo_cc_library(
mongo_cc_library(
name = "database_holder_mock",
hdrs = [
"database_holder_mock.h",
],
deps = [
":database_holder",
],
@ -345,9 +228,6 @@ mongo_cc_library(
srcs = [
"document_validation.cpp",
],
hdrs = [
"document_validation.h",
],
deps = [
"//src/mongo/db:service_context",
],
@ -358,10 +238,6 @@ mongo_cc_library(
srcs = [
"index_key_validate.cpp",
],
hdrs = [
"index_key_validate.h",
"//src/mongo/db/ttl:ttl_collection_cache.h",
],
deps = [
"//src/mongo/db:common",
"//src/mongo/db:query_expressions",
@ -377,9 +253,6 @@ mongo_cc_library(
srcs = [
"throttle_cursor.cpp",
],
hdrs = [
"throttle_cursor.h",
],
deps = [
"//src/mongo/db/index:index_access_method",
"//src/mongo/db/query/query_stats",
@ -393,9 +266,6 @@ mongo_cc_library(
srcs = [
"catalog_stats.cpp",
],
hdrs = [
"catalog_stats.h",
],
deps = [
":collection_catalog",
":database_holder",
@ -410,9 +280,6 @@ mongo_cc_library(
srcs = [
"index_repair.cpp",
],
hdrs = [
"index_repair.h",
],
deps = [
":collection_options",
"//src/mongo/db:shard_role",
@ -431,9 +298,6 @@ mongo_cc_library(
srcs = [
"catalog_repair.cpp",
],
hdrs = [
"catalog_repair.h",
],
deps = [
":durable_catalog",
"//src/mongo/db:server_base",
@ -460,23 +324,6 @@ mongo_cc_library(
"unique_collection_name.cpp",
"//src/mongo/db/collection_crud:capped_utils.cpp",
],
hdrs = [
"backwards_compatible_collection_options_util.h",
"coll_mod.h",
"coll_mod_index.h",
"collection_catalog_helper.h",
"collection_compact.h",
"create_collection.h",
"drop_collection.h",
"drop_database.h",
"drop_indexes.h",
"external_data_source_scope_guard.h",
"list_indexes.h",
"rename_collection.h",
"unique_collection_name.h",
"//src/mongo/db/collection_crud:capped_utils.h",
],
private_hdrs = ["//src/mongo/db/op_observer:batched_write_policy.h"],
deps = [
":cannot_convert_index_to_unique_info",
":collection_options",
@ -526,9 +373,6 @@ mongo_cc_library(
srcs = [
"catalog_control.cpp",
],
hdrs = [
"catalog_control.h",
],
deps = [
":catalog_repair",
":catalog_stats",
@ -552,9 +396,6 @@ mongo_cc_library(
srcs = [
"collection_record_store_options.cpp",
],
hdrs = [
"collection_record_store_options.h",
],
deps = [
":collection_options",
"//src/mongo/db:server_base",
@ -573,15 +414,6 @@ mongo_cc_library(
"index_catalog_impl.cpp",
"virtual_collection_impl.cpp",
],
hdrs = [
"collection_impl.h",
"database_holder_impl.h",
"database_impl.h",
"index_catalog_entry_helpers.h",
"index_catalog_entry_impl.h",
"index_catalog_impl.h",
"virtual_collection_impl.h",
],
deps = [
"catalog_helpers",
"catalog_stats",
@ -642,9 +474,6 @@ mongo_cc_library(
srcs = [
"snapshot_helper.cpp",
],
hdrs = [
"snapshot_helper.h",
],
deps = [
"//src/mongo/db/repl:read_concern_args",
"//src/mongo/db/repl:repl_coordinator_interface",
@ -656,9 +485,6 @@ mongo_cc_library(
srcs = [
"catalog_test_fixture.cpp",
],
hdrs = [
"catalog_test_fixture.h",
],
deps = [
":catalog_helpers",
"//src/mongo/db:server_base",
@ -672,9 +498,6 @@ mongo_cc_library(
mongo_cc_library(
name = "collection_mock",
hdrs = [
"collection_mock.h",
],
deps = [":collection_options"],
)
@ -758,7 +581,6 @@ mongo_cc_unit_test(
"//src/mongo/db/validate:collection_validation",
"//src/mongo/db/validate:validate_idl",
"//src/mongo/db/validate:validate_state",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/unittest",
"//src/mongo/util:clock_source_mock",
"//src/mongo/util:pcre_wrapper",
@ -780,7 +602,6 @@ mongo_cc_unit_test(
"//src/mongo/db:service_context_d_test_fixture",
"//src/mongo/db/query/collation:collator_factory_mock",
"//src/mongo/db/query/collation:collator_interface_mock",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/unittest",
],
)
@ -816,7 +637,6 @@ mongo_cc_unit_test(
"//src/mongo/db/validate:collection_validation",
"//src/mongo/db/validate:validate_idl",
"//src/mongo/db/validate:validate_state",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/unittest",
"//src/mongo/util:clock_source_mock",
"//src/mongo/util:pcre_wrapper",
@ -865,9 +685,6 @@ mongo_cc_library(
srcs = [
":validate_db_metadata_gen",
],
header_deps = [
"//src/mongo/db/user_write_block:set_user_write_block_mode_idl",
],
deps = [
"//src/mongo/db:server_base",
],

View File

@ -170,7 +170,6 @@ mongo_cc_library(
srcs = [
":server_parameters_gen",
],
hdrs = [],
deps = [
"//src/mongo/db:server_base",
],
@ -181,9 +180,6 @@ mongo_cc_library(
srcs = [
":rename_collection_gen",
],
header_deps = [
"//src/mongo/db/user_write_block:set_user_write_block_mode_idl",
],
deps = [
"//src/mongo/db:commands",
"//src/mongo/db:server_base",

View File

@ -21,15 +21,11 @@ mongo_cc_library(
"exception_util.cpp",
":exception_util_gen",
],
hdrs = [
"exception_util.h",
],
deps = [
"//src/mongo/db:server_base",
"//src/mongo/db:server_options_servers",
"//src/mongo/db/commands/server_status:server_status_core", # TODO(SERVER-93876): Remove.
"//src/mongo/db/query/query_stats",
"//src/mongo/db/storage:exceptions",
"//src/mongo/db/storage:recovery_unit_base", # TODO(SERVER-93876): Remove.
"//src/mongo/util:log_and_backoff",
],
@ -46,23 +42,12 @@ mongo_cc_library(
"locker.cpp",
"resource_catalog.cpp",
],
hdrs = [
"cond_var_lock_grant_notification.h",
"fill_locker_info.h",
"lock_manager.h",
"lock_manager_defs.h",
"lock_stats.h",
"locker.h",
"resource_catalog.h",
],
no_undefined_ref_DO_NOT_USE = False,
private_hdrs = [":lock_request_list.h"],
deps = [
":flow_control_ticketholder",
"//src/mongo/db:server_base",
"//src/mongo/db/admission:execution_admission_context", # TODO(SERVER-93876): Remove.
"//src/mongo/db/admission:ticketing_system",
"//src/mongo/db/stats:counter_ops",
"//src/mongo/db/storage/key_string",
"//src/mongo/util:background_job", # TODO(SERVER-93876): Remove.
"//src/mongo/util/concurrency:spin_lock", # TODO(SERVER-93876): Remove.
@ -75,16 +60,10 @@ mongo_cc_library(
srcs = [
"//src/mongo/db:flow_control_ticketholder.cpp",
],
hdrs = [
"//src/mongo:core_headers",
"//src/mongo/db:flow_control_ticketholder.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/crypto:sha256_block",
"//src/mongo/db:cluster_role",
"//src/mongo/db/stats:counter_ops",
"//src/mongo/db/storage:damage_vector",
"//src/mongo/db/storage:ident",
"//src/mongo/util:secure_compare_memory",
],
@ -117,7 +96,6 @@ mongo_cc_unit_test(
"locker_test.cpp",
"resource_catalog_test.cpp",
],
private_hdrs = [":lock_manager_test_help.h"],
tags = ["mongo_unittest_sixth_group"],
deps = [
":exception_util",

View File

@ -15,18 +15,7 @@ mongo_cc_library(
srcs = [
"resource_yielders.cpp",
],
hdrs = [
"resource_yielders.h",
"//src/mongo/db/transaction:transaction_participant_resource_yielder.h",
"//src/mongo/s:transaction_router_resource_yielder.h",
],
header_deps = [
"//src/mongo/db/pipeline/process_interface:mongo_process_interface",
"//src/mongo/executor:async_rpc_error_info",
"//src/mongo/idl:idl_parser",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/storage:damage_vector",
],
)

View File

@ -15,7 +15,5 @@ mongo_cc_unit_test(
"partitioned_test.cpp",
],
tags = ["mongo_unittest_seventh_group"],
deps = [
"//src/mongo:core_headers_library",
],
deps = [],
)

View File

@ -15,10 +15,6 @@ mongo_cc_library(
"path.cpp",
"path_internal.cpp",
],
hdrs = [
"path.h",
"path_internal.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:common",
@ -32,11 +28,6 @@ mongo_cc_library(
"expression_where.cpp",
"extensions_callback_real.cpp",
],
hdrs = [
"expression_text.h",
"expression_where.h",
"extensions_callback_real.h",
],
deps = [
"//src/mongo/db:query_expressions",
"//src/mongo/db:shard_role",
@ -51,9 +42,6 @@ mongo_cc_library(
srcs = [
"expression_algo.cpp",
],
hdrs = [
"expression_algo.h",
],
deps = [
"//src/mongo/db:query_expressions",
"//src/mongo/db/query/compiler/dependency_analysis",
@ -102,7 +90,6 @@ mongo_cc_unit_test(
"//src/mongo/db/test_output/matcher/debug_string_test:test_data",
"//src/mongo/db/test_output/matcher/split_match_expression_expr_test:test_data",
],
private_hdrs = ["//src/mongo/db/query/compiler/rewrites/boolean_simplification:bitset_test_util.h"],
tags = ["mongo_unittest_first_group"],
deps = [
":expression_algo",
@ -116,6 +103,5 @@ mongo_cc_unit_test(
"//src/mongo/db/query:query_test_service_context",
"//src/mongo/db/query/collation:collator_interface_mock",
"//src/mongo/db/query/compiler/parsers/matcher:parsed_match_expression_for_test",
"//src/mongo/idl:server_parameter_test_controller",
],
)

View File

@ -15,10 +15,6 @@ mongo_cc_library(
"doc_validation_error.cpp",
"doc_validation_util.cpp",
],
hdrs = [
"doc_validation_error.h",
"doc_validation_util.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:query_expressions",
@ -31,7 +27,6 @@ mongo_cc_unit_test(
"doc_validation_error_json_schema_test.cpp",
"doc_validation_error_test.cpp",
],
private_hdrs = [":doc_validation_error_test.h"],
tags = ["mongo_unittest_fourth_group"],
deps = [
":doc_validation",

View File

@ -14,10 +14,6 @@ mongo_cc_library(
srcs = [
"operation_memory_usage_tracker.cpp",
],
hdrs = [
"memory_usage_tracker.h",
"operation_memory_usage_tracker.h",
],
deps = [
"//src/mongo/db:commands",
"//src/mongo/db:server_feature_flags",
@ -37,6 +33,5 @@ mongo_cc_unit_test(
"//src/mongo/db:service_context_test_fixture",
"//src/mongo/db/pipeline:aggregation_context_fixture",
"//src/mongo/db/pipeline:document_source_mock",
"//src/mongo/idl:server_parameter_test_controller",
],
)

View File

@ -15,113 +15,6 @@ mongo_cc_library(
"op_observer.cpp",
"op_observer_registry.cpp",
],
hdrs = [
"op_observer.h",
"op_observer_noop.h",
"op_observer_registry.h",
"//src/mongo/base:data_type_validated.h",
"//src/mongo/bson:bsonelement_comparator.h",
"//src/mongo/crypto:aead_encryption.h",
"//src/mongo/crypto:fle_crypto_predicate.h",
"//src/mongo/crypto:fle_crypto_types.h",
"//src/mongo/crypto:fle_data_frames.h",
"//src/mongo/crypto:fle_key_types.h",
"//src/mongo/crypto:fle_stats_gen",
"//src/mongo/crypto:fle_tokens.h",
"//src/mongo/crypto:symmetric_crypto.h",
"//src/mongo/crypto:symmetric_key.h",
"//src/mongo/db:keypattern.h",
"//src/mongo/db:yieldable.h",
"//src/mongo/db/exec:shard_filterer.h",
"//src/mongo/db/exec/classic:working_set.h",
"//src/mongo/db/exec/classic:working_set_common.h",
"//src/mongo/db/exec/document_value:document_comparator.h",
"//src/mongo/db/exec/document_value:value_comparator.h",
"//src/mongo/db/exec/sbe/values:bson.h",
"//src/mongo/db/exec/sbe/values:key_string_entry.h",
"//src/mongo/db/exec/sbe/values:value.h",
"//src/mongo/db/fts:fts_basic_phrase_matcher.h",
"//src/mongo/db/fts:fts_language.h",
"//src/mongo/db/fts:fts_matcher.h",
"//src/mongo/db/fts:fts_phrase_matcher.h",
"//src/mongo/db/fts:fts_query_impl.h",
"//src/mongo/db/fts:fts_spec.h",
"//src/mongo/db/fts:fts_tokenizer.h",
"//src/mongo/db/fts:fts_unicode_phrase_matcher.h",
"//src/mongo/db/fts:stemmer.h",
"//src/mongo/db/fts:stop_words.h",
"//src/mongo/db/fts:tokenizer.h",
"//src/mongo/db/global_catalog:chunk.h",
"//src/mongo/db/global_catalog:chunk_manager.h",
"//src/mongo/db/global_catalog:shard_key_pattern.h",
"//src/mongo/db/global_catalog:type_chunk.h",
"//src/mongo/db/global_catalog:type_chunk_base_gen",
"//src/mongo/db/global_catalog:type_chunk_range.h",
"//src/mongo/db/global_catalog:type_chunk_range_base_gen",
"//src/mongo/db/global_catalog:type_collection_common_types_gen",
"//src/mongo/db/index_builds:commit_quorum_options.h",
"//src/mongo/db/local_catalog:durable_catalog_entry_metadata.h",
"//src/mongo/db/matcher:expression_leaf.h",
"//src/mongo/db/matcher:expression_path.h",
"//src/mongo/db/matcher:expression_text_base.h",
"//src/mongo/db/matcher:expression_tree.h",
"//src/mongo/db/matcher:expression_type.h",
"//src/mongo/db/matcher:expression_where_base.h",
"//src/mongo/db/matcher:expression_with_placeholder.h",
"//src/mongo/db/matcher:extensions_callback.h",
"//src/mongo/db/matcher:extensions_callback_noop.h",
"//src/mongo/db/matcher:in_list_data.h",
"//src/mongo/db/matcher:matcher_type_set.h",
"//src/mongo/db/matcher/schema:encrypt_schema_gen",
"//src/mongo/db/matcher/schema:encrypt_schema_types.h",
"//src/mongo/db/matcher/schema:expression_internal_schema_allowed_properties.h",
"//src/mongo/db/matcher/schema:json_pointer.h",
"//src/mongo/db/pipeline:accumulator_percentile_enum_gen",
"//src/mongo/db/pipeline:document_path_support.h",
"//src/mongo/db/pipeline:document_source_change_stream_gen",
"//src/mongo/db/pipeline:expression.h",
"//src/mongo/db/pipeline:expression_context.h",
"//src/mongo/db/pipeline:expression_visitor.h",
"//src/mongo/db/pipeline:expression_walker.h",
"//src/mongo/db/pipeline:javascript_execution.h",
"//src/mongo/db/pipeline:monotonic_expression.h",
"//src/mongo/db/pipeline:percentile_algo.h",
"//src/mongo/db/pipeline:percentile_algo_accurate.h",
"//src/mongo/db/pipeline:percentile_algo_continuous.h",
"//src/mongo/db/pipeline:percentile_algo_discrete.h",
"//src/mongo/db/pipeline:resume_token.h",
"//src/mongo/db/query:bson_typemask.h",
"//src/mongo/db/query:distinct_command_gen",
"//src/mongo/db/query:query_feature_flags_gen",
"//src/mongo/db/query:query_knob_configuration.h",
"//src/mongo/db/query:tailable_mode.h",
"//src/mongo/db/query:tailable_mode_gen",
"//src/mongo/db/query/collation:collator_factory_interface.h",
"//src/mongo/db/query/compiler/logical_model/sort_pattern:sort_pattern.h",
"//src/mongo/db/query/compiler/parsers/matcher:expression_parser.h",
"//src/mongo/db/query/compiler/physical_model/index_bounds:index_bounds.h",
"//src/mongo/db/query/compiler/physical_model/interval:interval.h",
"//src/mongo/db/query/util:deferred.h",
"//src/mongo/db/query/util:make_data_structure.h",
"//src/mongo/db/query/util:named_enum.h",
"//src/mongo/db/repl:rollback.h",
"//src/mongo/db/storage:duplicate_key_error_info.h",
"//src/mongo/db/storage:index_entry_comparison.h",
"//src/mongo/db/storage:sorted_data_interface.h",
"//src/mongo/db/transaction:integer_interval_set.h",
"//src/mongo/db/transaction:transaction_operations.h",
"//src/mongo/db/update:pattern_cmp.h",
"//src/mongo/rpc:object_check.h",
"//src/mongo/s/resharding:type_collection_fields_gen",
"//src/mongo/scripting:engine.h",
"//src/mongo/util:lazily_initialized.h",
"//src/mongo/util:pcre.h",
"//src/mongo/util:represent_as.h",
],
header_deps = [
"//src/mongo/db/fts/unicode:unicode",
"//src/mongo/db/pipeline/process_interface:mongo_process_interface",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/storage:container",
@ -134,9 +27,6 @@ mongo_cc_library(
srcs = [
"op_observer_util.cpp",
],
hdrs = [
"op_observer_util.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/bson/dotted_path:dotted_path_support", # TODO(SERVER-93876): Remove.
@ -151,35 +41,19 @@ mongo_cc_library(
srcs = [
"operation_logger_transaction_proxy.cpp",
],
hdrs = [
"operation_logger.h",
"operation_logger_transaction_proxy.h",
],
header_deps = [
"//src/mongo/db/op_observer:op_observer",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:service_context",
],
)
mongo_cc_library(
name = "operation_logger_mock",
hdrs = [
"operation_logger.h",
"operation_logger_mock.h",
],
)
mongo_cc_library(name = "operation_logger_mock")
mongo_cc_library(
name = "user_write_block_mode_op_observer",
srcs = [
"//src/mongo/db/user_write_block:user_write_block_mode_op_observer.cpp",
],
hdrs = [
"//src/mongo/db/user_write_block:user_write_block_mode_op_observer.h",
],
deps = [
":op_observer",
"//src/mongo/db:shard_role_api",
@ -192,9 +66,6 @@ mongo_cc_library(
srcs = [
"find_and_modify_images_op_observer.cpp",
],
hdrs = [
"find_and_modify_images_op_observer.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:commands",
@ -211,9 +82,6 @@ mongo_cc_library(
srcs = [
"change_stream_pre_images_op_observer.cpp",
],
hdrs = [
"change_stream_pre_images_op_observer.h",
],
deps = [
":op_observer",
"//src/mongo/db:change_stream_pre_images_collection_manager",
@ -229,9 +97,6 @@ mongo_cc_library(
srcs = [
"fallback_op_observer.cpp",
],
hdrs = [
"fallback_op_observer.h",
],
deps = [
":batched_write_context",
":op_observer",
@ -251,10 +116,6 @@ mongo_cc_library(
srcs = [
"op_observer_impl.cpp",
],
hdrs = [
"op_observer_impl.h",
"operation_logger.h",
],
deps = [
":batched_write_context",
":op_observer",
@ -287,9 +148,6 @@ mongo_cc_library(
srcs = [
"batched_write_context.cpp",
],
hdrs = [
"batched_write_context.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:shard_role_api",
@ -302,10 +160,6 @@ mongo_cc_library(
srcs = [
"operation_logger_impl.cpp",
],
hdrs = [
"operation_logger.h",
"operation_logger_impl.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/repl:oplog",
@ -317,9 +171,6 @@ mongo_cc_library(
srcs = [
"fcv_op_observer.cpp",
],
hdrs = [
"fcv_op_observer.h",
],
deps = [
":op_observer",
":op_observer_util",
@ -369,7 +220,6 @@ mongo_cc_unit_test(
"//src/mongo/db/storage:storage_options",
"//src/mongo/db/transaction",
"//src/mongo/db/transaction:transaction_operations",
"//src/mongo/idl:server_parameter_test_controller",
],
)

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"field_path.cpp",
],
hdrs = [
"field_path.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:server_base",
@ -30,9 +27,6 @@ mongo_cc_library(
srcs = [
"document_path_support.cpp",
],
hdrs = [
"document_path_support.h",
],
deps = [
"//src/mongo/db:common",
"//src/mongo/db/exec/document_value", # TODO(SERVER-93876): Remove.
@ -44,9 +38,6 @@ mongo_cc_library(
srcs = [
"change_stream_test_helpers.cpp",
],
hdrs = [
"change_stream_test_helpers.h",
],
deps = [
":change_stream_pipeline",
],
@ -136,40 +127,6 @@ mongo_cc_library(
"//src/mongo/db/pipeline/search:document_source_list_search_indexes_validator.cpp",
"//src/mongo/db/pipeline/search:plan_sharded_search_gen",
],
hdrs = [
"change_stream.h",
"change_stream_constants.h",
"change_stream_helpers.h",
"change_stream_read_mode.h",
"document_source_change_stream.h",
"document_source_hybrid_scoring_input_util.h",
"document_source_merge.h",
"document_source_merge_spec.h",
"document_source_parsing_validators.h",
"document_source_query_stats_validators.h",
"document_source_single_document_transformation.h",
"document_source_writer.h",
"lite_parsed_pipeline.h",
"merge_processor.h",
"resume_token.h",
"single_document_transformation_processor.h",
"transformer_interface.h",
"//src/mongo/db:dbcommands_gen",
"//src/mongo/db/local_catalog:database.h",
"//src/mongo/db/local_catalog:virtual_collection_options.h",
"//src/mongo/db/pipeline/search:document_source_list_search_indexes_validator.h",
],
private_hdrs = [
"//src/mongo/db/exec:exclusion_projection_executor.h",
"//src/mongo/db/exec:fastpath_projection_node.h",
"//src/mongo/db/exec:projection_executor.h",
"//src/mongo/db/exec:projection_node.h",
"//src/mongo/db/local_catalog:catalog_raii.h",
"//src/mongo/db/local_catalog:db_raii.h",
"//src/mongo/db/stats:operation_latency_histogram.h",
"//src/mongo/db/stats:top.h",
"//src/mongo/db:read_concern.h",
],
deps = [
":docs_needed_bounds", # TODO(SERVER-93876): Remove.
":runtime_constants_idl",
@ -194,9 +151,6 @@ mongo_cc_library(
srcs = [
"change_stream_helpers.cpp",
],
hdrs = [
"change_stream_helpers.h",
],
deps = [
"document_sources_idl",
"//src/mongo/db:query_expressions",
@ -210,9 +164,6 @@ mongo_cc_library(
srcs = [
"change_stream_topology_helpers.cpp",
],
hdrs = [
"change_stream_topology_helpers.h",
],
deps = [
"//src/mongo/db:server_base",
"//src/mongo/db/exec/document_value",
@ -290,11 +241,6 @@ mongo_cc_library(
":external_data_source_option_gen",
":name_expression_gen",
],
hdrs = [
"aggregation_request_helper.h",
"query_request_conversion.h",
],
private_hdrs = [":name_expression.h"],
deps = [
":document_sources_idl",
"//src/mongo/db:server_base",
@ -385,36 +331,6 @@ mongo_cc_library(
"//src/mongo/db/pipeline/window_function:window_function_shift.cpp",
"//src/mongo/db/pipeline/window_function:window_function_sum.cpp",
],
hdrs = [
"accumulation_statement.h",
"accumulator_for_bucket_auto.h",
"accumulator_helpers.h",
"accumulator_js_reduce.h",
"accumulator_multi.h",
"accumulator_percentile.h",
"percentile_algo_accurate.h",
"percentile_algo_continuous.h",
"percentile_algo_discrete.h",
"percentile_algo_tdigest.h",
"//src/mongo/db/exec/sbe:accumulator_sum_value_enum.h",
"//src/mongo/db/pipeline/window_function:window_bounds.h",
"//src/mongo/db/pipeline/window_function:window_function_add_to_set.h",
"//src/mongo/db/pipeline/window_function:window_function_concat_arrays.h",
"//src/mongo/db/pipeline/window_function:window_function_count.h",
"//src/mongo/db/pipeline/window_function:window_function_covariance.h",
"//src/mongo/db/pipeline/window_function:window_function_expression.h",
"//src/mongo/db/pipeline/window_function:window_function_first_last_n.h",
"//src/mongo/db/pipeline/window_function:window_function_integral.h",
"//src/mongo/db/pipeline/window_function:window_function_min_max.h",
"//src/mongo/db/pipeline/window_function:window_function_n_traits.h",
"//src/mongo/db/pipeline/window_function:window_function_percentile.h",
"//src/mongo/db/pipeline/window_function:window_function_push.h",
"//src/mongo/db/pipeline/window_function:window_function_set_union.h",
"//src/mongo/db/pipeline/window_function:window_function_shift.h",
"//src/mongo/db/pipeline/window_function:window_function_stddev.h",
"//src/mongo/db/pipeline/window_function:window_function_sum.h",
"//src/mongo/db/pipeline/window_function:window_function_top_bottom_n.h",
],
deps = [
":field_path",
"//src/mongo/db:query_expressions",
@ -432,9 +348,6 @@ mongo_cc_library(
"granularity_rounder_powers_of_two.cpp",
"granularity_rounder_preferred_numbers.cpp",
],
hdrs = [
"granularity_rounder.h",
],
deps = [
":field_path", # TODO(SERVER-93876): Remove.
"//src/mongo/db:query_expressions",
@ -612,212 +525,6 @@ mongo_cc_library(
"//src/mongo/db/query/search:search_index_view_validation.cpp",
"//src/mongo/db/query/timeseries:timeseries_translation.cpp",
],
hdrs = [
"aggregation_hint_translation.h",
"catalog_resource_handle.h",
"document_source.h",
"document_source_add_fields.h",
"document_source_bucket.h",
"document_source_bucket_auto.h",
"document_source_count.h",
"document_source_current_op.h",
"document_source_densify.h",
"document_source_documents.h",
"document_source_exchange.h",
"document_source_facet.h",
"document_source_fill.h",
"document_source_find_and_modify_image_lookup.h",
"document_source_geo_near.h",
"document_source_graph_lookup.h",
"document_source_group.h",
"document_source_group_base.h",
"document_source_hybrid_scoring_util.h",
"document_source_index_stats.h",
"document_source_internal_compute_geo_near_distance.h",
"document_source_internal_convert_bucket_index_stats.h",
"document_source_internal_inhibit_optimization.h",
"document_source_internal_projection.h",
"document_source_internal_replace_root.h",
"document_source_internal_shardserver_info.h",
"document_source_internal_shred_documents.h",
"document_source_internal_split_pipeline.h",
"document_source_internal_unpack_bucket.h",
"document_source_limit.h",
"document_source_list_cached_and_active_users.h",
"document_source_list_extensions.h",
"document_source_list_local_sessions.h",
"document_source_list_mql_entities.h",
"document_source_list_sampled_queries.h",
"document_source_list_sessions.h",
"document_source_lookup.h",
"document_source_match.h",
"document_source_merge.h",
"document_source_mock.h",
"document_source_out.h",
"document_source_plan_cache_stats.h",
"document_source_project.h",
"document_source_query_stats.h",
"document_source_queue.h",
"document_source_rank_fusion.h",
"document_source_redact.h",
"document_source_replace_root.h",
"document_source_sample.h",
"document_source_sample_from_random_cursor.h",
"document_source_score.h",
"document_source_score_fusion.h",
"document_source_sequential_document_cache.h",
"document_source_set_metadata.h",
"document_source_set_variable_from_subpipeline.h",
"document_source_set_window_fields.h",
"document_source_single_document_transformation.h",
"document_source_skip.h",
"document_source_sort.h",
"document_source_sort_by_count.h",
"document_source_streaming_group.h",
"document_source_tee_consumer.h",
"document_source_union_with.h",
"document_source_unwind.h",
"explain_util.h",
"group_from_first_document_transformation.h",
"group_processor.h",
"group_processor_base.h",
"hybrid_search_pipeline_builder.h",
"lookup_set_cache.h",
"match_processor.h",
"merge_processor.h",
"partition_key_comparator.h",
"pipeline.h",
# TODO(SERVER-112281): Move to its own target.
"pipeline_factory.h",
"pipeline_split_state.h",
"pipeline_test_util.h",
"rank_fusion_pipeline_builder.h",
"redact_processor.h",
"score_fusion_pipeline_builder.h",
"semantic_analysis.h",
"sequential_document_cache.h",
"shard_role_transaction_resources_stasher_for_pipeline.h",
"single_document_transformation_processor.h",
"skip_and_limit.h",
"sort_reorder_helpers.h",
"tee_buffer.h",
"timeseries_index_conversion_options.h",
"writer_util.h",
"//src/mongo/db/exec/agg:bucket_auto_stage.h",
"//src/mongo/db/exec/agg:coll_stats_stage.h",
"//src/mongo/db/exec/agg:current_op_stage.h",
"//src/mongo/db/exec/agg:densify_stage.h",
"//src/mongo/db/exec/agg:document_source_to_stage_registry.h",
"//src/mongo/db/exec/agg:exchange_stage.h",
"//src/mongo/db/exec/agg:exec_pipeline.h",
"//src/mongo/db/exec/agg:facet_stage.h",
"//src/mongo/db/exec/agg:find_and_modify_image_lookup_stage.h",
"//src/mongo/db/exec/agg:graph_lookup_stage.h",
"//src/mongo/db/exec/agg:group_base_stage.h",
"//src/mongo/db/exec/agg:group_stage.h",
"//src/mongo/db/exec/agg:internal_all_collection_stats_stage.h",
"//src/mongo/db/exec/agg:internal_compute_geo_near_distance_stage.h",
"//src/mongo/db/exec/agg:internal_convert_bucket_index_stats_stage.h",
"//src/mongo/db/exec/agg:internal_inhibit_optimization_stage.h",
"//src/mongo/db/exec/agg:internal_list_collections_stage.h",
"//src/mongo/db/exec/agg:internal_set_window_fields_stage.h",
"//src/mongo/db/exec/agg:internal_shard_server_info_stage.h",
"//src/mongo/db/exec/agg:internal_shred_documents_stage.h",
"//src/mongo/db/exec/agg:internal_split_pipeline_stage.h",
"//src/mongo/db/exec/agg:internal_unpack_bucket_stage.h",
"//src/mongo/db/exec/agg:limit_stage.h",
"//src/mongo/db/exec/agg:list_catalog_stage.h",
"//src/mongo/db/exec/agg:list_local_sessions_stage.h",
"//src/mongo/db/exec/agg:list_mql_entities_stage.h",
"//src/mongo/db/exec/agg:list_sampled_queries_stage.h",
"//src/mongo/db/exec/agg:lookup_stage.h",
"//src/mongo/db/exec/agg:match_stage.h",
"//src/mongo/db/exec/agg:merge_stage.h",
"//src/mongo/db/exec/agg:mock_stage.h",
"//src/mongo/db/exec/agg:out_stage.h",
"//src/mongo/db/exec/agg:pipeline_builder.h",
"//src/mongo/db/exec/agg:plan_cache_stats_stage.h",
"//src/mongo/db/exec/agg:query_stats_stage.h",
"//src/mongo/db/exec/agg:queue_stage.h",
"//src/mongo/db/exec/agg:redact_stage.h",
"//src/mongo/db/exec/agg:sample_from_random_cursor_stage.h",
"//src/mongo/db/exec/agg:sample_stage.h",
"//src/mongo/db/exec/agg:sequential_document_cache_stage.h",
"//src/mongo/db/exec/agg:set_variable_from_subpipeline_stage.h",
"//src/mongo/db/exec/agg:single_document_transformation_stage.h",
"//src/mongo/db/exec/agg:skip_stage.h",
"//src/mongo/db/exec/agg:sort_stage.h",
"//src/mongo/db/exec/agg:stage.h",
"//src/mongo/db/exec/agg:streaming_group_stage.h",
"//src/mongo/db/exec/agg:tee_consumer_stage.h",
"//src/mongo/db/exec/agg:union_with_stage.h",
"//src/mongo/db/exec/agg:unwind_processor.h",
"//src/mongo/db/exec/agg:unwind_stage.h",
"//src/mongo/db/exec/agg:writer_stage.h",
"//src/mongo/db/exec/agg/search:internal_search_id_lookup_stage.h",
"//src/mongo/db/exec/agg/search:internal_search_mongot_remote_stage.h",
"//src/mongo/db/exec/agg/search:list_search_indexes_stage.h",
"//src/mongo/db/exec/agg/search:search_meta_stage.h",
"//src/mongo/db/exec/agg/search:vector_search_stage.h",
"//src/mongo/db/global_catalog:shard_key_pattern_query_util.h",
"//src/mongo/db/pipeline:document_source_coll_stats.h",
"//src/mongo/db/pipeline:document_source_internal_all_collection_stats.h",
"//src/mongo/db/pipeline:document_source_internal_list_collections.h",
"//src/mongo/db/pipeline:document_source_list_catalog.h",
"//src/mongo/db/pipeline:document_source_list_cluster_catalog.h",
"//src/mongo/db/pipeline:document_source_sharded_data_distribution.h",
"//src/mongo/db/pipeline:document_source_cursor.h",
"//src/mongo/db/pipeline:document_source_geo_near_cursor.h",
"//src/mongo/db/pipeline/visitors:document_source_visitor_registry.h",
"//src/mongo/db/pipeline/visitors:document_source_visitor_registry_mongod.h",
"//src/mongo/db/pipeline/visitors:document_source_walker.h",
# TODO(SERVER-112281): Move to its own target.
"//src/mongo/db/pipeline/optimization:optimize.h",
"//src/mongo/db/pipeline/optimization:rule_based_rewriter.h",
"//src/mongo/db/pipeline/search:document_source_internal_search_id_lookup.h",
"//src/mongo/db/pipeline/search:document_source_internal_search_mongot_remote.h",
"//src/mongo/db/pipeline/search:document_source_list_search_indexes.h",
"//src/mongo/db/pipeline/search:document_source_search.h",
"//src/mongo/db/pipeline/search:document_source_search_meta.h",
"//src/mongo/db/pipeline/search:document_source_vector_search.h",
"//src/mongo/db/pipeline/search:lite_parsed_search.h",
"//src/mongo/db/pipeline/search:search_helper.h",
"//src/mongo/db/pipeline/search:vector_search_helper.h",
"//src/mongo/db/pipeline/window_function:partition_iterator.h",
"//src/mongo/db/pipeline/window_function:window_function_exec.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_derivative.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_first_last.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_linear_fill.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_min_max_scaler_non_removable.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_min_max_scaler_non_removable_range.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_non_removable.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_non_removable_common.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_non_removable_range.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_non_removable_range_common.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_removable_document.h",
"//src/mongo/db/pipeline/window_function:window_function_exec_removable_range.h",
"//src/mongo/db/pipeline/window_function:window_function_statement.h",
"//src/mongo/db/query:multiple_collection_accessor.h",
"//src/mongo/db/query:query_planner_common.h",
"//src/mongo/db/query:query_planner_params.h",
"//src/mongo/db/query/query_shape:agg_cmd_shape.h",
"//src/mongo/db/query/query_stats:agg_key.h",
"//src/mongo/db/query/search:search_index_view_validation.h",
"//src/mongo/db/query/timeseries:timeseries_translation.h",
"//src/mongo/db/s:analyze_shard_key_util.h",
"//src/mongo/db/s:document_source_analyze_shard_key_read_write_distribution.h",
"//src/mongo/db/s:document_source_analyze_shard_key_read_write_distribution_gen",
"//src/mongo/db/s/resharding:document_source_resharding_add_resume_id.h",
"//src/mongo/db/s/resharding:document_source_resharding_iterate_transaction.h",
"//src/mongo/db/s/resharding:document_source_resharding_ownership_match.h",
"//src/mongo/s:transaction_router_resource_yielder.h",
"//src/mongo/s/query/exec:async_results_merger.h",
"//src/mongo/s/query/exec:blocking_results_merger.h",
"//src/mongo/s/query/exec:document_source_merge_cursors.h",
"//src/mongo/s/query/exec:next_high_watermark_determining_strategy.h",
"//src/mongo/s/query/exec:router_stage_merge.h",
"//src/mongo/s/query/exec:shard_tag.h",
],
deps = [
":accumulator",
":change_stream_error_extra_info",
@ -896,7 +603,6 @@ mongo_cc_library(
"//src/mongo/rpc:command_status",
"//src/mongo/s:analyze_shard_key_common",
"//src/mongo/s:grid",
"//src/mongo/util:tick_source_mock",
"//src/third_party/snappy",
],
)
@ -907,10 +613,6 @@ mongo_cc_library(
"lite_parsed_document_source.cpp",
"lite_parsed_pipeline.cpp",
],
hdrs = [
"lite_parsed_document_source.h",
"lite_parsed_pipeline.h",
],
deps = [
":aggregation_request_helper",
"//src/mongo/db/query:common_query_enums_and_helpers", # TODO(SERVER-93876): Remove.
@ -958,10 +660,6 @@ mongo_cc_library(
"document_source_internal_apply_oplog_update.cpp",
"//src/mongo/db/exec/agg:internal_apply_oplog_update_stage.cpp",
],
hdrs = [
"document_source_internal_apply_oplog_update.h",
"//src/mongo/db/exec/agg:internal_apply_oplog_update_stage.h",
],
deps = [
"//src/mongo/db:multitenancy",
"//src/mongo/db/pipeline",
@ -1161,11 +859,6 @@ mongo_cc_library(
"change_stream_start_after_invalidate_info.cpp",
"change_stream_topology_change_info.cpp",
],
hdrs = [
"change_stream_invalidation_info.h",
"change_stream_start_after_invalidate_info.h",
"change_stream_topology_change_info.h",
],
deps = [
"//src/mongo:base",
],
@ -1176,9 +869,6 @@ mongo_cc_library(
srcs = [
"variable_validation.cpp",
],
hdrs = [
"variable_validation.h",
],
deps = [
"//src/mongo:base",
],
@ -1189,13 +879,6 @@ mongo_cc_library(
srcs = [
"change_stream_pre_and_post_images_options_gen",
],
hdrs = [
"change_stream_pre_and_post_images_options_gen",
"//src/mongo/base:error_codes_header",
"//src/mongo/db:basic_types_gen",
"//src/mongo/db/query:explain_verbosity_gen",
"//src/mongo/util/version:releases_header",
],
deps = [
"//src/mongo:base",
"//src/mongo/idl:idl_parser",
@ -1209,15 +892,6 @@ mongo_cc_library(
"//src/mongo/db/pipeline/visitors:docs_needed_bounds_gen",
"//src/mongo/db/pipeline/visitors:docs_needed_bounds_util.cpp",
],
hdrs = [
"//src/mongo/base:error_codes_header",
"//src/mongo/db:basic_types_gen",
"//src/mongo/db/pipeline/visitors:docs_needed_bounds.h",
"//src/mongo/db/pipeline/visitors:docs_needed_bounds_gen",
"//src/mongo/db/pipeline/visitors:docs_needed_bounds_util.h",
"//src/mongo/db/query:explain_verbosity_gen",
"//src/mongo/util/version:releases_header",
],
deps = [
"//src/mongo:base",
"//src/mongo/idl:idl_parser",
@ -1229,13 +903,6 @@ mongo_cc_library(
srcs = [
"legacy_runtime_constants_gen",
],
hdrs = [
"legacy_runtime_constants_gen",
"//src/mongo/base:error_codes_header",
"//src/mongo/db:basic_types_gen",
"//src/mongo/db/query:explain_verbosity_gen",
"//src/mongo/util/version:releases_header",
],
deps = [
"//src/mongo/idl:basic_types_serialization",
"//src/mongo/idl:idl_parser",
@ -1260,15 +927,6 @@ mongo_cc_library(
"change_stream_reader_builder.cpp",
"data_to_shards_allocation_query_service.cpp",
],
hdrs = [
"change_stream.h",
"change_stream_read_mode.h",
"change_stream_reader_builder.h",
"change_stream_reader_context.h",
"change_stream_shard_targeter.h",
"data_to_shards_allocation_query_service.h",
"historical_placement_fetcher.h",
],
deps = [
"//src/mongo/db:namespace_spec",
"//src/mongo/db:query_expressions",
@ -1314,44 +972,6 @@ mongo_cc_library(
"//src/mongo/db/exec/agg:change_stream_unwind_transaction_stage.cpp",
"//src/mongo/db/pipeline/optimization:change_stream_rules.cpp",
],
hdrs = [
"change_stream_document_diff_parser.h",
"change_stream_event_transform.h",
"change_stream_filter_helpers.h",
"change_stream_pipeline_helpers.h",
"change_stream_rewrite_helpers.h",
"change_stream_split_event_helpers.h",
"document_source_change_stream.h",
"document_source_change_stream_add_post_image.h",
"document_source_change_stream_add_pre_image.h",
"document_source_change_stream_check_invalidate.h",
"document_source_change_stream_check_resumability.h",
"document_source_change_stream_check_topology_change.h",
"document_source_change_stream_ensure_resume_token_present.h",
"document_source_change_stream_handle_topology_change.h",
"document_source_change_stream_handle_topology_change_v2.h",
"document_source_change_stream_inject_control_events.h",
"document_source_change_stream_oplog_match.h",
"document_source_change_stream_split_large_event.h",
"document_source_change_stream_transform.h",
"document_source_change_stream_unwind_transaction.h",
"//src/mongo/db/exec/agg:change_stream_add_post_image_stage.h",
"//src/mongo/db/exec/agg:change_stream_add_pre_image_stage.h",
"//src/mongo/db/exec/agg:change_stream_check_invalidate_stage.h",
"//src/mongo/db/exec/agg:change_stream_check_resumability_stage.h",
"//src/mongo/db/exec/agg:change_stream_check_topology_change_stage.h",
"//src/mongo/db/exec/agg:change_stream_ensure_resume_token_present_stage.h",
"//src/mongo/db/exec/agg:change_stream_handle_topology_change_stage.h",
"//src/mongo/db/exec/agg:change_stream_handle_topology_change_v2_stage.h",
"//src/mongo/db/exec/agg:change_stream_inject_control_events_stage.h",
"//src/mongo/db/exec/agg:change_stream_split_large_event_stage.h",
"//src/mongo/db/exec/agg:change_stream_transform_stage.h",
"//src/mongo/db/exec/agg:change_stream_unwind_transaction_stage.h",
],
private_hdrs = [
"//src/mongo/db/query/bson:bson_helper.h",
"//src/mongo/db/transaction:transaction_history_iterator.h",
],
deps = [
":change_stream_helpers",
":change_stream_interfaces",
@ -1375,10 +995,6 @@ mongo_cc_library(
"sharded_agg_helpers.cpp",
"split_pipeline.cpp",
],
hdrs = [
"sharded_agg_helpers.h",
"split_pipeline.h",
],
deps = [
":aggregation",
"//src/mongo/db:shard_role_api",
@ -1394,9 +1010,6 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/pipeline/visitors:document_source_visitor_docs_needed_bounds.cpp",
],
hdrs = [
"//src/mongo/db/pipeline/visitors:document_source_visitor_docs_needed_bounds.h",
],
deps = [
":change_stream_pipeline",
":docs_needed_bounds",
@ -1410,9 +1023,6 @@ mongo_cc_library(
srcs = [
"change_stream_expired_pre_image_remover.cpp",
],
hdrs = [
"change_stream_expired_pre_image_remover.h",
],
deps = [
"//src/mongo/db:change_stream_pre_images_collection_manager",
"//src/mongo/db:shard_role",
@ -1422,9 +1032,6 @@ mongo_cc_library(
mongo_cc_library(
name = "expression_context_for_test",
hdrs = [
"expression_context_for_test.h",
],
deps = [
"//src/mongo/db/query:query_test_service_context",
],
@ -1466,7 +1073,6 @@ mongo_cc_library(
"//src/mongo/db/exec/agg:mock_stage.cpp",
"//src/mongo/db/pipeline/process_interface:stub_lookup_single_document_process_interface.cpp",
],
private_hdrs = ["//src/mongo/db/pipeline/process_interface:stub_lookup_single_document_process_interface.h"],
deps = [
":expression_context_for_test",
":pipeline",
@ -1585,14 +1191,6 @@ mongo_cc_unit_test(
"sharded_union_test.cpp",
"skip_and_limit_test.cpp",
"tee_buffer_test.cpp",
] + select({
"//bazel/config:js_engine_mozjs": [
"accumulator_js_test.cpp",
"expression_javascript_test.cpp",
],
"//bazel/config:js_engine_none": [
],
}) + [
"//src/mongo/db/exec/agg:document_source_to_stage_registry_test.cpp",
"//src/mongo/db/extension/host:document_source_extension_expandable_test.cpp",
"//src/mongo/db/extension/host:document_source_extension_optimizable_test.cpp",
@ -1648,23 +1246,14 @@ mongo_cc_unit_test(
minimum_test_resources = {
"cpu_cores": 2,
},
private_hdrs = [
":aggregation_mongod_context_fixture.h",
":change_stream_reader_builder_mock.h",
":change_stream_reader_context_mock.h",
":change_stream_shard_targeter_mock.h",
":change_stream_stage_test_fixture.h",
":data_to_shards_allocation_query_service_mock.h",
":document_source_test_optimizations.h",
":historical_placement_fetcher_mock.h",
":pipeline_metadata_tree.h",
":serverless_aggregation_context_fixture.h",
"//src/mongo/db/local_catalog:collection_mock.h",
"//src/mongo/db/pipeline/process_interface:standalone_process_interface.h",
"//src/mongo/db/sharding_environment:sharding_mongod_test_fixture.h",
"//src/mongo/dbtests:dbtests.h",
"//src/mongo/s/query/exec:sharded_agg_test_fixture.h",
],
srcs_select = [{
"//bazel/config:js_engine_mozjs": [
"accumulator_js_test.cpp",
"expression_javascript_test.cpp",
],
"//bazel/config:js_engine_none": [
],
}],
tags = [
# Trying to access /data/db/ is incompatible with the sandbox
"code_coverage_quarantine",
@ -1722,7 +1311,6 @@ mongo_cc_unit_test(
"//src/mongo/db/s:shard_server_test_fixture",
"//src/mongo/db/storage/devnull:storage_devnull_core",
"//src/mongo/executor:thread_pool_task_executor_test_fixture",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/s:sharding_mongos_test_fixture",
"//src/mongo/s/query/exec:router_exec_stage",
"//src/mongo/unittest",
@ -1733,10 +1321,6 @@ mongo_cc_unit_test(
mongo_cc_library(
name = "aggregation_context_fixture",
hdrs = [
"aggregation_context_fixture.h",
"document_source_mock_stages.h",
],
deps = [
":expression_context_for_test",
":pipeline",
@ -1789,7 +1373,6 @@ mongo_cc_benchmark(
mongo_cc_benchmark(
name = "percentile_algo_bm",
srcs = ["percentile_algo_bm_fixture.cpp"],
private_hdrs = [":percentile_algo_bm_fixture.h"],
tags = ["query_bm"],
deps = [
":accumulator",
@ -1801,7 +1384,6 @@ mongo_cc_benchmark(
mongo_cc_benchmark(
name = "window_function_percentile_bm",
srcs = ["//src/mongo/db/pipeline/window_function:window_function_percentile_bm_fixture.cpp"],
private_hdrs = ["//src/mongo/db/pipeline/window_function:window_function_percentile_bm_fixture.h"],
tags = ["query_bm"],
deps = [
":accumulator",
@ -1815,7 +1397,6 @@ mongo_cc_benchmark(
mongo_cc_benchmark(
name = "window_function_concat_arrays_bm",
srcs = ["//src/mongo/db/pipeline/window_function:window_function_concat_arrays_bm_fixture.cpp"],
private_hdrs = ["//src/mongo/db/pipeline/window_function:window_function_concat_arrays_bm_fixture.h"],
tags = ["query_bm"],
deps = [
":accumulator",

View File

@ -19,6 +19,5 @@ mongo_cc_unit_test(
"//src/mongo/db/pipeline",
"//src/mongo/db/pipeline:aggregation_context_fixture",
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/idl:server_parameter_test_controller",
],
)

View File

@ -14,201 +14,6 @@ mongo_cc_library(
srcs = [
"mongo_process_interface.cpp",
],
hdrs = [
"mongo_process_interface.h",
"//src/mongo/bson:bson_validate.h",
"//src/mongo/bson:bson_validate_gen",
"//src/mongo/client:authenticate.h",
"//src/mongo/client:client_api_version_parameters_gen",
"//src/mongo/client:constants.h",
"//src/mongo/client:dbclient_base.h",
"//src/mongo/client:dbclient_cursor.h",
"//src/mongo/client:hedging_mode_gen",
"//src/mongo/client:index_spec.h",
"//src/mongo/client:internal_auth.h",
"//src/mongo/client:mongo_uri.h",
"//src/mongo/client:read_preference.h",
"//src/mongo/client:read_preference_gen",
"//src/mongo/client:read_preference_validators.h",
"//src/mongo/client:sasl_client_session.h",
"//src/mongo/crypto:encryption_fields_gen",
"//src/mongo/crypto:encryption_fields_validation.h",
"//src/mongo/crypto:fle_field_schema_gen",
"//src/mongo/crypto:fle_fields_util.h",
"//src/mongo/crypto:sha1_block.h",
"//src/mongo/db:aggregated_index_usage_tracker.h",
"//src/mongo/db:api_parameters.h",
"//src/mongo/db:api_parameters_gen",
"//src/mongo/db:collection_index_usage_tracker.h",
"//src/mongo/db:commands.h",
"//src/mongo/db:dbmessage.h",
"//src/mongo/db:feature_compatibility_version_parser.h",
"//src/mongo/db:feature_flag.h",
"//src/mongo/db:index_names.h",
"//src/mongo/db:keypattern.h",
"//src/mongo/db:multitenancy_gen",
"//src/mongo/db:namespace_spec_gen",
"//src/mongo/db:read_concern_support_result.h",
"//src/mongo/db:request_execution_context.h",
"//src/mongo/db:update_index_data.h",
"//src/mongo/db:write_concern.h",
"//src/mongo/db/auth:access_checks_gen",
"//src/mongo/db/auth:auth_types_gen",
"//src/mongo/db/auth:authorization_manager.h",
"//src/mongo/db/auth:authorization_router.h",
"//src/mongo/db/auth:builtin_roles.h",
"//src/mongo/db/auth:ldap_cumulative_operation_stats.h",
"//src/mongo/db/auth:ldap_operation_stats.h",
"//src/mongo/db/auth:privilege_format.h",
"//src/mongo/db/auth:restriction.h",
"//src/mongo/db/auth:restriction_set.h",
"//src/mongo/db/auth:role_name_or_string.h",
"//src/mongo/db/auth:user.h",
"//src/mongo/db/auth:user_acquisition_stats.h",
"//src/mongo/db/auth:user_cache_access_stats.h",
"//src/mongo/db/cluster_parameters:cluster_server_parameter_gen",
"//src/mongo/db/commands:test_commands_enabled.h",
"//src/mongo/db/commands/server_status:server_status_metric.h",
"//src/mongo/db/exec:shard_filterer.h",
"//src/mongo/db/exec/matcher:match_details.h",
"//src/mongo/db/exec/mutable_bson:const_element.h",
"//src/mongo/db/exec/mutable_bson:document.h",
"//src/mongo/db/global_catalog:chunk.h",
"//src/mongo/db/global_catalog:chunk_manager.h",
"//src/mongo/db/global_catalog:shard_key_pattern.h",
"//src/mongo/db/global_catalog:type_chunk.h",
"//src/mongo/db/global_catalog:type_chunk_base_gen",
"//src/mongo/db/global_catalog:type_chunk_range.h",
"//src/mongo/db/global_catalog:type_chunk_range_base_gen",
"//src/mongo/db/global_catalog:type_collection_common_types_gen",
"//src/mongo/db/global_catalog/router_role_api:gossiped_routing_cache_gen",
"//src/mongo/db/local_catalog:collection_operation_source.h",
"//src/mongo/db/local_catalog:collection_options.h",
"//src/mongo/db/local_catalog:collection_options_gen",
"//src/mongo/db/local_catalog:collection_options_validation.h",
"//src/mongo/db/local_catalog:collection_type.h",
"//src/mongo/db/local_catalog/shard_role_api:resource_yielder.h",
"//src/mongo/db/local_catalog/util:partitioned.h",
"//src/mongo/db/matcher:expression.h",
"//src/mongo/db/matcher:expression_visitor.h",
"//src/mongo/db/matcher:matchable.h",
"//src/mongo/db/matcher:path.h",
"//src/mongo/db/pipeline:change_stream_pre_and_post_images_options_gen",
"//src/mongo/db/pipeline:legacy_runtime_constants_gen",
"//src/mongo/db/pipeline:lite_parsed_document_source.h",
"//src/mongo/db/pipeline:sharded_agg_helpers_targeting_policy.h",
"//src/mongo/db/pipeline:storage_stats_spec_gen",
"//src/mongo/db/pipeline:variables.h",
"//src/mongo/db/query:allowed_contexts.h",
"//src/mongo/db/query:find_command.h",
"//src/mongo/db/query:find_command_gen",
"//src/mongo/db/query:hint_parser.h",
"//src/mongo/db/query:index_hint.h",
"//src/mongo/db/query:lru_key_value.h",
"//src/mongo/db/query:partitioned_cache.h",
"//src/mongo/db/query:query_knob_expressions.h",
"//src/mongo/db/query:query_knobs_gen",
"//src/mongo/db/query/client_cursor:generic_cursor.h",
"//src/mongo/db/query/client_cursor:generic_cursor_gen",
"//src/mongo/db/query/compiler/dependency_analysis:dependencies.h",
"//src/mongo/db/query/plan_cache:sbe_plan_cache_on_parameter_change.h",
"//src/mongo/db/query/query_settings:index_hints_serialization.h",
"//src/mongo/db/query/query_settings:query_framework_serialization.h",
"//src/mongo/db/query/query_settings:query_settings_comment.h",
"//src/mongo/db/query/query_settings:query_settings_gen",
"//src/mongo/db/query/query_stats:query_stats_on_parameter_change.h",
"//src/mongo/db/query/util:memory_util.h",
"//src/mongo/db/query/write_ops:single_write_result_gen",
"//src/mongo/db/query/write_ops:update_result.h",
"//src/mongo/db/query/write_ops:write_ops.h",
"//src/mongo/db/query/write_ops:write_ops_exec.h",
"//src/mongo/db/query/write_ops:write_ops_exec_util.h",
"//src/mongo/db/query/write_ops:write_ops_gen",
"//src/mongo/db/query/write_ops:write_ops_parsers.h",
"//src/mongo/db/repl:apply_ops_gen",
"//src/mongo/db/repl:member_config.h",
"//src/mongo/db/repl:member_config_gen",
"//src/mongo/db/repl:member_data.h",
"//src/mongo/db/repl:member_id.h",
"//src/mongo/db/repl:member_state.h",
"//src/mongo/db/repl:oplog.h",
"//src/mongo/db/repl:oplog_constraint_violation_logger.h",
"//src/mongo/db/repl:oplog_entry.h",
"//src/mongo/db/repl:oplog_entry_gen",
"//src/mongo/db/repl:oplog_entry_or_grouped_inserts.h",
"//src/mongo/db/repl:oplog_entry_serialization.h",
"//src/mongo/db/repl:optime_base_gen",
"//src/mongo/db/repl:read_concern_args.h",
"//src/mongo/db/repl:repl_client_info.h",
"//src/mongo/db/repl:repl_server_parameters_gen",
"//src/mongo/db/repl:repl_set_config.h",
"//src/mongo/db/repl:repl_set_config_gen",
"//src/mongo/db/repl:repl_set_config_params_gen",
"//src/mongo/db/repl:repl_set_config_validators.h",
"//src/mongo/db/repl:repl_set_heartbeat_response.h",
"//src/mongo/db/repl:repl_set_tag.h",
"//src/mongo/db/repl:repl_set_write_concern_mode_definitions.h",
"//src/mongo/db/repl:repl_settings.h",
"//src/mongo/db/repl:replication_coordinator.h",
"//src/mongo/db/repl:replication_coordinator_fwd.h",
"//src/mongo/db/repl:split_prepare_session_manager.h",
"//src/mongo/db/repl:sync_source_selector.h",
"//src/mongo/db/repl/split_horizon:split_horizon.h",
"//src/mongo/db/session:internal_session_pool.h",
"//src/mongo/db/session:logical_session_cache_gen",
"//src/mongo/db/sharding_environment:shard_id.h",
"//src/mongo/db/storage:backup_block.h",
"//src/mongo/db/storage:backup_cursor_hooks.h",
"//src/mongo/db/storage:backup_cursor_state.h",
"//src/mongo/db/storage:kv_backup_block.h",
"//src/mongo/db/storage:storage_engine_init.h",
"//src/mongo/db/timeseries:timeseries_gen",
"//src/mongo/db/timeseries:timeseries_global_options.h",
"//src/mongo/db/update:document_diff_applier.h",
"//src/mongo/db/update:document_diff_serialization.h",
"//src/mongo/db/vector_clock:vector_clock_gen",
"//src/mongo/db/versioning_protocol:chunk_version.h",
"//src/mongo/db/versioning_protocol:chunk_version_gen",
"//src/mongo/db/versioning_protocol:database_version.h",
"//src/mongo/db/versioning_protocol:database_version_base_gen",
"//src/mongo/db/versioning_protocol:shard_version.h",
"//src/mongo/db/versioning_protocol:stale_exception.h",
"//src/mongo/executor:connection_metrics.h",
"//src/mongo/executor:remote_command_request.h",
"//src/mongo/executor:remote_command_response.h",
"//src/mongo/executor:task_executor.h",
"//src/mongo/idl:generic_argument.h",
"//src/mongo/idl:generic_argument_gen",
"//src/mongo/rpc:get_status_from_command_result.h",
"//src/mongo/rpc:metadata.h",
"//src/mongo/rpc:protocol.h",
"//src/mongo/rpc:reply_builder_interface.h",
"//src/mongo/rpc:reply_interface.h",
"//src/mongo/rpc:topology_version_gen",
"//src/mongo/rpc:unique_message.h",
"//src/mongo/rpc/metadata:audit_metadata_gen",
"//src/mongo/rpc/metadata:oplog_query_metadata.h",
"//src/mongo/s/resharding:type_collection_fields_gen",
"//src/mongo/transport:baton.h",
"//src/mongo/transport:message_compressor_base.h",
"//src/mongo/transport:message_compressor_manager.h",
"//src/mongo/transport:service_executor.h",
"//src/mongo/transport:ssl_connection_context.h",
"//src/mongo/transport:transport_layer.h",
"//src/mongo/util:invalidating_lru_cache.h",
"//src/mongo/util:lru_cache.h",
"//src/mongo/util:read_through_cache.h",
"//src/mongo/util/concurrency:notification.h",
"//src/mongo/util/concurrency:thread_pool_interface.h",
"//src/mongo/util/net:sock.h",
"//src/mongo/util/net:ssl_manager.h",
"//src/mongo/util/net:ssl_options.h",
"//src/mongo/util/net/ssl:apple.hpp",
],
header_deps = [
"//src/mongo/db/local_catalog/lock_manager:flow_control_ticketholder",
"//src/mongo/db/exec/sbe:query_sbe_plan_stats",
],
deps = [
"//src/mongo:base",
],
@ -217,9 +22,6 @@ mongo_cc_library(
mongo_cc_library(
name = "stub_mongo_process_interface",
srcs = [],
hdrs = [
"stub_mongo_process_interface.h",
],
deps = [
"mongo_process_interface",
],
@ -230,9 +32,6 @@ mongo_cc_library(
srcs = [
"common_process_interface.cpp",
],
hdrs = [
"common_process_interface.h",
],
deps = [
"//src/mongo/db:operation_time_tracker",
"//src/mongo/db/auth",
@ -249,9 +48,6 @@ mongo_cc_library(
srcs = [
"mongos_process_interface.cpp",
],
hdrs = [
"mongos_process_interface.h",
],
deps = [
":common_process_interface",
"//src/mongo/db/pipeline",
@ -281,11 +77,6 @@ mongo_cc_library(
"non_shardsvr_process_interface.cpp",
"replica_set_node_process_interface.cpp",
],
hdrs = [
"common_mongod_process_interface.h",
"non_shardsvr_process_interface.h",
"replica_set_node_process_interface.h",
],
deps = [
":common_process_interface",
"//src/mongo/db:collection_index_usage_tracker",
@ -324,9 +115,6 @@ mongo_cc_library(
srcs = [
"shardsvr_process_interface.cpp",
],
hdrs = [
"shardsvr_process_interface.h",
],
deps = [
":mongod_process_interfaces",
"//src/mongo/db:query_exec",
@ -339,9 +127,6 @@ mongo_cc_library(
srcs = [
"mongod_process_interface_factory.cpp",
],
hdrs = [
"standalone_process_interface.h",
],
deps = [
":mongod_process_interfaces",
":mongos_process_interface",
@ -356,7 +141,6 @@ mongo_cc_unit_test(
"mongos_process_interface_test.cpp",
"shardsvr_process_interface_test.cpp",
],
private_hdrs = ["//src/mongo/s/query/exec:sharded_agg_test_fixture.h"],
tags = ["mongo_unittest_first_group"],
deps = [
":mongos_process_interface",
@ -376,7 +160,6 @@ mongo_cc_unit_test(
mongo_cc_unit_test(
name = "standalone_process_interface_test",
srcs = ["standalone_process_interface_test.cpp"],
private_hdrs = [":standalone_process_interface.h"],
tags = ["mongo_unittest_fourth_group"],
deps = [
":mongod_process_interfaces",

View File

@ -12,7 +12,6 @@ exports_files(
mongo_cc_library(
name = "spilling_stats",
srcs = ["//src/mongo/db/pipeline/spilling:spilling_stats.cpp"],
hdrs = ["//src/mongo/db/pipeline/spilling:spilling_stats.h"],
deps = [
"//src/mongo:base",
],
@ -25,11 +24,6 @@ mongo_cc_library(
"//src/mongo/db/pipeline/spilling:spillable_deque.cpp",
"//src/mongo/db/pipeline/spilling:spillable_map.cpp",
],
hdrs = [
"//src/mongo/db/pipeline/spilling:spill_table_batch_writer.h",
"//src/mongo/db/pipeline/spilling:spillable_deque.h",
"//src/mongo/db/pipeline/spilling:spillable_map.h",
],
deps = [
":spilling_stats",
"//src/mongo:base",
@ -45,9 +39,6 @@ mongo_cc_library(
srcs = [
"spilling_test_fixture.cpp",
],
hdrs = [
"spilling_test_fixture.h",
],
deps = [
"//src/mongo/db:service_context_d_test_fixture",
"//src/mongo/db/local_catalog/lock_manager:exception_util",

View File

@ -33,22 +33,6 @@ mongo_cc_library(
"test_health_observer.cpp",
":health_monitoring_server_parameters_gen",
],
hdrs = [
"deadline_future.h",
"dns_health_observer.h",
"fault.h",
"fault_facet.h",
"fault_facet_impl.h",
"fault_manager.h",
"fault_manager_config.h",
"health_check_status.h",
"health_observer.h",
"health_observer_base.h",
"health_observer_registration.h",
"progress_monitor.h",
"state_machine.h",
"test_health_observer.h",
],
deps = [
"//src/mongo/db:server_base",
"//src/mongo/db:service_context",
@ -80,11 +64,6 @@ mongo_cc_library(
mongo_cc_library(
name = "fault_manager_test_suite",
srcs = [],
hdrs = [
"fault_facet_mock.h",
"fault_manager_test_suite.h",
"health_observer_mock.h",
],
deps = [
":fault_manager",
"//src/mongo:base",
@ -92,7 +71,6 @@ mongo_cc_library(
"//src/mongo/executor:network_interface_factory",
"//src/mongo/executor:task_executor_test_fixture",
"//src/mongo/executor:thread_pool_task_executor_test_fixture",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/transport:transport_layer_manager",
"//src/mongo/util:clock_source_mock",
"//src/mongo/util/concurrency:thread_pool",

View File

@ -16,14 +16,6 @@ mongo_cc_library(
"explain_common.cpp",
"find_common.cpp",
],
hdrs = [
"explain_common.h",
"find.h",
"find_common.h",
],
header_deps = [
"//src/mongo/db:curop_failpoint_helpers",
],
deps = [
":canonical_query_base",
"//src/mongo:base",
@ -36,10 +28,6 @@ mongo_cc_library(
mongo_cc_library(
name = "canonical_distinct",
srcs = ["canonical_distinct.cpp"],
hdrs = [
"canonical_distinct.h",
],
private_hdrs = ["//src/mongo/db/pipeline:document_source_replace_root.h"],
deps = [
"//src/mongo:base",
"//src/mongo/db:commands",
@ -52,9 +40,6 @@ mongo_cc_library(
srcs = [
"query_fcv_environment_for_test.cpp",
],
hdrs = [
"query_fcv_environment_for_test.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -65,32 +50,18 @@ mongo_cc_library(
srcs = [
"random_utils.cpp",
],
hdrs = [
"random_utils.h",
],
deps = [
"//src/mongo:base",
],
)
mongo_cc_library(
name = "shard_key_diagnostic_printer",
hdrs = [
"shard_key_diagnostic_printer.h",
],
)
mongo_cc_library(name = "shard_key_diagnostic_printer")
mongo_cc_library(
name = "parsed_find_command",
srcs = [
"parsed_find_command.cpp",
],
hdrs = [
"parsed_find_command.h",
],
header_deps = [
"//src/mongo/db/pipeline",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast",
@ -105,10 +76,6 @@ mongo_cc_library(
"canonical_query.cpp",
"canonical_query_encoder.cpp",
],
hdrs = [
"canonical_query.h",
"canonical_query_encoder.h",
],
deps = [
":parsed_find_command",
"//src/mongo/db/pipeline",
@ -120,9 +87,6 @@ mongo_cc_library(
srcs = [
"parsed_distinct_command.cpp",
],
hdrs = [
"parsed_distinct_command.h",
],
deps = [
":canonical_distinct",
":canonical_query_base",
@ -137,12 +101,6 @@ mongo_cc_library(
"//src/mongo/db/query/query_shape:find_cmd_shape.cpp",
"//src/mongo/db/query/query_stats:find_key.cpp",
],
hdrs = [
"//src/mongo/db/query/query_shape:count_cmd_shape.h",
"//src/mongo/db/query/query_shape:distinct_cmd_shape.h",
"//src/mongo/db/query/query_shape:find_cmd_shape.h",
"//src/mongo/db/query/query_stats:find_key.h",
],
deps = [
":parsed_distinct_command",
],
@ -153,9 +111,6 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/query/util:memory_util.cpp",
],
hdrs = [
"//src/mongo/db/query/util:memory_util.h",
],
deps = [
"//src/mongo/util:processinfo",
],
@ -164,6 +119,7 @@ mongo_cc_library(
idl_generator(
name = "explain_verbosity_gen",
src = "explain_verbosity.idl",
idl_self_dep = True,
)
mongo_cc_library(
@ -174,11 +130,6 @@ mongo_cc_library(
"explain_options.cpp",
":explain_verbosity_gen",
],
hdrs = [
"allowed_contexts.h",
"analyze_regex.h",
"explain_options.h",
],
deps = [
"//src/mongo/db:api_parameters",
"//src/mongo/db:server_base",
@ -230,9 +181,6 @@ mongo_cc_library(
srcs = [
"plan_yield_policy.cpp",
],
hdrs = [
"plan_yield_policy.h",
],
deps = [
"//src/mongo/db:shard_role",
"//src/mongo/db/local_catalog/lock_manager",
@ -246,9 +194,6 @@ mongo_cc_library(
srcs = [
"plan_yield_policy_sbe.cpp",
],
hdrs = [
"plan_yield_policy_sbe.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:sbe_values",
@ -264,9 +209,6 @@ mongo_cc_library(
srcs = [
"plan_yield_policy_release_memory.cpp",
],
hdrs = [
"plan_yield_policy_release_memory.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:service_context",
@ -283,16 +225,6 @@ mongo_cc_library(
"plan_yield_policy_remote_cursor.cpp",
"yield_policy_callbacks_impl.cpp",
],
hdrs = [
"oplog_wait_config.h",
"plan_executor.h",
"plan_yield_policy_remote_cursor.h",
"yield_policy_callbacks_impl.h",
],
header_deps = [
":query_common",
"//src/mongo/db:server_base",
],
deps = [
":plan_yield_policy",
],
@ -313,9 +245,6 @@ mongo_cc_library(
srcs = [
"//src/mongo/db/query/util:spill_util.cpp",
],
hdrs = [
"//src/mongo/db/query/util:spill_util.h",
],
deps = [
"//src/mongo/db/storage:disk_space_util",
],
@ -327,10 +256,6 @@ mongo_cc_library(
"//src/mongo/db/query/plan_cache:sbe_plan_cache_on_parameter_change.cpp",
"//src/mongo/db/query/query_stats:query_stats_on_parameter_change.cpp",
],
hdrs = [
"//src/mongo/db/query/plan_cache:sbe_plan_cache_on_parameter_change.h",
"//src/mongo/db/query/query_stats:query_stats_on_parameter_change.h",
],
deps = [
":memory_util",
"//src/mongo/db:server_base",
@ -350,7 +275,6 @@ mongo_cc_library(
"sampling_confidence_interval.cpp",
"sbe_hashAgg_increased_spilling_mode.cpp",
],
private_hdrs = ["//src/mongo/db/query/query_stats:rate_limiting.h"],
deps = [
":on_parameter_change_updaters",
"//src/mongo/db:server_base",
@ -363,9 +287,6 @@ mongo_cc_library(
srcs = [
"query_knob_configuration.cpp",
],
hdrs = [
"query_knob_configuration.h",
],
deps = [
":query_knobs",
],
@ -384,9 +305,6 @@ idl_generator(
mongo_cc_library(
name = "index_multikey_helpers",
hdrs = [
"index_multikey_helpers.h",
],
deps = [
"//src/mongo/db/index:index_access_method",
],
@ -410,24 +328,6 @@ mongo_cc_library(
"//src/mongo/db/query/plan_enumerator:memo_prune.cpp",
"//src/mongo/db/query/plan_enumerator:plan_enumerator.cpp",
],
hdrs = [
"distinct_access.h",
"index_tag.h",
"planner_access.h",
"planner_analysis.h",
"planner_ixselect.h",
"planner_wildcard_helpers.h",
"query_planner.h",
"query_planner_common.h",
"query_settings.h",
"record_id_range.h",
"//src/mongo/db/query/plan_cache:plan_cache_diagnostic_printer.h",
"//src/mongo/db/query/plan_cache:plan_cache_indexability.h",
"//src/mongo/db/query/plan_enumerator:enumerator_memo.h",
"//src/mongo/db/query/plan_enumerator:memo_prune.h",
"//src/mongo/db/query/plan_enumerator:plan_enumerator.h",
],
private_hdrs = ["//src/mongo/util:map_utils.h"],
deps = [
"//src/mongo/db:query_expressions",
"//src/mongo/db/commands/server_status:server_status_core",
@ -451,11 +351,6 @@ mongo_cc_library(
"//src/mongo/db/query/timeseries:bucket_level_id_predicate_generator.cpp",
"//src/mongo/db/query/timeseries:bucket_spec.cpp",
],
hdrs = [
"//src/mongo/db/query/timeseries:bucket_level_comparison_predicate_generator.h",
"//src/mongo/db/query/timeseries:bucket_level_id_predicate_generator.h",
"//src/mongo/db/query/timeseries:bucket_spec.h",
],
deps = [
"//src/mongo/db:query_expressions",
"//src/mongo/db/matcher:expression_algo",
@ -499,17 +394,7 @@ mongo_cc_library(
"//src/mongo/db/query/client_cursor:kill_cursors_gen",
"//src/mongo/db/query/client_cursor:release_memory_gen",
],
hdrs = [
"count_request.h",
"view_response_formatter.h",
"//src/mongo/db/query/client_cursor:cursor_response.h",
],
private_hdrs = [
"//src/mongo/db/query/client_cursor:clientcursor.h",
"//src/mongo/db/query/client_cursor:cursor_id.h",
],
deps = [
"//src/mongo:core_headers_library",
"//src/mongo/db:server_base",
"//src/mongo/db/auth:security_token_auth",
"//src/mongo/db/query/client_cursor:cursor_response_idl",
@ -540,17 +425,6 @@ mongo_cc_library(
"tailable_mode.cpp",
"tailable_mode_gen",
],
hdrs = [
"query_request_helper.h",
"tailable_mode.h",
],
header_deps = [
"//src/mongo/db:api_parameters", # TODO(SERVER-93876): Remove.
"//src/mongo/db:server_base",
"//src/mongo/db/commands:test_commands_enabled",
"//src/mongo/db/repl:read_concern_args", # TODO(SERVER-93876): Remove.
"//src/mongo/s:common_s",
],
deps = [
":hint_parser",
"//src/mongo/crypto:fle_fields",
@ -569,11 +443,6 @@ mongo_cc_library(
"hint_parser.cpp",
":hint_gen",
],
hdrs = [
"hint_parser.h",
":hint_gen",
"//src/mongo:core_headers",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:cluster_role",
@ -587,9 +456,6 @@ mongo_cc_library(
"index_hint.cpp",
":index_hint_gen",
],
header_deps = [
"//src/mongo/db/repl:oplog_buffer_batched_queue",
],
deps = [
"//src/mongo/db:server_base",
],
@ -600,9 +466,6 @@ mongo_cc_library(
srcs = [
"map_reduce_output_format.cpp",
],
hdrs = [
"map_reduce_output_format.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -611,9 +474,6 @@ mongo_cc_library(
mongo_cc_library(
name = "explain_diagnostic_printer",
srcs = [],
hdrs = [
"//src/mongo/db/query:explain_diagnostic_printer.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:commands",
@ -625,9 +485,6 @@ mongo_cc_library(
srcs = [
"query_test_service_context.cpp",
],
hdrs = [
"query_test_service_context.h",
],
deps = [
"//src/mongo/db:service_context_test_fixture",
"//src/mongo/db/query/collation:collator_factory_mock",
@ -639,9 +496,6 @@ mongo_cc_library(
srcs = [
"query_planner_test_fixture.cpp",
],
hdrs = [
"query_planner_test_fixture.h",
],
deps = [
":query_planner_test_lib",
"//src/mongo:base",
@ -655,9 +509,6 @@ mongo_cc_library(
srcs = [
"query_planner_test_lib.cpp",
],
hdrs = [
"query_planner_test_lib.h",
],
deps = [
":query_planner",
":query_test_service_context",
@ -670,9 +521,6 @@ mongo_cc_library(
srcs = [
"shard_filterer_factory_mock.cpp",
],
hdrs = [
"shard_filterer_factory_mock.h",
],
deps = [
"//src/mongo/db:query_exec",
],
@ -683,10 +531,6 @@ mongo_cc_library(
srcs = [
"canonical_query_test_util.cpp",
],
hdrs = [
"canonical_query_test_util.h",
"//src/mongo:core_headers",
],
deps = [
":canonical_query_base",
":query_test_service_context",
@ -720,10 +564,6 @@ mongo_cc_unit_test(
data = [
"//src/mongo/db/query/test_output/query_planner_i_x_select_test:test_data",
],
private_hdrs = [
":wildcard_test_utils.h",
"//src/mongo/db/query/util:cartesian_product.h",
],
tags = [
"mongo_unittest_first_group",
],
@ -733,7 +573,6 @@ mongo_cc_unit_test(
"//src/mongo/db:service_context_d",
"//src/mongo/db/local_catalog:collection_mock",
"//src/mongo/db/query/compiler/optimizer/index_bounds_builder:index_bounds_builder_test_fixture",
"//src/mongo/idl:server_parameter_test_controller",
],
)
@ -759,7 +598,6 @@ mongo_cc_unit_test(
"//src/mongo/db:query_exec",
"//src/mongo/db/pipeline:aggregation_request_helper",
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/idl:server_parameter_test_controller",
],
)
@ -778,7 +616,6 @@ mongo_cc_unit_test(
"record_id_range_test.cpp",
"view_response_formatter_test.cpp",
],
private_hdrs = [":wildcard_test_utils.h"],
tags = [
"mongo_unittest_fifth_group",
],
@ -795,7 +632,6 @@ mongo_cc_unit_test(
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/db/query/collation:collator_interface_mock",
"//src/mongo/db/query/compiler/optimizer/index_bounds_builder:index_bounds_builder_test_fixture",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/rpc",
"//src/mongo/util:clock_source_mock",
],
@ -804,11 +640,6 @@ mongo_cc_unit_test(
mongo_cc_benchmark(
name = "canonical_query_bm",
srcs = ["canonical_query_bm.cpp"],
header_deps = [
"//src/mongo/db/matcher:expressions_mongod_only",
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/db/query:canonical_query_base",
],
tags = ["query_bm"],
deps = [
"//src/mongo/db/query:query_fcv_environment_for_test",
@ -831,7 +662,6 @@ mongo_cc_benchmark(
mongo_cc_library(
name = "query_bm_constants",
srcs = ["query_bm_constants.cpp"],
hdrs = ["query_bm_constants.h"],
deps = ["//src/mongo:base"],
)
@ -840,12 +670,6 @@ mongo_cc_library(
srcs = [
"query_bm_fixture.cpp",
],
hdrs = [
"query_bm_fixture.h",
],
header_deps = [
"//src/mongo/unittest:benchmark_util",
],
deps = [
"//src/mongo/db:read_write_concern_defaults_mock",
"//src/mongo/db:service_context_d",

View File

@ -9,13 +9,7 @@ exports_files(
]),
)
mongo_cc_library(
name = "algebra",
private_hdrs = [
":operator.h",
":polyvalue.h",
],
)
mongo_cc_library(name = "algebra")
mongo_cc_unit_test(
name = "algebra_test",

View File

@ -14,12 +14,6 @@ mongo_cc_library(
srcs = [
"multikey_dotted_path_support.cpp",
],
hdrs = [
"//src/mongo/db/query/bson:multikey_dotted_path_support.h",
],
header_deps = [
"//src/mongo/db/exec/sbe:query_sbe_plan_stats",
],
deps = [
"//src/mongo:base",
],

View File

@ -16,13 +16,6 @@ mongo_cc_library(
"collect_query_stats_mongod.cpp",
"cursor_manager.cpp",
],
hdrs = [
"clientcursor.h",
"collect_query_stats_mongod.h",
"cursor_manager.h",
"//src/mongo/db/local_catalog:external_data_source_scope_guard.h", # TODO(SERVER-95100): Remove
"//src/mongo/db/memory_tracking:operation_memory_usage_tracker.h",
],
deps = [
":cursor_server_params",
"//src/mongo/db:commands",
@ -47,10 +40,6 @@ mongo_cc_library(
"cursor_idl_validator.cpp",
":cursor_response_gen",
],
hdrs = [
"cursor_idl_validator.h",
"//src/mongo/db/memory_tracking:operation_memory_usage_tracker.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -70,9 +59,6 @@ mongo_cc_library(
"cursor_server_params.cpp",
":cursor_server_params_gen",
],
hdrs = [
"cursor_server_params.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -94,10 +80,6 @@ mongo_cc_library(
"generic_cursor_utils.cpp",
":generic_cursor_gen",
],
hdrs = [
"cursor_id.h",
"generic_cursor_utils.h",
],
deps = [
"//src/mongo/db:server_base",
"//src/mongo/db:service_context", # TODO(SERVER-93876): Remove.
@ -120,9 +102,6 @@ mongo_cc_library(
srcs = [
"release_memory_util.cpp",
],
hdrs = [
"release_memory_util.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -165,6 +144,5 @@ mongo_cc_unit_test(
tags = ["mongo_unittest_eighth_group"],
deps = [
":client_cursor",
"//src/mongo/idl:server_parameter_test_controller",
],
)

View File

@ -15,11 +15,6 @@ mongo_cc_library(
"collation_index_key.cpp",
"collator_interface.cpp",
],
hdrs = [
"collation_index_key.h",
"collation_spec.h",
"collator_interface.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -30,9 +25,6 @@ mongo_cc_library(
srcs = [
"collator_interface_mock.cpp",
],
hdrs = [
"collator_interface_mock.h",
],
deps = [
":collator_interface",
"//src/mongo/db:server_base", # TODO(SERVER-93876): Remove.
@ -44,9 +36,6 @@ mongo_cc_library(
srcs = [
"collator_factory_interface.cpp",
],
hdrs = [
"collator_factory_interface.h",
],
deps = [
":collator_interface", # TODO(SERVER-93876): Remove.
"//src/mongo/db:service_context",
@ -58,9 +47,6 @@ mongo_cc_library(
srcs = [
"collator_factory_mock.cpp",
],
hdrs = [
"collator_factory_mock.h",
],
deps = [
":collator_factory_interface", # TODO(SERVER-93876): Remove.
":collator_interface_mock",
@ -73,10 +59,6 @@ mongo_cc_library(
"collator_factory_icu.cpp",
"collator_interface_icu.cpp",
],
hdrs = [
"collator_factory_icu.h",
"collator_interface_icu.h",
],
deps = [
":collator_factory_interface",
"//src/mongo:base", # TODO(SERVER-93876): Remove.
@ -108,7 +90,6 @@ mongo_cc_unit_test(
"collator_interface_icu_test.cpp",
"collator_interface_mock_test.cpp",
],
private_hdrs = ["//src/mongo/bson:bsonobj_comparator.h"],
tags = ["mongo_unittest_fourth_group"],
deps = [
":collator_factory_mock",

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"ce_common.cpp",
],
hdrs = [
"ce_common.h",
],
deps = [
"//src/mongo/db/query/compiler/optimizer/cost_based_ranker:estimates",
"//src/mongo/db/query/compiler/stats:stats_gen",
@ -29,9 +26,6 @@ mongo_cc_library(
srcs = [
"ce_test_utils.cpp",
],
hdrs = [
"ce_test_utils.h",
],
deps = [
":ce_common",
"//src/mongo/db:query_expressions",

View File

@ -11,9 +11,6 @@ exports_files(
mongo_cc_library(
name = "exact_cardinality_interface",
hdrs = [
"exact_cardinality.h",
],
deps = [
"//src/mongo/db:query_expressions",
],

View File

@ -11,9 +11,6 @@ exports_files(
mongo_cc_library(
name = "histogram_common",
hdrs = [
"histogram_common.h",
],
deps = [
"//src/mongo/db/query/compiler/ce:ce_common",
],
@ -25,10 +22,6 @@ mongo_cc_library(
"histogram_estimation_impl.cpp",
"histogram_estimator.cpp",
],
hdrs = [
"histogram_estimation_impl.h",
"histogram_estimator.h",
],
no_undefined_ref_DO_NOT_USE = False,
deps = [
":histogram_common",
@ -44,9 +37,6 @@ mongo_cc_library(
srcs = [
"histogram_test_utils.cpp",
],
hdrs = [
"histogram_test_utils.h",
],
deps = [
":histogram_estimator",
"//src/mongo/db:query_exec",

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"sampling_test_utils.cpp",
],
hdrs = [
"sampling_test_utils.h",
],
deps = [
"//src/mongo/db:write_stage_common",
"//src/mongo/db/collection_crud",
@ -33,9 +30,6 @@ mongo_cc_library(
srcs = [
"math.cpp",
],
hdrs = [
"math.h",
],
deps = [
"//src/mongo/db/query/compiler/ce:ce_common",
],
@ -46,10 +40,6 @@ mongo_cc_library(
srcs = [
"sampling_estimator_impl.cpp",
],
hdrs = [
"sampling_estimator.h",
"sampling_estimator_impl.h",
],
deps = [
":sampling_math",
"//src/mongo/db:query_exec",
@ -59,9 +49,6 @@ mongo_cc_library(
mongo_cc_library(
name = "sampling_estimator_interface",
hdrs = [
"sampling_estimator.h",
],
deps = [
"//src/mongo/db:query_expressions",
],

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"dependencies.cpp",
],
hdrs = [
"dependencies.h",
],
deps = [
"//src/mongo/db/exec/document_value", # TODO(SERVER-93876): Remove.
"//src/mongo/db/pipeline:field_path",
@ -29,10 +26,6 @@ mongo_cc_library(
"expression_dependencies.cpp",
"match_expression_dependencies.cpp",
],
hdrs = [
"expression_dependencies.h",
"match_expression_dependencies.h",
],
deps = [
":dependencies",
"//src/mongo:base",

View File

@ -16,16 +16,6 @@ mongo_cc_library(
"projection_ast_util.cpp",
"projection_parser.cpp",
],
hdrs = [
"projection.h",
"projection_ast.h",
"projection_ast_util.h",
"projection_ast_visitor.h",
"projection_parser.h",
"//src/mongo/base:exact_cast.h",
"//src/mongo/db/query/compiler/rewrites/matcher:expression_optimizer.h",
],
private_hdrs = [":projection_ast_path_tracking_visitor.h"],
deps = [
"//src/mongo/db:query_expressions",
"//src/mongo/db:server_base",

View File

@ -14,12 +14,6 @@ mongo_cc_library(
srcs = [
"sort_pattern.cpp",
],
hdrs = [
"sort_pattern.h",
],
header_deps = [
"//src/mongo/db/exec/document_value",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:query_expressions", # TODO(SERVER-93876): Remove.
@ -37,7 +31,6 @@ mongo_cc_unit_test(
":sort_pattern",
"//src/mongo/db/exec/document_value:document_value_test_util",
"//src/mongo/db/pipeline:expression_context_for_test",
"//src/mongo/idl:server_parameter_test_controller",
"//src/mongo/util:clock_source_mock",
],
)

View File

@ -14,9 +14,6 @@ mongo_cc_library(
srcs = [
"index_entry.cpp",
],
hdrs = [
"index_entry.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:query_expressions",

View File

@ -16,12 +16,6 @@ mongo_cc_library(
"cbr_rewrites.cpp",
"ce_cache.cpp",
],
hdrs = [
"cardinality_estimator.h",
"cbr_rewrites.h",
"ce_cache.h",
"//src/mongo/db/query:query_planner_params.h",
],
deps = [
"ce_utils",
"estimates",
@ -38,10 +32,6 @@ mongo_cc_library(
srcs = [
"cost_estimator.cpp",
],
hdrs = [
"cost_estimator.h",
"//src/mongo/db/query/compiler/physical_model/query_solution:query_solution.h",
],
deps = [
"cardinality_estimator",
"ce_utils",
@ -56,12 +46,6 @@ mongo_cc_library(
srcs = [
"estimates.cpp",
],
hdrs = [
"estimates.h",
"estimates_storage.h",
"//src/mongo/db/query/util:named_enum.h",
"//src/mongo/util:fixed_string.h",
],
deps = [
"//src/mongo/db:server_base",
],
@ -72,16 +56,6 @@ mongo_cc_library(
srcs = [
"heuristic_estimator.cpp",
],
hdrs = [
"heuristic_estimator.h",
"//src/mongo/db/matcher:expression.h",
"//src/mongo/db/matcher:expression_visitor.h",
"//src/mongo/db/matcher:matchable.h",
"//src/mongo/db/matcher:path.h",
"//src/mongo/db/pipeline:legacy_runtime_constants_gen",
"//src/mongo/db/pipeline:variables.h",
"//src/mongo/db/query/compiler/dependency_analysis:dependencies.h",
],
deps = [
"ce_utils",
"estimates",
@ -96,9 +70,6 @@ mongo_cc_library(
srcs = [
"ce_utils.cpp",
],
hdrs = [
"ce_utils.h",
],
deps = [
"estimates",
],
@ -124,9 +95,6 @@ mongo_cc_library(
srcs = [
"cbr_test_utils.cpp",
],
hdrs = [
"cbr_test_utils.h",
],
deps = [
":cardinality_estimator",
":estimates",
@ -146,14 +114,9 @@ mongo_cc_library(
mongo_cc_library(
name = "plan_ranking_utils",
srcs = ["//src/mongo/db/query/compiler/optimizer/cost_based_ranker:plan_ranking_utils.cpp"],
private_hdrs = [
":plan_ranking_utils.h",
"//src/mongo/dbtests:dbtests.h",
],
deps = [
"//src/mongo/db/index_builds:multi_index_block",
"//src/mongo/db/query:query_planner_test_lib",
"//src/mongo/idl:server_parameter_test_controller",
],
)

View File

@ -22,11 +22,6 @@ mongo_cc_library(
"interval_evaluation_tree.cpp",
":expression_geo_index_knobs_gen",
],
hdrs = [
"expression_geo_index_mapping.h",
"index_bounds_builder.h",
"interval_evaluation_tree.h",
],
deps = [
"//src/mongo/db:server_base",
"//src/mongo/db/geo:geometry",
@ -40,7 +35,6 @@ mongo_cc_library(
mongo_cc_library(
name = "index_bounds_builder_test_fixture",
private_hdrs = [":index_bounds_builder_test_fixture.h"],
deps = [
":index_bounds_builder",
"//src/mongo/db/pipeline:expression_context_for_test",

View File

@ -25,12 +25,6 @@ mongo_cc_library(
"join_graph.cpp",
"path_resolver.cpp",
],
hdrs = [
"adjacency_matrix.h",
"join_graph.h",
"logical_defs.h",
"path_resolver.h",
],
deps = [
"//src/mongo/db:server_base",
"//src/mongo/db/query:canonical_query_base",
@ -109,9 +103,6 @@ mongo_cc_library(
srcs = [
"join_predicate.cpp",
],
hdrs = [
"join_predicate.h",
],
deps = [
"//src/mongo/db/pipeline:field_path",
],
@ -136,9 +127,6 @@ mongo_cc_library(
srcs = [
"reorder_joins.cpp",
],
hdrs = [
"reorder_joins.h",
],
deps = [
":plan_enumerator",
":solution_storage",
@ -148,9 +136,6 @@ mongo_cc_library(
mongo_cc_library(
name = "solution_storage",
hdrs = [
"solution_storage.h",
],
deps = [
"//src/mongo/db/query:canonical_query_base",
],
@ -161,9 +146,6 @@ mongo_cc_library(
srcs = [
"unit_test_helpers.cpp",
],
hdrs = [
"unit_test_helpers.h",
],
deps = [
"//src/mongo/db:server_base",
"//src/mongo/db/local_catalog:catalog_test_fixture",

View File

@ -16,11 +16,6 @@ mongo_cc_library(
"expression_parser.cpp",
"matcher_type_set_parser.cpp",
],
hdrs = [
"expression_geo_parser.h",
"expression_parser.h",
"matcher_type_set_parser.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:query_expressions",
@ -33,9 +28,6 @@ mongo_cc_library(
mongo_cc_library(
name = "parsed_match_expression_for_test",
hdrs = [
"parsed_match_expression_for_test.h",
],
deps = [
":matcher_parser",
"//src/mongo/db/pipeline:expression_context_for_test",

View File

@ -15,11 +15,6 @@ mongo_cc_library(
"json_schema_parser.cpp",
"//src/mongo/db/matcher/schema:encrypt_schema_gen",
],
hdrs = [
"encrypt_schema_types_parser.h",
"json_schema_parser.h",
"//src/mongo/db/matcher/schema:encrypt_schema_gen",
],
deps = [
"//src/mongo:base",
"//src/mongo/db:query_expressions",
@ -38,7 +33,6 @@ mongo_cc_unit_test(
"object_keywords_test.cpp",
"scalar_keywords_test.cpp",
],
private_hdrs = [":assert_serializes_to.h"],
tags = ["mongo_unittest_third_group"],
deps = [
":json_schema_parser",

View File

@ -14,10 +14,6 @@ mongo_cc_library(
srcs = [
"index_bounds.cpp",
],
hdrs = [
"index_bounds.h",
"//src/mongo/db/storage:index_entry_comparison.h",
],
deps = [
"//src/mongo:base",
"//src/mongo/db/query/compiler/physical_model/interval",

Some files were not shown because too many files have changed in this diff Show More