Skip to content

Releases: martis42/depend_on_what_you_use

0.10.0

13 Sep 17:12

Choose a tag to compare

This release is the first one of the multi release journey over the next months / releases to introduce a C++ based implementation. This should help mitigate many of the performance problems of DWYU in large projects and/or complex CC targets.

Furthermore, DWYU offers now a new approach for deducing which header files belong to the toolchain and thus do not require a dedicated dependency, so we can get rid of the manually created hard coded list of headers.

Those new features are for now opt-in. Please test them and create a bug report if they don't behave as expected. The plan is to make those new things the default in a future release and eventually deprecate the old solutions.
For details how to activate those new features, see Noteworthy Changes below.

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.10.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "8d552c2b7c8e65e4b7bcf02949f6df7a0fd249f3e475961d360eee98de466e11",
    strip_prefix = "depend_on_what_you_use-0.10.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.10.0/depend_on_what_you_use-0.10.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Noteworthy Changes

  • First step for the new C++ based implementation. For workspaces with many small CC targets this should offer a significant speed increase. Also workspaces with few or very complex targets still should see a measurable improvement. To use the partly C++ based implementation use the aspect config option use_cpp_implementation=True. For details see #397
  • Enable automatically discovering the header files provided by your CC toolchain. Those are then ignored during the DWYU analysis, since one does not require a direct dependency for those. For most users this should not change much, as the hard coded list we used until now should already have covered most common cases. This new approach makes this more generic for supporting all kinds of platform and system specific headers as well. For using this new approach - before it becomes the default in a future release - use the aspect config option ignore_cc_toolchain_headers=True. For details see #372
  • You can now choose different names than @depend_on_what_you_use when using DWYU in your stack, see #381

What's Changed

  • chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.16.0 by @renovate[bot] in #370
  • Minor Refactoring for docs and rules_cc usage by @martis42 in #371
  • chore(deps): update dependency aspect_bazel_lib to v2.19.4 by @renovate[bot] in #374
  • chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.16.1 by @renovate[bot] in #373
  • Chore: Pre-commit dependency updates by @martis42 in #375
  • feat(aspect): Deduce and ignore headers provided by the CC toolchain by @martis42 in #372
  • Apply fixes no longer crashes on no deps by @martis42 in #377
  • Multiple small refactoring by @martis42 in #378
  • refactoring: Rename providers for CcInfo remapping feature by @martis42 in #379
  • refactor(aspect): Use leaner API for param files by @martis42 in #380
  • fix: Allow choosing a custom name when depending on DWYU by @martis42 in #381
  • Refactoring Limit visibility of implementation details by @martis42 in #382
  • perf: Do not unroll depsets into lists by @martis42 in #383
  • refactor: Rename 'src' directory to 'dwyu' by @martis42 in #384
  • refactor: Add missing visibility restrictions for private utils by @martis42 in #386
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.7 by @renovate[bot] in #387
  • chore(deps): update dependency aspect_bazel_lib to v2.20.0 by @renovate[bot] in #388
  • test: Add benchmarks for overall DWYU performance by @martis42 in #389
  • chore/style: Introduce clang-format by @martis42 in #390
  • Doing chores by @martis42 in #391
  • doc: Explain why the CC toolchain preprocessor cannot be used by @martis42 in #392
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.11 by @renovate[bot] in #394
  • chore(deps): update dependency aspect_bazel_lib to v2.21.1 by @renovate[bot] in #395
  • test(benchmark): Fix broken execution by @martis42 in #396
  • feat(aspect): First bite of switching implementation to C++ by @martis42 in #397

Full Changelog: 0.9.0...0.10.0

0.9.0

30 May 11:16

Choose a tag to compare

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.9.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "1e287a7d094b7c3f29782d521130dfb4c1b1cd014e80c2eab24e597b9817e9ab",
    strip_prefix = "depend_on_what_you_use-0.9.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.9.0/depend_on_what_you_use-0.9.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Noteworthy Changes

  • Improved performance while comparing include statements to headers provided by dependencies. Thanks to @arvid-norlander for this contribution! #352
  • Allow disabling the preprocessor with a new aspect option experimental_no_preprocessor. While the preprocessor allows us to handle conditional includes and generally all sorts of preprocessor directives and macros, the implementation we use its quite slow. For projects without manipulation of include statements on preprocessor level this can significantly reduce the time required for the DWYU analysis (up to factor 100 in benchmarks) #359, #366

