WICG / service-worker-static-routing-api

A repository for the ServiceWorker static routing API.
Other
26 stars 6 forks source link

How an empty condition in the "not" condition should be handled? #22

Closed yoshisatoyanagisawa closed 7 months ago

yoshisatoyanagisawa commented 8 months ago

If "not" condition gets an empty condition, i.e. {}, how should it be handled? I suppose options are:

  1. raise.
  2. treat it as always true.

We used to treat an empty list to "or" condition as always false. However, I suppose it fine to raise. What do others think?

yoshisatoyanagisawa commented 8 months ago

@domenic @azaika I guess you have opinions in this area.

azaika commented 8 months ago

IMO, raising is the good option. The "or" condition allows empty lists because they are naturally considered logical identity, and this does not fits to the "not".

domenic commented 8 months ago

I agree with @azaika

yoshisatoyanagisawa commented 8 months ago

Thank you for sharing your opinions, both. Raising sounds the way to go. However, to gather opinions from others, let me leave the github issue open for several weeks before making the final decision.

yoshisatoyanagisawa commented 8 months ago

Drafted the PR in https://github.com/w3c/ServiceWorker/pull/1711

yoshisatoyanagisawa commented 7 months ago

Two weeks have passed. It might be fine to close this. No contents in the "not" condition is error.

yoshisatoyanagisawa commented 7 months ago

Please feel free to leave comments in the spec PR by the way.