You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to ease the dev process of downstream variants of Electron, which add built-in functionality which might be seen as too specific or out-of-scope for upstream... without maintaining patches for Electron code itself. If the idea is accepted in principle, I intend to contribute toward this end.
For example (obviously the names here are negotiable/bikesheddable):
electron/BUILD.gn uses exec_script, which...
If ../electron-spin/BUILD.gn is absent Electron builds exactly as it does now
Otherwise it gains a dependency on //electron-spin:hooks
For each X in a list defined in the script, if ../electron-spin/X.h exists a define is added to Electron
In a few strategic places in the code, #ifdef those defines, call some function whose name is effectively API.
For example, ElectronBrowserClient::WillCreateURLLoaderRequestInterceptors might call CreateSpinRequestInterceptors, but only if ELECTRON_SPIN_INTERCEPTORS is defined, which would happen if ../electron-spin/interceptors.h exists.
I could also use __has_include instead of defines if you prefer to take that part out of the build system, but the exec_script would still be useful to have the dependency if and only if someone did actually add their directory there.
Does this seem like a reasonable approach?
The text was updated successfully, but these errors were encountered:
The idea is to ease the dev process of downstream variants of Electron, which add built-in functionality which might be seen as too specific or out-of-scope for upstream... without maintaining patches for Electron code itself. If the idea is accepted in principle, I intend to contribute toward this end.
For example (obviously the names here are negotiable/bikesheddable):
electron/BUILD.gn uses exec_script, which...
If ../electron-spin/BUILD.gn is absent Electron builds exactly as it does now
Otherwise it gains a dependency on //electron-spin:hooks
In a few strategic places in the code,
#ifdef
those defines, call some function whose name is effectively API.ElectronBrowserClient::WillCreateURLLoaderRequestInterceptors
might callCreateSpinRequestInterceptors
, but only if ELECTRON_SPIN_INTERCEPTORS is defined, which would happen if ../electron-spin/interceptors.h exists.I could also use __has_include instead of defines if you prefer to take that part out of the build system, but the
exec_script
would still be useful to have the dependency if and only if someone did actually add their directory there.Does this seem like a reasonable approach?
The text was updated successfully, but these errors were encountered: