Skip to content

Add google/re2 and abseil-cpp as external dependencies#336

Draft
Copilot wants to merge 10 commits into
mainfrom
copilot/add-re2-dependency
Draft

Add google/re2 and abseil-cpp as external dependencies#336
Copilot wants to merge 10 commits into
mainfrom
copilot/add-re2-dependency

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

  • Add CCR_USE_RE2 cmake option (defaults to CCR_DEFAULTOPT)
  • Make abseil/re2 fetch conditional on CCR_USE_RE2 in external/google/CMakeLists.txt
  • Detect re2 availability via TARGET re2::re2 in top-level CMakeLists and set CCR_HAS_RE2
  • Update cucumber_expression/CMakeLists.txt: conditionally compile Re2RegexStrategy, link re2::re2, and propagate CCR_HAS_RE2 compile definition
  • Add RegexStrategyFactory.hpp / RegexStrategyFactory.cpp factory returning unique_ptr<RegexStrategy> (Re2 when available, Std otherwise)
  • Guard TestRegexStrategy.cpp Re2-specific tests with #ifdef CCR_HAS_RE2
  • Add TestRegexStrategyFactory.cpp with tests for the factory
  • Update test/CMakeLists.txt to include TestRegexStrategyFactory.cpp
  • Build and verify (both CCR_USE_RE2=On and CCR_USE_RE2=Off pass all tests)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

⚠️ Details

No release type found in pull request title "Add google/re2 and abseil-cpp as external dependencies". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Test Results

27 tests  ±0   27 ✅ ±0   23s ⏱️ -4s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 89aae22. ± Comparison against base commit f3c8f40.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 6 0 0 0.04s
✅ CPP clang-format 239 3 0 0 1.77s
✅ DOCKERFILE hadolint 1 0 0 0.04s
⚠️ MARKDOWN markdownlint 7 4 19 0 1.19s
✅ MARKDOWN markdown-table-formatter 7 4 0 0 0.32s
✅ REPOSITORY git_diff yes no no 0.03s
✅ REPOSITORY grype yes no no 42.59s
✅ REPOSITORY ls-lint yes no no 0.13s
✅ REPOSITORY secretlint yes no no 4.74s
✅ REPOSITORY syft yes no no 1.76s
✅ REPOSITORY trivy yes no no 11.83s
✅ REPOSITORY trivy-sbom yes no no 0.26s
✅ REPOSITORY trufflehog yes no no 5.74s
⚠️ SPELL lychee 86 1 0 4.68s
✅ YAML prettier 10 0 0 0 0.76s
✅ YAML v8r 10 0 0 8.55s
✅ YAML yamllint 10 0 0 0.59s

Detailed Issues

⚠️ SPELL / lychee - 1 error
[404] https://github.com/yourname/amp-cucumber-cpp-runner.git | Network error: Not Found
📝 Summary
---------------------
🔍 Total..........169
✅ Successful.....168
⏳ Timeouts.........0
🔀 Redirected.......0
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........1

Errors in CONTRIBUTING.md
[404] https://github.com/yourname/amp-cucumber-cpp-runner.git | Network error: Not Found
⚠️ MARKDOWN / markdownlint - 19 errors
CHANGELOG.md:31 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:37 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:44 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:51 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:59 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:63 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:72 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:78 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:86 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:90 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:95 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:104 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:115 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
CHANGELOG.md:123 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "⚠ BREAKING CHANGES"]
CHANGELOG.md:127 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Features"]
CHANGELOG.md:152 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Bug Fixes"]
CHANGELOG.md:159 error MD024/no-duplicate-heading Multiple headings with the same content [Context: "Chores"]
cmake/WindowsToolchainFilesProvidedBy.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "<https://github.com/MarkSchofi..."]
README.md:114 error MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.4.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_GIT_DIFF,REPOSITORY_GRYPE,REPOSITORY_LS_LINT,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@daantimmer
Copy link
Copy Markdown
Collaborator

Copilot resolve the cmake configure issues

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

Copilot resolve the cmake configure issues

Fixed in d625ab2. The issue was that re2's install(EXPORT re2Targets ...) references abseil targets, but they weren't in any export set because ABSL_ENABLE_INSTALL was set to Off. Enabling it (same pattern as JSON_Install "On" for nlohmann_json) puts abseil targets in their own export set, which satisfies re2's install rules.

@@ -0,0 +1,36 @@
#include "cucumber_cpp/library/cucumber_expression/Re2RegexStrategy.hpp"
#include <re2/re2.h>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MegaLinter] reported by reviewdog 🐶

Suggested change
#include <re2/re2.h>

#include "cucumber_cpp/library/cucumber_expression/Re2RegexStrategy.hpp"
#include <re2/re2.h>
#include <optional>
#include <stdexcept>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MegaLinter] reported by reviewdog 🐶

Suggested change
#include <stdexcept>
#include <re2/re2.h>
#include <stdexcept>

@@ -0,0 +1,2 @@
// This file has been superseded by StdRegexStrategy.cpp and Re2RegexStrategy.cpp.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MegaLinter] reported by reviewdog 🐶

Suggested change

}
#endif
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MegaLinter] reported by reviewdog 🐶

Suggested change

@sonarqubecloud
Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants