-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Redo autogenerated metadata #6792
Conversation
Build BROKENStarted: 2017-08-10 13:07:29 View more information about this build on: |
Reviewed 2 of 2 files at r1. tools/manifest/sourcefile.py, line 204 at r1 (raw file):
FWIW I would leave tools/manifest/sourcefile.py, line 207 at r1 (raw file):
tools/manifest/sourcefile.py, line 487 at r1 (raw file):
Variables should be formatted with underscores i.e. tools/manifest/sourcefile.py, line 491 at r1 (raw file):
So it seems like this would be clearer by building up a set e.g.
I would also put the first bit into its own method. This does mean that window tests aren't just tools/manifest/sourcefile.py, line 508 at r1 (raw file):
This type of check should be part of the lint. tools/serve/serve.py, line 142 at r1 (raw file):
Again, I would leave these ones working for now. tools/serve/serve.py, line 142 at r1 (raw file):
I'm not really sure that this isn't just adding unnecessary complexity. In particular you end up duplicating a lot of logic here, so if you really want this I would prefer some way to share the logic with `sourcefile.py. Comments from Reviewable |
You also need to update the lint to allow this metadata. At the moment it will fail because this isn't a meta type it knows about. |
I think it would be better to do that as part of this. Having said that, it would be trivial to keep
Okay, in that case I suggest we stick with .any. Shall I name the META variable any too?
With the updates I pushed, do you still think so? (I don't think we should support standalone sharedworker for now btw. There's no demonstrated need. And !window and !worker also don't make sense.)
How is this duplicating logic? This seems like the only place that controls whether something that gets loaded actually ends up making sense. |
Reviewed 1 of 2 files at r2, 2 of 2 files at r3. Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks failed. tools/manifest/sourcefile.py, line 496 at r3 (raw file):
Forgot to mention that you should Comments from Reviewable |
Why would we want to allow whitespace? |
I pushed some proposed changes to https://github.com/w3c/web-platform-tests/tree/meta_global |
I think the main problem is that it requires all tests to be over HTTPS if you want to include a service worker test. As long as HTTPS requires more work to get done I don't think that's a good tradeoff. |
It doesn't require that. |
Build ERROREDStarted: 2018-01-25 13:07:55 Failing Jobs
View more information about this build on: |
What's the status here? |
I want to pick this up again at some point, but I haven't made time recently. If someone else would like to take over to make this happen, be my guest. Whoever picks this up should probably take @jgraham's branch (or the commits there) as a starting point. |
Looks like the commit from is actually included in this PR, so I guess just continuing here would work? |
Yes |
I resolved the conflicts and made sure that @annevk @jgraham is this in a state where careful review is "all" that's needed to get it landed, or was something tricky discovered above that needs fixing first? |
OK, failing lints:
Seems like a regression in what is considered a support file. |
@foolip OP has a list of things that need to be done before this can be merged. |
4b97ac7
to
2aa0ef3
Compare
deef861
to
9e591d8
Compare
@jgraham @gsnedders I think this is ready for another round of reviews |
tools/manifest/sourcefile.py
Outdated
@@ -49,6 +49,86 @@ def read_script_metadata(f, regexp): | |||
yield (m.groups()[0], m.groups()[1]) | |||
|
|||
|
|||
_any_variants = { | |||
b"window": {"default": True, "suffix": ".any.html"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought: maybe we should instead have b"default": {"longhand": {b"window", b"dedicatedworker"}}
, then you could use
// META: global=!default,blah
This looks great, thanks for picking it up. I think this is at least somewhat documented, we should update the documentation before landing. Otherwise my only real feedback is that I prefer the design where default can be used explicitly. Reviewed 5 of 5 files at r7. tools/lint/lint.py, line 653 at r7 (raw file):
I might move this out of the loop. tools/manifest/sourcefile.py, line 53 at r7 (raw file): Previously, Ms2ger wrote…
I like that suggestion better. Comments from Reviewable |
tools/manifest/sourcefile.py
Outdated
globals = get_default_any_variants() | ||
global_values = set(item.strip() for item in value.split(b",")) | ||
|
||
for item in global_values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: check if the iteration order here is significant
tools/manifest/sourcefile.py
Outdated
assert isinstance(value, binary_type), value | ||
|
||
globals = get_default_any_variants() | ||
global_values = set(item.strip() for item in value.split(b",")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There doesn't seem to be a reason to create the set. (Could also do the strip()
call inside the loop).
Reviewed 6 of 6 files at r8. Comments from Reviewable |
…r scopes. This commit is based on ideas and code by Anne van Kesteren and James Graham. The infrastructure is extended to allow tests to opt-in to being run in shared workers and service workers, while the default remains as window and dedicated worker scopes. (This default may be changed in the future.)
ecffddb
to
c964d1c
Compare
…dler.__call__()., a=testonly Automatic update from web-platform-testsDon't wrap HTTPExceptions in FunctionHandler.__call__(). Extracted from web-platform-tests/wpt#6792. -- wpt-commits: 4bf2fa8d17f3165df7b6582754bf00ef277e1180 wpt-pr: 10505
…dler.__call__()., a=testonly Automatic update from web-platform-testsDon't wrap HTTPExceptions in FunctionHandler.__call__(). Extracted from web-platform-tests/wpt#6792. -- wpt-commits: 4bf2fa8d17f3165df7b6582754bf00ef277e1180 wpt-pr: 10505 UltraBlame original commit: 244cbe67350998c363eb78a75fb34fe57d6be32a
…dler.__call__()., a=testonly Automatic update from web-platform-testsDon't wrap HTTPExceptions in FunctionHandler.__call__(). Extracted from web-platform-tests/wpt#6792. -- wpt-commits: 4bf2fa8d17f3165df7b6582754bf00ef277e1180 wpt-pr: 10505 UltraBlame original commit: 244cbe67350998c363eb78a75fb34fe57d6be32a
…dler.__call__()., a=testonly Automatic update from web-platform-testsDon't wrap HTTPExceptions in FunctionHandler.__call__(). Extracted from web-platform-tests/wpt#6792. -- wpt-commits: 4bf2fa8d17f3165df7b6582754bf00ef277e1180 wpt-pr: 10505 UltraBlame original commit: 244cbe67350998c363eb78a75fb34fe57d6be32a
Fixes #4210.
This change is