What's Changed

  • test(bcr): Fix presubmit tests Bazel versions by @martis42 in #345
  • chore(deps): update dependency aspect_bazel_lib to v2.14.0 by @renovate in #346
  • chore(deps): update dependency python to 3.13 by @renovate in #347
  • doc: Fix link to implementation_deps details by @martis42 in #349
  • chore(deps): update dependency aspect_bazel_lib to v2.15.3 by @renovate in #354
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.9 by @renovate in #355
  • doc: Update contribution guidelines by @martis42 in #357
  • perf(aspect): Fix extreme bad complexity by @arvid-norlander in #352
  • test(aspect): Add benchmark for analyzing includes by @martis42 in #358
  • feat(aspect): Allow disabling the preprocessor by @martis42 in #359
  • chore(deps): update dependency aspect_bazel_lib to v2.17.0 by @renovate in #360
  • chore(deps): update pre-commit hook keith/pre-commit-buildifier to v8 by @renovate in #361
  • chore(deps): update dependency platforms to v1 by @renovate in #363
  • chore(deps): update dependency googletest to v1.17.0 by @renovate in #364
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.11.12 by @renovate in #365
  • refactor: Use cc_* rules from rules_cc instead of native ones by @martis42 in #362
  • fix(aspect): Make the 'no_preprocessor' option experimental by @martis42 in #366
  • chore: Automatically update BCR fork during deployment by @martis42 in #367
  • docs: Add commit style to contribution guidelines and do a restructuring by @martis42 in #368

New Contributors

Full Changelog: 0.8.0...0.9.0

0.8.0

16 Mar 08:58

Choose a tag to compare

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.8.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "2922f9b3a6435a14f4e05098e2324098acfb4f2da78d74f0a3e98543df241b16",
    strip_prefix = "depend_on_what_you_use-0.8.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.8.0/depend_on_what_you_use-0.8.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Noteworthy Changes

  • fix(aspect): Ignore non C/CPP deps in target_mapping by @martis42 in #343

What's Changed

  • chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.15.0 by @renovate in #340
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.9.9 by @renovate in #339
  • fix(aspect): Ignore non cc deps in target_mapping by @martis42 in #343
  • test(aspect): Support and use more dynamic version specifiers by @martis42 in #344

Full Changelog: 0.7.0...0.8.0

0.7.0

01 Feb 10:20

Choose a tag to compare

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.7.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "73a0140316118d56bf05d435b48525ea0fcdd27972f5df459eae98e92fd82cc0",
    strip_prefix = "depend_on_what_you_use-0.7.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.7.0/depend_on_what_you_use-0.7.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Noteworthy Changes

  • Required minimum Bazel version increased to 6.4.0 @martis42 in #332
  • Use dependencies compatible to all supported Bazel versions (6.4.0 to rolling) @martis42 in #332
  • Ensure compatibility to Python 3.13 @martis42 in #338

What's Changed

  • docs: Fix typo by @martis42 in #321
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.8.4 by @renovate in #323
  • chore(deps): update pre-commit hook executablebooks/mdformat to v0.7.21 by @renovate in #324
  • chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.14.1 by @renovate in #325
  • test(bcr): Be compatible to environment without bazelisk by @martis42 in #326
  • test(aspect): Add test for providing defines via cxxopt by @martis42 in #327
  • chore: Introduce buildifier config file by @martis42 in #328
  • refactor(ci): Drop superfluous release step and ease BCR deployment by @martis42 in #329
  • chore: Add mypy badge by @martis42 in #330
  • Add tests focused on integration into workspaces by @martis42 in #331
  • Fix dependencies for all supported bazel versions by @martis42 in #332
  • Switch to bazel 8 by @martis42 in #333
  • chore(deps): update pre-commit hook executablebooks/mdformat to v0.7.22 by @renovate in #335
  • chore(deps): update dependency aspect_bazel_lib to v2.13.0 by @renovate in #336
  • test(apply_fixes): Test empty list attributes by @martis42 in #337
  • Update tested versions by @martis42 in #338

Full Changelog: 0.6.0...0.7.0

0.6.0

20 Dec 07:44

Choose a tag to compare

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.6.0")

Using WORKSPACE (Legacy)

⚠️ This release is not compatible to Bazel >= 8.0.0 using the legacy WORKSPACE setup ⚠️
The problem is that the rules_cc and rules_pyhon versions we reference in the dwyu_setup_step_1 macro are not compatible to Bazel 8. It is planned to fix this in a later release. You might be able to circumvent this by enforcing newer versions of those rule sets in your workspace.

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "2bde20cec993fad9f9989aaac06900188d9fcc9f23c1de3a5b326c0d31cc1457",
    strip_prefix = "depend_on_what_you_use-0.6.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.6.0/depend_on_what_you_use-0.6.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Breaking Changes

  • Dropped Support for Bazel 5. Minimum Bazel version is now 6.0.0.

