-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Removing ?pipe=sub
opt-in pattern
#15680
Comments
One consideration is that substitution could be combined with other pipes (e.g. |
cc @jgraham |
See also #16569 where ?pipe=sub was sometimes not used when including referrer-policy-test-case.js |
The "sub" functionality of wptserve's "pipe" feature has previously been identified as a candidate for removal [1]. While it can generally be replaced with a filename-based pattern, the optional argument can only be specified with the query-string-based approach. The file `static-import.js` in the import-maps test suite is the only existing usage of the optional argument. Refactor it to use a Python handler so that a future patch may replace the remaining "pipe"-based usages with filename-based usages. [1] web-platform-tests#15680
@zcorpan: thank you for calling that out. The The
...but he
Then again, the Judging from the current usage in WPT (and if you trust a regexp for this sort of thing), no one needs to use both features simultaneously:
So do you think we need support, e.g. |
Since I recalled it being a problem, I thought I had written at least one such test. But it's possible that it has since been changed so that it no longer needs both. I can't argue with the |
This initially seemed like a case of "you ain't gonna need it," but the more I thought about it, the more I felt like it was just a rough edge waiting to surprise someone. Unless I'm mistaken, the fix is pretty straightforward, so I've submitted gh-18623 to address this. |
The "sub" functionality of wptserve's "pipe" feature has previously been identified as a candidate for removal [1]. While it can generally be replaced with a filename-based pattern, the optional argument can only be specified with the query-string-based approach. The file `static-import.js` in the import-maps test suite is the only existing usage of the optional argument. Refactor it to use a Python handler so that a future patch may replace the remaining "pipe"-based usages with filename-based usages. [1] web-platform-tests#15680
The "sub" functionality of wptserve's "pipe" feature has previously been identified as a candidate for removal [1]. While it can generally be replaced with a filename-based pattern, the optional argument can only be specified with the query-string-based approach. The file `static-import.js` in the import-maps test suite is the only existing usage of the optional argument. Refactor it to use a Python handler so that a future patch may replace the remaining "pipe"-based usages with filename-based usages. [1] #15680
…rce, a=testonly Automatic update from web-platform-tests [import-maps] Re-implement dynamic resource (#18648) The "sub" functionality of wptserve's "pipe" feature has previously been identified as a candidate for removal [1]. While it can generally be replaced with a filename-based pattern, the optional argument can only be specified with the query-string-based approach. The file `static-import.js` in the import-maps test suite is the only existing usage of the optional argument. Refactor it to use a Python handler so that a future patch may replace the remaining "pipe"-based usages with filename-based usages. [1] web-platform-tests/wpt#15680 -- wpt-commits: 287f2dd5e5d1fb42156d37ddf539385cfe54269e wpt-pr: 18648
…rce, a=testonly Automatic update from web-platform-tests [import-maps] Re-implement dynamic resource (#18648) The "sub" functionality of wptserve's "pipe" feature has previously been identified as a candidate for removal [1]. While it can generally be replaced with a filename-based pattern, the optional argument can only be specified with the query-string-based approach. The file `static-import.js` in the import-maps test suite is the only existing usage of the optional argument. Refactor it to use a Python handler so that a future patch may replace the remaining "pipe"-based usages with filename-based usages. [1] web-platform-tests/wpt#15680 -- wpt-commits: 287f2dd5e5d1fb42156d37ddf539385cfe54269e wpt-pr: 18648
…rce, a=testonly Automatic update from web-platform-tests [import-maps] Re-implement dynamic resource (#18648) The "sub" functionality of wptserve's "pipe" feature has previously been identified as a candidate for removal [1]. While it can generally be replaced with a filename-based pattern, the optional argument can only be specified with the query-string-based approach. The file `static-import.js` in the import-maps test suite is the only existing usage of the optional argument. Refactor it to use a Python handler so that a future patch may replace the remaining "pipe"-based usages with filename-based usages. [1] web-platform-tests/wpt#15680 -- wpt-commits: 287f2dd5e5d1fb42156d37ddf539385cfe54269e wpt-pr: 18648 UltraBlame original commit: 61cc669a41be928b94ab1a36e6b6120caa07bffc
…rce, a=testonly Automatic update from web-platform-tests [import-maps] Re-implement dynamic resource (#18648) The "sub" functionality of wptserve's "pipe" feature has previously been identified as a candidate for removal [1]. While it can generally be replaced with a filename-based pattern, the optional argument can only be specified with the query-string-based approach. The file `static-import.js` in the import-maps test suite is the only existing usage of the optional argument. Refactor it to use a Python handler so that a future patch may replace the remaining "pipe"-based usages with filename-based usages. [1] web-platform-tests/wpt#15680 -- wpt-commits: 287f2dd5e5d1fb42156d37ddf539385cfe54269e wpt-pr: 18648 UltraBlame original commit: 61cc669a41be928b94ab1a36e6b6120caa07bffc
…rce, a=testonly Automatic update from web-platform-tests [import-maps] Re-implement dynamic resource (#18648) The "sub" functionality of wptserve's "pipe" feature has previously been identified as a candidate for removal [1]. While it can generally be replaced with a filename-based pattern, the optional argument can only be specified with the query-string-based approach. The file `static-import.js` in the import-maps test suite is the only existing usage of the optional argument. Refactor it to use a Python handler so that a future patch may replace the remaining "pipe"-based usages with filename-based usages. [1] web-platform-tests/wpt#15680 -- wpt-commits: 287f2dd5e5d1fb42156d37ddf539385cfe54269e wpt-pr: 18648 UltraBlame original commit: 61cc669a41be928b94ab1a36e6b6120caa07bffc
The wptserve project provides text substitution functionality under two conditions:
.sub.
appears somewhere in the name of the requested resourceI'd like to remove the former for two reasons.
First, it's difficult to verify statically. Errors of omission have been made, but such mistakes could be avoided with a simple name/content-based heuristic if only the
.sub.
method were available.Second, it adds complexity (which we need to test, document, and expect contributors to understand) without providing value. Comparing the two opt-in mechanisms, the query string is generally more flexible than file name because it gives authors a choice about when/how to enable a feature. However, that flexibility is inappropriate for this feature because files aren't written to work both with and without substitution.
There may be other use cases that I'm not aware of, though. Do any of the infrastructure maintainers know something about that?
The text was updated successfully, but these errors were encountered: