-
Notifications
You must be signed in to change notification settings - Fork 94
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
Update dependencies and support darwin-arm64 (Apple M1) #444
Conversation
Tested and (at least) the AppImage works now. There's 1 issue I'm not sure how it came up now. Opening an auction page of any name errors and doesn't load. Issue is from here: bob-wallet/app/utils/nameChecker.js Lines 157 to 166 in ee43daa
hash.update(name); Not sure if it's the same hash as writing to buffer and passing it, but this at least loads the page without problems. |
Can remove |
@rithvikvibhu great work on this, thanks for jumping in. I added a commit that fixes the Buffer problem you found simply by replacing the duplicated code in the util file with the original code form hsd 🤷♂️ I was able to run Bob in both dev mode and
Before I was able to build though I had to manually install |
Lol nice. I don't have a mac to run and test, will try to set up GitHub Actions tomorrow with Of the 4 todo items in your desc, 3 and 4 are done, Can't do 2, you'll have a much better picture. Can do 1 and clean up unused deps (like |
electron-userland/electron-builder#6573
|
@rithvikvibhu I added notes to the README and updated the package.json scripts. I test both dev mode and packaged builds on both Intel and arm64 Macs running nodejs 16, and even did tests with Ledger in all those environments and everything worked! I can test Ubuntu and Windows as well later today. One thing that theoretically should work but isn't super clean yet is building for Intel mac with an arm64 mac. I tried a few different things and always ended up with some kind of error when launching the build. I left those directions in the README anyway and maybe we can revisit that in the future as well. Unfortunately for now this means that we need two different Mac machines to build the arm64 and intel binaries for release. |
✅ tested on Ubuntu 20 dev mode / appimage + ledger |
✅ tested on windows 10 dev mode and production build, nodejs v16 with ledger |
ad95b44
to
ee30155
Compare
Rebased on master - we should be good to go! Could probably use more diverse testing in terms of actions like shakedex and watchlist, but basic functions all seem good. |
Building on darwin arm64 node 16 for me, but not node 17 — seems to be related to nodejs/node-gyp#2534 |
@lukeburns thanks, I think odd-numbered nodejs versions are generally considered unstable? I usually stick to LTS which right now is:
|
Sorry, should've committed before your testing. But these are minor updates to deps and if it works on one system, it should work everywhere - dev and package both work for me on linux.
is down to
And
And one last Q about Sentry above. |
9ea1506
to
5dcf3f6
Compare
This is still a big WIP and a bit of a mess. Our biggest dependencies (webpack/babel/electron) have all gone through several major, breaking updates and so upgrading those packages also requires fixing code.
Goals
npm audit
Notes
npm install --legacy-peer-deps
TODOs:
babel-eslint
,source-map-url
etcBreaking changes addressed in this PR
Webpack 5
Removed Node.js polyfills:
https://webpack.js.org/blog/2020-10-10-webpack-5-release/#automatic-nodejs-polyfills-removed
Browser-compatible modules must be installed separately and there is a plugin for that:
https://github.com/Richienb/node-polyfill-webpack-plugin
--colors
is not an option any more:rails/webpacker#3138
Webpack dev-server
Many config options were migrated, removed, changed:
https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md
Babel
babel/polyfill is deprecated:
https://babeljs.io/docs/en/babel-polyfill
note: building the package still has issues with the ECMAscript modules, this may be the reason, I haven't tried adding
core-js
like the deprecation notice suggestsElectron
Apple Silicon support:
https://www.electronjs.org/blog/apple-silicon/
electron.remote
deprecated and moved to userland (@electron/remote
):electron/electron#21408
https://github.com/electron/remote
note: in general, electron is moving towards a better separation of main and renderer processes, there still maky be issues
better
BrowserWindow
options for security:electron/electron#9920 (comment)
note: like the
remote
thing I think we should strive to include LESS in the renderer. For example, it would be great not to have to packagehsd
AT ALL for the UI layer, and rely on ipc calls even for things like validating addresses in the send modal -- does that have to be done in the browser?Because of the better separation of main and "remote" some things needed to be hacked like the Electron executable path and the Sentry initializer for the renderer process. I could be missing something with my hacks but the errors I was getting looked like it was trying to run Node.js code in the browser... ?
Misc
globalThis
replacesglobal
(I'm not sure if this error was coming from webpack or electron):https://github.com/tc39/proposal-global