Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix escaping to patch directories that contain the word external #284

Merged
merged 2 commits into from
Apr 12, 2022

Conversation

BalestraPatrick
Copy link
Contributor

@BalestraPatrick BalestraPatrick commented Apr 11, 2022

Follow-up to #279.

I ran into a case where if you have a directory that contains the word external, it that wasn't being patched correctly, thus failing the compilation.

This PR fixes it and only excludes headers in directories that start with exactly /bazel-out/ or /external/ but not directories that contain /toolexternal/ or /externaltool/, or have /bazel-out/ or /external/ later in the path.

BalestraPatrick and others added 2 commits April 12, 2022 01:50
All of these will no longer get a `SRCROOT` path:

```
header "../../external/bob.h"
header "../external/bob.h"
header "external/bob.h"
header "../../bazel-out/bob.h"
header "../bazel-out/bob.h"
header "bazel-out/bob.h"
header "bazel-out/external/bob.h"
header "../bazel-out/external/bob.h"
header "../external/bazel-out/bob.h"
```

but these still will:
```
header "../../bob/external/bob.h"
header "../../bobexternal/bob.h"
header "../../bob.h"
header "bob/external/bob.h"
header "../../bob/bazel-out/bob.h"
header "../../bobbazel-out/bob.h"
header "bob/bazel-out/bob.h"
```

https://regex101.com/r/Bd35j5/1
@brentleyjones brentleyjones merged commit 5fc63d9 into main Apr 12, 2022
@brentleyjones brentleyjones deleted the pb/fix-escaping branch April 12, 2022 12:11
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