Re: webidl: partial interfaces and build-time configuration
On 8/7/17 11:28 AM, Enrico Weigelt, metux IT consult wrote: hmm, then what are the partial interfaces actually for ? They're for use in specifications that want to add things to an existing interface. They're a specification device, basically. I had the impression that distributing (potentially optional) parts of the interface over several files was exactly the usecase behind. There is no implementation usecase for them. We considered not supporting them at all, but decided the value of being able to copy/paste IDL snippets directly from specifications was worth doing a bit of work to add some support for the syntax. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: webidl: partial interfaces and build-time configuration
On 07.08.2017 17:17, Boris Zbarsky wrote: Can I move that stuff to a separate webidl file, which is only added in dom/webidl/moz.build when wakelocks enabled ? (so no #ifdef's in Navigator.webidl needed) If you try to do this, you will get a message from binding codegen that explicitly says this is not supported: TypeError: The binding build system doesn't really support partial interfaces which don't appear in the file in which the interface they are extending is defined. Don't do this. Of course using partial interfaces can make the #ifdef bits simpler in some cases. hmm, then what are the partial interfaces actually for ? I had the impression that distributing (potentially optional) parts of the interface over several files was exactly the usecase behind. --mtx -- Enrico, Sohn von Wilfried, a.d.F. Weigelt, metux IT consulting +49-151-27565287 ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: webidl: partial interfaces and build-time configuration
On 8/6/17 3:56 PM, Enrico Weigelt, metux IT consult wrote: is there a way to use the partial interfaces for build-time configurable features ? Not without #ifdef. Can I move that stuff to a separate webidl file, which is only added in dom/webidl/moz.build when wakelocks enabled ? (so no #ifdef's in Navigator.webidl needed) If you try to do this, you will get a message from binding codegen that explicitly says this is not supported: TypeError: The binding build system doesn't really support partial interfaces which don't appear in the file in which the interface they are extending is defined. Don't do this. Of course using partial interfaces can make the #ifdef bits simpler in some cases. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: webidl: partial interfaces and build-time configuration
On 07.08.2017 10:31, Gabriele Svelto wrote: On 06/08/2017 21:56, Enrico Weigelt, metux IT consult wrote: For example, I'm currently working on making the whole wakelock stuff optional (eg. only built on android). Navigator.webidl references MozWakeLock, which wouldn't exist w/o wakelocks. Do you mean navigator.requestWakeLock()? That's deprecated and should be removed altogether. Okay, added it to my pipeline. Are there more wakelock-related things to be removed ? Anyway, my question is more genric: can we get rid of #ifdef's in *.webidl files by partial interfaces in separate file ? (also affects other things, eg. gamepad) --mtx ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: webidl: partial interfaces and build-time configuration
On 06/08/2017 21:56, Enrico Weigelt, metux IT consult wrote: > For example, I'm currently working on making the whole wakelock > stuff optional (eg. only built on android). Navigator.webidl > references MozWakeLock, which wouldn't exist w/o wakelocks. Do you mean navigator.requestWakeLock()? That's deprecated and should be removed altogether. We already have bug 1369194 [1] for that, I haven't had time to work on it yet so patches are welcome. You can needinfo me for details about which parts of the implementation should also be removed. Gabriele [1] Remove navigator.requestWakeLock() https://bugzilla.mozilla.org/show_bug.cgi?id=1369194 signature.asc Description: OpenPGP digital signature ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
webidl: partial interfaces and build-time configuration
Hi folks, is there a way to use the partial interfaces for build-time configurable features ? For example, I'm currently working on making the whole wakelock stuff optional (eg. only built on android). Navigator.webidl references MozWakeLock, which wouldn't exist w/o wakelocks. Can I move that stuff to a separate webidl file, which is only added in dom/webidl/moz.build when wakelocks enabled ? (so no #ifdef's in Navigator.webidl needed) --mtx ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform