envoyproxy / envoyproxy/nighthawk

Wrap TCLAP access in RAII container

Open
#259 0 comments 0 reactions 0 assignees View on GitHub
tech-debt
Dominant language
C++
Stars
414
Forks
95
Avg merge
2d 9h
Merged PRs (30d)
11

Description

1. Ensure thread-safe access

2. Cleanly work around the issue where TCLAP assumes it's only run once and stores a global flag, which is a problem when unit tests repeatedly initialize TCLAP. Current workaround:

// This works around an error thrown by TCLAP about multiple unlabeled optional args not being
// allowed. TCLAP has a global flag that detects multiple unlabeled optional args. It assumes
// there will be only one command line in the lifetime of the process. In unit tests we parse
// multiple TCLAP command lines, so we need to reset TCLAP's flag to simulate a fresh process.
TCLAP::OptionalUnlabeledTracker::alreadyOptional() = false;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.