Noteworthy Changes

  • Build - Dropped Bazel 5.x support #309
  • Fix (aspect) - Allow multiple dependencies providing the same header #292
  • Fix (aspect) - Patch infinite recursion error in pcpp (preprocessor used for parsing the code) #320
  • Feature - Support --noexperimental_python_import_all_repositories #312
  • Feature (aspect) - Support Bazel C++ toolchain feature external_include_paths #319
  • Testing - Test environments are now: ubuntu-24.04, macos-15 and windows-2022 #307

What's Changed

  • refactor: Streamline release process by @martis42 in #290
  • Increase used and tested Bazel version by @martis42 in #291
  • fix(aspect): Allow multiple dependencies providing the same header by @martis42 in #292
  • refactor(aspect): Only use a param file if required by @martis42 in #294
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.6.8 by @renovate in #295
  • chore(deps): update bazel dependencies by @renovate in #296
  • chore(deps): update pre-commit hook executablebooks/mdformat to v0.7.18 by @renovate in #298
  • chore(deps): update dependency aspect_bazel_lib to v2.9.3 by @renovate in #297
  • chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.13.0 by @renovate in #305
  • chore: Update CI test environment by @martis42 in #307
  • chore(deps): update pre-commit hook executablebooks/mdformat to v0.7.19 by @renovate in #303
  • Cleanup unused things by @martis42 in #308
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.8.2 by @renovate in #304
  • build: Drop Bazel 5.x support by @martis42 in #309
  • Streamline and harden test setup by @martis42 in #311
  • Use modern language rules load statements by @martis42 in #310
  • feat: Support --noexperimental_python_import_all_repositories by @martis42 in #312
  • Refactor auto deps update by @martis42 in #313
  • Streamline renovate behavior and config by @martis42 in #314
  • chore(deps): update dependency stardoc to v0.7.2 by @renovate in #315
  • chore(deps): update dependency aspect_bazel_lib to v2.10.0 by @renovate in #316
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.8.3 by @renovate in #317
  • chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v5 by @renovate in #318
  • feat(aspect): support toolchain feature external_include_paths by @martis42 in #319
  • fix(aspect): Patch RecursionError in pcpp by @martis42 in #320

Full Changelog: 0.5.0...0.6.0

0.5.0

07 Sep 09:25

Choose a tag to compare

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.5.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "39b106030a9e79db2fb52dca1b66fec7618d93e0dff986ee55f3b176fd979c91",
    strip_prefix = "depend_on_what_you_use-0.5.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.5.0/depend_on_what_you_use-0.5.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Noteworthy Changes

  • Documentation - There is now a single source of truth for the aspect documentation. You find it in docs/dwyu_aspect.md #273
  • Bugfix (automatic fixes) - Fix bug regarding automatic fixes failing while analyzing targets with empty hdrs attribute #280
  • Feature (aspect) - Experimental support for setting the __cplusplus macro to enable correctly processing files with preprocessor statements relying on this macro #288
  • Feature (aspect) - Support processing targets with large attributes which otherwise would fail due to the system's command length limit #283

What's Changed

  • chore(deps): update dependency bazel_skylib to v1.7.1 by @renovate in #263
  • Update quality tools by @martis42 in #265
  • Update Ubuntu in BCR tests by @martis42 in #267
  • Reduce Windows Python overhead by @martis42 in #266
  • Stop bundling renovate quality updates by @martis42 in #268
  • Update tested bazel versions by @martis42 in #269
  • Replace Bazel mypy orchestration with pre-commit by @martis42 in #271
  • Remove superfluous export by @martis42 in #272
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.5.5 by @renovate in #274
  • chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.11.1 by @renovate in #275
  • chore(deps): update dependency pre-commit to v3.8.0 by @renovate in #276
  • chore(deps): update pre-commit hook keith/pre-commit-buildifier to v7 by @martis42 in #278
  • Use stardoc to generate some docs by @martis42 in #273
  • Work around missing "stringListValue" in certain cases by @mrkkrp in #280
  • chore: Update pre-commit to 3.8.0 by @martis42 in #281
  • chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.6.3 by @renovate in #286
  • chore(deps): update pre-commit hook pre-commit/mirrors-mypy to v1.11.2 by @renovate in #284
  • chore(deps): update pre-commit hook keith/pre-commit-buildifier to v7.3.1 by @renovate in #287
  • chore(deps): update dependency aspect_bazel_lib to v2.8.1 by @renovate in #285
  • Experimental support for setting the '__cplusplus' macro by @martis42 in #288
  • Use param files to invoke process_target.py by @mrkkrp in #283

New Contributors

Full Changelog: 0.4.0...0.5.0

0.4.0

20 Jun 21:04

Choose a tag to compare

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.4.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "e734099ac92263f61f155e2a39dc29937be818d16d25891b166476710ec25ac4",
    strip_prefix = "depend_on_what_you_use-0.4.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.4.0/depend_on_what_you_use-0.4.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Noteworthy Changes

  • Added missing headers to default std headers list #262

What's Changed

Full Changelog: 0.3.0...0.4.0

0.3.0

26 May 17:29

Choose a tag to compare

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.3.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "b56cdfaed0d74967fefb54bdd3f05bd167c4c4ebaa2a67af962d969e6a51962b",
    strip_prefix = "depend_on_what_you_use-0.3.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.3.0/depend_on_what_you_use-0.3.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Breaking Changes

  • Automatic fixes: Change how arguments are forwarded to buildozer. This is done to achieve a consistent API to how arguments are forwarded to the bazel commands. #251

Noteworthy Changes

  • Analysis: Update standard library headers which are ignored by DWYU #248
  • Automatic fixes: Support cquery to find missing dependencies. Also we allow now forwarding arguments to the bazel commands which are executed by the apply_fixes script #249, #252
  • Analysis: Fix bug for analyzing implementation_deps when using target mappings #254
  • Automatic fiixes: Add a new method for discovering DWYU report files which should be more efficient for large workspaces. This is based on creating an execution log for the analysis done by the DWYU aspect and then forwarding this log to the apply_fixes script #255

What's Changed

New Contributors

Full Changelog: 0.2.0...0.3.0

0.2.0

22 Apr 18:58

Choose a tag to compare

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.2.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "fc0e730072265d72b796fb39e4d7022249ad35239fdd9fbbce33eb393862039f",
    strip_prefix = "depend_on_what_you_use-0.2.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.2.0/depend_on_what_you_use-0.2.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Noteworthy Changes

  • apply_fixes: Improve heuristic for finding missing dependencies #241
  • Allow skipping external targets #242

What's Changed

  • chore(deps): update quality tooling dependencies by @renovate in #232
  • No automated updates of main deps by @martis42 in #233
  • chore(deps): update softprops/action-gh-release action to v2 by @renovate in #235
  • chore(deps): update quality tooling dependencies by @renovate in #234
  • chore: Make Renovate aware of all Python requirements files by @martis42 in #236
  • Update used and tested Bazel by @martis42 in #238
  • Streamline module bazel by @martis42 in #239
  • Document todo for after abandoning Bazel 5 support by @martis42 in #240
  • apply_fixes: Improve dependency discovery heuristic by @martis42 in #241
  • Allow skipping external targets by @martis42 in #242

Full Changelog: 0.1.0...0.2.0

0.1.0

25 Feb 16:59

Choose a tag to compare

🎉 This release is a major milestone for DWYU 🎉

This is the first release without a leading 0.0. While DWYU is not yet ready for 1.0.0, its overall feature set is now mostly stable. No bug reports with major gaps in functionality have been reported and thus we are confident to leave the "beta testing" phase.

This is also the first release supporting bzlmod. Also we added examples demonstrating DWYU usage.

Please note this release has some breaking changes as defined below.

Using Bzlmod (Recommended)

Add to your MODULE.bazel file:

bazel_dep(name = "depend_on_what_you_use", version = "0.1.0")

Using WORKSPACE (Legacy)

Add to your WORKSPACE file:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "depend_on_what_you_use",
    sha256 = "746de76cb6a8d5e0d6e60c91bcc73ffd6088fff4152552c3e0aee6219c1d809d",
    strip_prefix = "depend_on_what_you_use-0.1.0",
    url = "https://github.com/martis42/depend_on_what_you_use/releases/download/0.1.0/depend_on_what_you_use-0.1.0.tar.gz",
)

load("@depend_on_what_you_use//:setup_step_1.bzl", dwyu_setup_step_1 = "setup_step_1")
dwyu_setup_step_1()

load("@depend_on_what_you_use//:setup_step_2.bzl", dwyu_setup_step_2 = "setup_step_2")
dwyu_setup_step_2()

Breaking Changes

  • The minimum Bazel version is now 5.4.0
  • The output group has been renamed. Replace --output_groups=cc_dwyu_output with --output_groups=dwyu in your DWYU commands #170
  • The name for the DWYU aspect option to provide a config file for ignored include paths changed from config = "//<your_config_file>.json" to ignored_includes = "//<your_config_file>.json" #181
  • Renamed the --bazel-bin apply_fixes CLI option to --search-path to make it more obvious how flexibly it can be used #221

Noteworthy Changes

  • Windows and macOS are now explicitly tested in the CI to ensure DWYU behaves on those platforms as expected.
  • You can now specify a custom list of tags to make DWYU skip analyzing targets #159
  • Support depending on DWYU via bzlmod
  • Ensure code quality with ruff (most checks are active)
  • There is now a set of examples
  • Add verbosity option to the aspect #209

What's Changed

New Contributors

Full Changelog: 0.0.13...0.1.0