Steps to reproduce:
- Include static multi-line javascript file that contains a valid
sourceMappingURL comment in a project with `STATICFILES_STORAGE =
'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'`
- Run `python manage.py collectstatic`
- Open the new hashed javascript file and observe the unmodified
sourceMappingURL comment
See updated, failing test case: [https://joseph.is/3CrvpSW].
More than happy to work on a patch provided some guidance on expected
functionality.
--
Ticket URL: <https://code.djangoproject.com/ticket/33237>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Adam Johnson (added)
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted
Comment:
Thanks for the report, it's a bug in a new feature introduced in
e32722d1606794f0a85d74811e53a0336a1ce305 (see #32383).
--
Ticket URL: <https://code.djangoproject.com/ticket/33237#comment:1>
* owner: nobody => Carlton Gibson
* status: new => assigned
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/15056 PR] switching the regex to
multiline mode.
Joseph, if you're able to have a look, that would be great.
--
Ticket URL: <https://code.djangoproject.com/ticket/33237#comment:2>
* cc: gilmrjc (added)
Comment:
Looks like the regression was introduced in
781b44240a06f0c868254f40f36ce46c927f56d1 as part of #32319.
(The multiline flag was removed switching to named groups.)
--
Ticket URL: <https://code.djangoproject.com/ticket/33237#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33237#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"4816dc942860caf076c7c85ea9dbfa8bfab212ff" 4816dc9]:
{{{
#!CommitTicketReference repository=""
revision="4816dc942860caf076c7c85ea9dbfa8bfab212ff"
Fixed #33237 -- Fixed detecting source maps in ManifestStaticFilesStorage
for multiline files.
Switched regex to multiline mode in order to match per-line, rather
than against the whole file.
Thanks to Joseph Abrahams for the report.
Regression in 781b44240a06f0c868254f40f36ce46c927f56d1.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33237#comment:5>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"499384b6d1a0082d538470d57ade37591e9251d6" 499384b]:
{{{
#!CommitTicketReference repository=""
revision="499384b6d1a0082d538470d57ade37591e9251d6"
[4.0.x] Fixed #33237 -- Fixed detecting source maps in
ManifestStaticFilesStorage for multiline files.
Switched regex to multiline mode in order to match per-line, rather
than against the whole file.
Thanks to Joseph Abrahams for the report.
Regression in 781b44240a06f0c868254f40f36ce46c927f56d1.
Backport of 4816dc942860caf076c7c85ea9dbfa8bfab212ff from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33237#comment:6>