licenses_cpp: pre-land changes for perfetto update#182965
licenses_cpp: pre-land changes for perfetto update#182965gaaclarke wants to merge 3 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates several regular expression patterns used for license detection to improve their flexibility and correctness. A key change is a bug fix in catalog.cc to correctly handle optional capturing groups that don't match, preventing a potential crash. A corresponding unit test has been added to validate this fix. Additionally, one unused license pattern file has been removed.
| const char* position = full_match.data(); | ||
| for (int i = 1; i <= num_groups; ++i) { | ||
| std::string_view submatch = submatches[i]; | ||
| if (submatch.data() == nullptr) { |
There was a problem hiding this comment.
I don't think this is necessary for this fix, it's just something i found on accidentally when using a capturing group instead of a non-capturing group.
|
|
||
| END OF TERMS AND CONDITIONS | ||
|
|
||
| APPENDIX: How to apply the Apache License to your work. |
There was a problem hiding this comment.
These appendix on how to apply the license are truncated now.
| Copyright 2021 Google LLC | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. |
There was a problem hiding this comment.
This is weird, somebody edited the appendix on how to apply the license. This is being truncated now.
|
autosubmit label was removed for flutter/flutter/182965, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
This lands necessary changes for the perfetto update that is upcoming from dart.
See also: #182883
fyi @mraleph
Pre-launch Checklist
//github.com/).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.