This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
Upgrade Mesh to Go 1.14 #815
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
27c5ade
Made changes necessary for native binaries to build
jalextowle 0b861db
Document go-ethereum dependecy
jalextowle 801215e
Got go tests to pass
jalextowle e14aeb4
Updated geth fork to get some wasm tests to pass
jalextowle 2647b9c
Fixed some build errors and tests
jalextowle 1b6ab9c
Documented the `goleveldb` dependency
jalextowle 16d18ac
Updated goleveldb and go-ws-transport
jalextowle 4ef91cf
All WebAssembly tests are now passing -- with the wrong `wasm_exec.ts`
jalextowle 481e7c4
Update CI and dockerfiles
jalextowle 1d4262a
Fix go linting errors
jalextowle 793e20d
Fix linting in CI
jalextowle a3d560c
Remove vendor step in CI to try to fix linting issues
jalextowle 1d2ad5a
Documented the change in vendoring in CI
jalextowle d32d72a
Updated goleveldb dep after switching to `IsUndefined` and `IsNull`
jalextowle 82514c7
Updated go-ws-transport after switching to `IsUndefined`
jalextowle ead2bc5
Switched to `IsUndefined` and `IsNull`
jalextowle 2f714c5
Updated changelog
jalextowle fb6ba01
Reverted some unnecessary changes
jalextowle 65ba523
Moved `allowJs` into `@0x/mesh-browser-lite`'s `tsconfig.json`
jalextowle 792ac54
Update to typescript `3.9.3`
jalextowle 51ff0b3
Update geth dependency
jalextowle 7b0fc1d
Update `parseTopics` to use the new version from geth
jalextowle 8e1573e
Addressed review feedback from @albrow
jalextowle c6b6d6d
Updated geth again
jalextowle 8ab2fb4
Updated geth another time
jalextowle 0c4102d
Fixed `wasm_exec.js` after rebase
jalextowle 8e1a07d
Changes to deps after rebuilding
jalextowle e9c3669
Updated the contributing guide
jalextowle d295df2
Updated webpack-example dependendencies
jalextowle 01e6515
Fixed small inconsistency in contributing guide
jalextowle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import ( | |
"syscall/js" | ||
"time" | ||
|
||
"github.com/0xProject/0x-mesh/packages/browser/go/jsutil" | ||
log "github.com/sirupsen/logrus" | ||
"github.com/syndtr/goleveldb/leveldb" | ||
"github.com/syndtr/goleveldb/leveldb/storage" | ||
|
@@ -26,7 +27,7 @@ func Open(path string) (*DB, error) { | |
// The global willLoadBrowserFS variable indicates whether browserFS will be | ||
// loaded. browserFS has to be explicitly loaded in by JavaScript (and | ||
// typically Webpack) and can't be loaded here. | ||
if willLoadBrowserFS := js.Global().Get("willLoadBrowserFS"); willLoadBrowserFS != js.Undefined() && willLoadBrowserFS.Bool() == true { | ||
if willLoadBrowserFS := js.Global().Get("willLoadBrowserFS"); !jsutil.IsNullOrUndefined(willLoadBrowserFS) && willLoadBrowserFS.Bool() == true { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @albrow Is there a reason not to check There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We never set it to |
||
return openBrowserFSDB(path) | ||
} | ||
// If browserFS is not going to be loaded, fallback to using an in-memory | ||
|
@@ -60,7 +61,7 @@ func openBrowserFSDB(path string) (*DB, error) { | |
if time.Since(start) >= browserFSLoadTimeout { | ||
return nil, errors.New("timed out waiting for BrowserFS to load") | ||
} | ||
if js.Global().Get("browserFS") != js.Undefined() && js.Global().Get("browserFS") != js.Null() { | ||
if !jsutil.IsNullOrUndefined(js.Global().Get("browserFS")) { | ||
log.Info("BrowserFS finished loading") | ||
break | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a particular reason that we used
goreleaser
at @albrow. I decided to use the script that was provided bygolangci
, but I'm happy to change this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
golangci
team probably just changed their recommendation. This looks fine to me.