⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 274481 in webkit


Ignore:
Timestamp:
Mar 16, 2021, 9:05:55 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

[prepare-ChangeLog] Assigning a multiline comment to a variable breaks change detection
​https://bugs.webkit.org/show_bug.cgi?id=223225

Patch by Dean Johnson <​dean_johnson@apple.com> on 2021-03-16
Reviewed by Jonathan Bedard.

  • Scripts/prepare-ChangeLog:

(get_function_line_ranges_for_python): Remove '' prefix from regex so we match multiline
strings assigned to variables.

  • Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt:
  • Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py: Add multiline string

variable definition, which previously would cause prepare-ChangeLog to parse the remainder of the file
as a multiline comment. Also add a new test to ensure it's not skipped by multiline logic.
(Class8.init):
(Class9):

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r274475 r274481  
     12021-03-16  Dean Johnson  <dean_johnson@apple.com>
     2
     3        [prepare-ChangeLog] Assigning a multiline comment to a variable breaks change detection
     4        https://bugs.webkit.org/show_bug.cgi?id=223225
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * Scripts/prepare-ChangeLog:
     9        (get_function_line_ranges_for_python): Remove '^' prefix from regex so we match multiline
     10        strings assigned to variables.
     11        * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt:
     12        * Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py: Add multiline string
     13        variable definition, which previously would cause prepare-ChangeLog to parse the remainder of the file
     14        as a multiline comment. Also add a new test to ensure it's not skipped by multiline logic.
     15        (Class8.__init__):
     16        (Class9):
     17
    1182021-03-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    219
  • trunk/Tools/Scripts/prepare-ChangeLog

    r273651 r274481  
    17991799
    18001800    my $multilineStringLiteralSentinelRegEx = qr#(?:"""|''')#;
    1801     my $multilineStringLiteralStartRegEx = qr#^\s*$multilineStringLiteralSentinelRegEx#;
     1801    my $multilineStringLiteralStartRegEx = qr#\s*$multilineStringLiteralSentinelRegEx#;
    18021802    my $multilineStringLiteralEndRegEx = qr#$multilineStringLiteralSentinelRegEx\s*$#;
    18031803
  • trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt

    r228131 r274481  
    170170    [
    171171      '142',
    172       '143',
     172      '145',
    173173      'Class8.__init__'
     174    ],
     175    [
     176      '151',
     177      '152',
     178      'Class9'
    174179    ],
    175180  ]
  • trunk/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py

    r228131 r274481  
    142142    def __init__(self):
    143143        pass
     144
     145
     146MULTILINE_STRING_VARIABLE = '''
     147some text
     148some more text
     149'''
     150
     151class Class9:
     152    pass
Note: See TracChangeset for help on using the changeset viewer.