Skip to content

Conversation

@merlimat
Copy link
Contributor

@merlimat merlimat commented Feb 8, 2021

Motivation

Remove boost::regex which is the only remaining runtime boost dependency.

Changes

Removed the usage of boost::regex, substituting with std::regex. We only need to use boost::regex with old gcc versions that have buggy implementation of regexes. In particular, this happens with G++ 4.8.2 which is the one used when building manylinux1 Python wheel files.

@merlimat merlimat added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages component/c++ labels Feb 8, 2021
@merlimat merlimat added this to the 2.8.0 milestone Feb 8, 2021
@merlimat merlimat self-assigned this Feb 8, 2021
@jiazhai
Copy link
Member

jiazhai commented Feb 9, 2021

@BewareMyPower Would you please also help review this PR?

Copy link
Contributor

@BewareMyPower BewareMyPower left a comment

Choose a reason for hiding this comment

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

LGTM

@gaoran10
Copy link
Contributor

gaoran10 commented Feb 9, 2021

/pulsarbot run-failure-checks

@merlimat merlimat merged commit 8d0c36e into apache:master Feb 10, 2021
@merlimat merlimat deleted the cpp-boost-regex-cleanup branch February 10, 2021 01:08
merlimat added a commit to merlimat/pulsar that referenced this pull request Apr 6, 2021
* [C++] Removed usages of boost::regex

* Fixed formatting

* Fixed test

* Fixed formatting
sijie pushed a commit that referenced this pull request Jul 19, 2021
### Motivation
#9533 causes some degraded behaviors at [ZTSClient](https://github.com/apache/pulsar/pull/9533/files#diff-41a90a5ec7937b5e2151752843621d6acfe8963077dc04c285842a09a4e45ecc).

1. when using boost::regex
   - can't set `path` at file scheme
2. when using std::regex
   - can't set relative path like `file:./path/to/private.key`

I'd like to fix this issue.

### Modifications

* Use same regex code between boost and std like [this](https://github.com/apache/pulsar/pull/9533/files#diff-a67e917f5f42f3337507a69a4e0f13e286238dc759b4048cb5141290cf445b38)
* Fix regex to be able to capture relative path like `file:./`
Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Jul 22, 2021
### Motivation
apache#9533 causes some degraded behaviors at [ZTSClient](https://github.com/apache/pulsar/pull/9533/files#diff-41a90a5ec7937b5e2151752843621d6acfe8963077dc04c285842a09a4e45ecc).

1. when using boost::regex
   - can't set `path` at file scheme
2. when using std::regex
   - can't set relative path like `file:./path/to/private.key`

I'd like to fix this issue.

### Modifications

* Use same regex code between boost and std like [this](https://github.com/apache/pulsar/pull/9533/files#diff-a67e917f5f42f3337507a69a4e0f13e286238dc759b4048cb5141290cf445b38)
* Fix regex to be able to capture relative path like `file:./`
codelipenghui pushed a commit that referenced this pull request Jul 23, 2021
### Motivation
#9533 causes some degraded behaviors at [ZTSClient](https://github.com/apache/pulsar/pull/9533/files#diff-41a90a5ec7937b5e2151752843621d6acfe8963077dc04c285842a09a4e45ecc).

1. when using boost::regex
   - can't set `path` at file scheme
2. when using std::regex
   - can't set relative path like `file:./path/to/private.key`

I'd like to fix this issue.

### Modifications

* Use same regex code between boost and std like [this](https://github.com/apache/pulsar/pull/9533/files#diff-a67e917f5f42f3337507a69a4e0f13e286238dc759b4048cb5141290cf445b38)
* Fix regex to be able to capture relative path like `file:./`

(cherry picked from commit 7cce8e3)
gaoran10 added a commit to gaoran10/pulsar that referenced this pull request Sep 10, 2021
codelipenghui pushed a commit that referenced this pull request Dec 11, 2021
* [C++] Removed usages of boost::regex

* Fixed formatting

* Fixed test

* Fixed formatting

(cherry picked from commit 8d0c36e)
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Dec 11, 2021
BewareMyPower added a commit that referenced this pull request Dec 11, 2021
BewareMyPower pushed a commit that referenced this pull request Dec 11, 2021
* [C++] Removed usages of boost::regex

* Fixed formatting

* Fixed test

* Fixed formatting
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
### Motivation
apache#9533 causes some degraded behaviors at [ZTSClient](https://github.com/apache/pulsar/pull/9533/files#diff-41a90a5ec7937b5e2151752843621d6acfe8963077dc04c285842a09a4e45ecc).

1. when using boost::regex
   - can't set `path` at file scheme
2. when using std::regex
   - can't set relative path like `file:./path/to/private.key`

I'd like to fix this issue.

### Modifications

* Use same regex code between boost and std like [this](https://github.com/apache/pulsar/pull/9533/files#diff-a67e917f5f42f3337507a69a4e0f13e286238dc759b4048cb5141290cf445b38)
* Fix regex to be able to capture relative path like `file:./`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/branch-2.7 Archived: 2.7 is end of life release/2.7.4 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants