-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
Bringing support for Electron 5, 6, 7 & 8 (windows x32 & x64 only) Looking to expand to all other platforms but can't myself. See https://github.com/sass/node-sass/tree/master/.github/Electron-support.md
Added doc to explain steps required for electron support
@glenn2223 thanks for kicking this off!
|
Reverted isSupportedEnvironment back to it's original state and removed the function for detecting current electron support
This comment has been minimized.
This comment has been minimized.
Looks like a good start! There are a few things I'd probably suggest changing, but if you start by adding the file to the PR, it will be easier to comment directly on the file. Here are a few other suggestions:
strategy:
matrix:
electron:
- 5
- 6
- 7
- 8
arch:
- ia32
- x64
....
- name: Run on ${{ matrix.os }}
if: matrix.os != 'macOS-latest'
run:|
./node_modules/.bin/electron-rebuild -v=${{ matrix.electron }} -w node-sass --arch=${{ matrix.arch}}
```
- You can comment out the individual electron version lines to shrink the amount of builds kicked off while you're iterating
- You can take a look at the Alpine PR for an idea of how caching/uploading the binaries might work, but I'd leave that till the end
Hope this helps you iterate one this |
But mor ereading and we can do it without electron-rebuild
Targeted electron versions to stop fails Added artifacts for testing
For electron building
Need to replace electron version with underlying node shown in a comment after each version number
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Added new workflows and updated windows version
Oops
Windows ignorance and plain idiocy
Ensuring it targets the correct architectures
Sure, a script or two may ran fine, but believe me, ABI compatibility problems for C++ components are hard to debug. Microsoft says that 2015, 2017 and 2019 are binary compatible, something they could not guarantee before. But they say one should use the latest "redistributable" runtime library. Will Electron 5,6,7 bring only 2017 runtime library with itself? If yes, we should make build with 2017 to make sure 2019 is not required. |
You're right. When you're right, you're right!
Quick sidebar: When I was running my test I noticed that the install script used node's |
This comment has been minimized.
This comment has been minimized.
I have filed #2868 to work on the general Visual Studio 2019 issue. |
First test with node-gyp 3.8.0
Second test, correction for windows OS
Test 3
Test 4
Ref lines 153-155 from v3.8.0 configure script & my many failed actions // Copied from v3.8.0's configure script //
// GYP doesn't (yet) have support for VS2017, so we force it to VS2015
// to avoid pulling a floating patch that has not landed upstream.
// Ref: https://chromium-review.googlesource.com/#/c/433540/ As you can see my attempts fail and the comments (copied in above) seem to indicate that it shouldn't be overridden. This was my last ditch effort, but failed: setx PATH "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin;%PATH%"
set path="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin;%PATH%" |
I'm OK with this being a CI only setup, there may be some edge cases where local fallback fails, but we can consider this experimental support for v4. |
Me too!!
From saper's comment and reading the linked Microsoft docs, it seems that if we target 5, 6 and 7 with 2019 then we're forcing people who build apps with those electron versions to use a 2019 toolset/VS 2019. This is because those electron builds are compiled with VS 2017 and the binaries require the use of the highest level toolset from any component (To dummy it down, not meaning to be condescending or anything. Do you think it's worth it? *shrug* just in case? Not sure, maybe overkill?
The binary works locally with VSCode (latest) on Windows x64, but you can download the forked VSCode extension and be my guinea pig if you like 😆? |
FWIW I think it makes sense to target this patch for v5. Then only need to support Node 10, 12, 13 |
Don't suppose there's an eta for v5? |
If there's no objects from the team I'm keen to tighten the bolts and ship it asap. Thoughts? (Sorry can't @ on my phone) |
I am against pushing CI-only setup. |
Not related to above Just as a personal learning experience I created a new branch to see how it would work trying to manipulate the build rather than have a CI. Running an electron
Function call // if binding not found =>call
child_process.spawnSync(process.execPath, [Path.resolve("./node_modules/node-sass/scripts/build.js"), `--directory=${Path.resolve("./node_modules/node-sass/")}`], {stdio: 'inherit'}); |
This comment has been minimized.
This comment has been minimized.
@xzyfer not that I'm part of the team, but if there's anything I can do to help nail down v5 then let me know. Do you have a milestone with required tasks for v5? |
@nschonni giving the app a whirl 🤞 @glenn2223 I think we've captured all the breaking changes we're expecting for v5. The last big outstanding change in N-API support but I'd prefer to push that to V6. IMHO I'm happy to cut the release in the next couple days and roll forward with feature updates like this. |
Opened v5 PR, closing |
Bring support for Electron 5-8
Needs contributors to build to full support, currently only Windows x32 & x64, OSX x64 and Linux x64