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

Wildcard regex matching for includes #2947

Closed
wants to merge 2 commits into from

Conversation

isobelormiston
Copy link
Contributor

This adds regex-based wildcard matching to the 'include' flag, so that labels can be matched more flexibly.

Unfortunately, this adds a little breaking change as matching on just * will no longer work as before. We could either add a hack to this version so that a single * at the end of the pattern matches like it did before, or we should really wait until the next major release :(

Copy link
Collaborator

@peterebden peterebden left a comment

Choose a reason for hiding this comment

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

I'm afraid this is too slow. This is going to recompile a regex every time this is called, which I think will happen for every label on every target that's built, at least once a run.

@isobelormiston
Copy link
Contributor Author

Oh, that's a shame :(

@isobelormiston isobelormiston deleted the wildcard-regex-matching-for-includes branch November 7, 2023 16:10
@peterebden
Copy link
Collaborator

It's possible we could look at precompiling the regex (I guess it's the thing someone passes as a flag so there won't be many of them). That would help although I'm not certain how much it's worth trying to work through the compatibility issues you note.

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