gtristan commented on PR #2008:
URL: https://github.com/apache/buildstream/pull/2008#issuecomment-2871549220

   > FWIW with the increased complexity, and increased _clarity_ on how the 
regex string works - I would be more happy now to make a well defined `utils` 
function to do the guess work and share that code with the plugin repos.
   
   I have now:
   * Understood the regular expression nature a bit better
     * While it is possible to match *repeating groups* with a '*' wildcard, it 
is impossible to capture an *arbitrary number* of groups
   * I have now created `utils.guess_version()` which reduces the implementer 
load by:
     * Doing the match iteration and preferring the match with the greatest 
amount of captured *groups*
     * Providing a central location to define the API contract for specifying 
`version-guess-pattern`
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to