Skip to content
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

chore(app-shell): Upgrade the Electron version to 21 #11537

Merged
merged 99 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
6a8c032
update the electron version
koji Sep 28, 2022
937772b
updating electron to v20
koji Oct 4, 2022
3b0a6a4
bump node version to 16 in app gh build workflow
shlokamin Oct 4, 2022
4edee4e
update the electron version to v21
koji Oct 5, 2022
3c2799d
sync with edge
koji Oct 5, 2022
37b4f54
update DEV_SETUP
koji Oct 6, 2022
3851764
add patch-package
koji Oct 7, 2022
89d08e0
fix AccessorSignature error in nan
koji Oct 7, 2022
aad418f
add nan modification to patch-package
koji Oct 7, 2022
9acc8dd
fix pakcage.json conflicts
koji Oct 7, 2022
5b6585c
update electron-updater later
koji Oct 7, 2022
4dcb753
remove electron-dl update from this PR
koji Oct 7, 2022
3b02c12
sycn with edge
koji Oct 7, 2022
be96a91
specify node version
koji Oct 7, 2022
3266dfc
update tempy to v1.0.1
koji Oct 7, 2022
c61ce88
Update protocol-storage.test.ts
koji Oct 7, 2022
041010f
Delete fake_timestamp1.json
koji Oct 7, 2022
ffef72b
Update .nvmrc
koji Oct 7, 2022
be3168a
Delete main.json
koji Oct 7, 2022
325a940
Delete 12345.json
koji Oct 7, 2022
837dd63
Delete not_a_number.json
koji Oct 7, 2022
15b3103
Delete fake_timestamp0.json
koji Oct 7, 2022
b243eb2
Delete dist-ot3_log.txt
koji Oct 7, 2022
b391edb
Delete main.py
koji Oct 7, 2022
aa9e778
update node-version from 14 to 16.8.0
koji Oct 10, 2022
d37dbd5
found a typo
koji Oct 11, 2022
7dcb1c5
try to build app-shell with windows-2022
koji Oct 11, 2022
b7a3bad
revert the protocols landing page
koji Oct 11, 2022
bad99af
add CPPFLAGS for ubuntu
koji Oct 12, 2022
cbd1909
remove CPPFLAGS="-std=c++17" since this is wrong
koji Oct 12, 2022
ac7962b
modify build process for ubuntu
koji Oct 12, 2022
daa05a2
fix shell script error
koji Oct 12, 2022
77e093a
remove unnecessary changes
koji Oct 13, 2022
41cafa6
add npm downgrade to avoid yarn v1 workspace error
koji Oct 13, 2022
2a876f7
add npm upgrade to avoid yarn v1 workspace error
koji Oct 13, 2022
2e2b18f
add npm downgrade to avoid yarn v1 workspace error
koji Oct 13, 2022
e171130
check npm version
koji Oct 13, 2022
25bd332
change node-gyp version on node_modules
koji Oct 13, 2022
dbe4b2c
add option to build
koji Oct 13, 2022
0779289
check python version on CI
koji Oct 13, 2022
9ef2be0
change npm version
koji Oct 13, 2022
bf5d093
Merge branch 'edge' into chore_update-electron-to-21
koji Oct 13, 2022
76d4aa9
upgrade npm to v8.19.2
koji Oct 13, 2022
ad53dc5
remove c++ flag since it will break windows build
koji Oct 13, 2022
abadf01
add if statements
koji Oct 14, 2022
1fe5a9e
modify if statements
koji Oct 14, 2022
a86edf8
modify if statements
koji Oct 14, 2022
d24c12e
add if-else to run
koji Oct 14, 2022
19d8add
modify if-else in run
koji Oct 14, 2022
77c99ce
remove npm version check
koji Oct 14, 2022
d78c239
downgrade npm version for build
koji Oct 15, 2022
94f0b14
install gcc on ubuntu
koji Oct 15, 2022
a655eb2
modify if-else in run
koji Oct 15, 2022
cf2c1a6
modify if-else in run
koji Oct 15, 2022
f9419e6
use node v16 without minor version
koji Oct 17, 2022
1769b81
update the node version from 16.8.0 to 16
koji Oct 17, 2022
406b3ca
add ToDo note
koji Oct 17, 2022
ec0fd3c
modify Makefile for CPPFLAGS
koji Oct 18, 2022
dc74e60
fix build errors
koji Oct 18, 2022
2d9819b
update shell in run
koji Oct 18, 2022
722f5ab
modify build part
koji Oct 19, 2022
6cc0589
change electron minor version
koji Oct 19, 2022
d100a09
add install libs for ubuntu
koji Oct 19, 2022
f0b36dc
update makefile
koji Oct 19, 2022
97eb67c
Merge branch 'chore_update-electron-to-21' of https://github.com/Open…
koji Oct 19, 2022
19ffda9
check make version
koji Oct 19, 2022
44b889f
update electron-builder
koji Oct 21, 2022
80ac648
Merge branch 'edge' into chore_update-electron-to-21
koji Oct 22, 2022
3e9b1b0
Merge branch 'chore_update-electron-to-21' of https://github.com/Open…
koji Oct 22, 2022
13dad73
remove lib install
koji Oct 22, 2022
b21524d
update electron version
koji Oct 22, 2022
93a2431
add option to electron-rebuild
koji Oct 22, 2022
2b5078b
add option to electron-rebuild
koji Oct 22, 2022
7c64ea8
add option to electron-rebuild
koji Oct 22, 2022
0ddff98
increase timeout from 30 to 60
koji Oct 22, 2022
64cbf7f
remove if-else from run
koji Oct 22, 2022
af51613
remove electron version
shlokamin Oct 24, 2022
dc1990d
add electron to app-shell package.json
koji Oct 24, 2022
532cdca
move from dependeinces to devDependencies
koji Oct 24, 2022
1e1e2b1
update windows-2019 to windows-2022
koji Oct 24, 2022
41047e2
revert electronVersion to config.js
koji Oct 24, 2022
7966b66
add clean cache command
koji Oct 24, 2022
c96b6b0
update yarn.lock
koji Oct 24, 2022
962a0f6
update makefile
koji Oct 24, 2022
bfc81d4
add electron app-shell devDependencies
koji Oct 25, 2022
5a70730
modify workflow for build
koji Oct 25, 2022
04fdc29
modify workflow for build
koji Oct 25, 2022
c5e4218
update package.json files
koji Oct 25, 2022
98a52b0
update makefile
koji Oct 25, 2022
1b632c9
update package.json and makefile
koji Oct 25, 2022
1804eba
Merge branch 'chore_update-electron-to-21' of https://github.com/Open…
koji Oct 25, 2022
40e0a66
modify makefile
koji Oct 25, 2022
7d9d4e2
sync with edge
koji Oct 25, 2022
5f59748
add electron file ambient type declaration
shlokamin Oct 25, 2022
17f3ed4
format
shlokamin Oct 25, 2022
2544e05
remove rogue char
shlokamin Oct 25, 2022
26da4ba
sync with edge for CI checkes api
koji Oct 25, 2022
00994e8
Merge branch 'chore_update-electron-to-21' of https://github.com/Open…
koji Oct 25, 2022
5ca6fc9
remove --frozen-lockfile option
koji Oct 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/api-test-lint-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand Down Expand Up @@ -93,18 +93,20 @@ jobs:
# to run cross-platform just like builds, might as well do them in the same job
strategy:
matrix:
os: ['windows-2019', 'ubuntu-22.04', 'macos-latest']
os: ['windows-2022', 'ubuntu-22.04', 'macos-latest']
name: 'opentrons app backend unit tests and build'
needs: ['js-unit-test']
runs-on: ${{ matrix.os }}
steps:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: 'downgrade npm version'
run: npm install -g npm@6
- name: 'install libudev'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
Expand Down Expand Up @@ -150,8 +152,14 @@ jobs:
APPLE_ID: ${{ secrets.OT_APP_APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.OT_APP_APPLE_ID_PASSWORD }}
HOST_PYTHON: python
# TODO kj 10/17/2022 this run will be used make -C when all issues are solved.
run: |
make -C app-shell dist-${{ matrix.os }}
if [ '${{ matrix.os}}' == 'ubuntu-22.04']
then
make -C app-shell dist-${{ matrix.os }}
else
CPPFLAGS="-std=c++17" make -C app-shell dist-${{ matrix.os }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can put this in an env block if we want. I'm surprised it's not needed on the other OSs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remind me again why we need to explicitly set the CPP version? i think it was a specific dependency but i can't remember

also, is there path forward to deleting this? i guess this is related to my first question

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is to support node version 16.9 and higher which uses a v8 version that requires c++17 to compile. the path forward is for node-gyp, electron-gyp, etc to update defautls to use c++17 for that node version and higher and for native extension packages (our friend usb-detection) to use those node-gyp/electron-gyp versions; or for those native extension packages to put the flag in their gyp binding files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I have tried to use node v16.8.0 for a while but it causes another node-gyp issue on ubuntu-22.04 and decided to use switched to v16 + CPPFLAGS.

fi

- if: github.event_name != 'pull_request'
name: 'upload github artifact'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/components-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6.1.1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# * The docs source themselves;
# * The CI/makefile tooling used to build the docs.


name: 'API docs build'

on:
Expand Down Expand Up @@ -44,7 +43,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v3'
with:
python-version: '3.7'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/js-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6.1.1
Expand All @@ -70,7 +70,7 @@ jobs:
npm config set cache ${{ github.workspace }}/.npm-cache
yarn config set cache-folder ${{ github.workspace }}/.yarn-cache
make setup-js
# Use the if to run all the lint checks even of some fail
# Use the if to run all the lint checks even of some fail
shell: bash
- name: 'lint js'
if: always() && steps.setup-js.outcome == 'success'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ll-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-server-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pd-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/react-api-client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/robot-server-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/shared-data-test-lint-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v3'
with:
python-version: '3.7'
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
run: sudo apt-get update && sudo apt-get install libudev-dev
- uses: 'actions/setup-node@v1'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- uses: 'actions/setup-python@v4'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/step-generation-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-server-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand All @@ -63,7 +63,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/usb-bridge-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand All @@ -63,7 +63,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '14'
node-version: '16'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
38 changes: 3 additions & 35 deletions DEV_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You will need the following tools installed to develop on the Opentrons platform
- curl
- ssh
- Python v3.7
- Node.js v14
- Node.js v16

### macOS

Expand Down Expand Up @@ -63,7 +63,7 @@ If you haven't used `git` before, **be sure to complete [first-time Git setup][]

Our recommended installation instructions for Node.js differ between `x86_64` (Intel) and `ARM` (M1) Macs.

##### x86-64 Mac (Intel)
##### x86-64 Mac (Intel) & ARM Mac(M1)

On x86, we recommend [nvs][] to install Node.js because it works well and is compatible with macOS, Windows, and Linux.

Expand All @@ -85,7 +85,7 @@ nvs --version
Now we can use nvs to install Node.js v14 and switch on `auto` mode, which will make sure Node.js v14 is used any time we're in the `opentrons` project directory.

```shell
nvs add 14
nvs add 16
nvs auto on
```

Expand All @@ -99,38 +99,6 @@ export NVS_HOME="$HOME/.nvs"
# ...
```

##### ARM Mac (M1)

If you are running an ARM (M1) Mac, you **should not use `nvs` nor `nvm`**, because those tools do not have access to Node.js v14 for the ARM architecture. Until we upgrade to version 16 or higher, you need to use an alternative installation method for Node.js.

Fortunately, you can use `brew` to install an ARM-native version of Node v14.

```shell
brew install node@14
```

Once `brew` finishes installing Node, it will print one additional step to complete the installation to ensure your system selects the proper Node executable to use.

```shell
echo 'export PATH="/opt/homebrew/opt/node@14/bin:$PATH"' >> ~/.zshrc
```

Close and re-open your terminal to confirm that the correct version of Node is installed for the correct architecture.

```shell
node -e "console.log(process.version, process.arch)"
# > v14.19.1 arm64
```

If your `node` command isn't working or is printing the wrong information, confirm that your shell is set up properly. If you print out the contents of `~/.zshrc`, you should see something similar to the following:

```shell
# ~/.zshrc
# ...
export PATH="/opt/homebrew/opt/node@14/bin:$PATH"
# ...
```

#### 2. Install `pyenv` and Python

On macOS, we recommend [pyenv][] to install different versions of Python.
Expand Down
Loading