-
Notifications
You must be signed in to change notification settings - Fork 207
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
build: move to monrepo #322
build: move to monrepo #322
Conversation
c0d4abb
to
7d17038
Compare
Codecov Report
@@ Coverage Diff @@
## main #322 +/- ##
==========================================
- Coverage 88.32% 86.42% -1.90%
==========================================
Files 239 234 -5
Lines 4796 4803 +7
Branches 615 750 +135
==========================================
- Hits 4236 4151 -85
- Misses 560 652 +92
Continue to review full report at Codecov.
|
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Ready for review! I've coordinated with Ry to get everything set up for automatic releases so if we merge it we should automatically release under the new branch. This PR doesn't introduce a lot of changes in how things works, except for the extraction of platform specific dependencies. Those are now the second parameter to agent.
|
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.
This looks good to me--there's a lot to look through on this, I left a couple of comments, but I may be missing some context behind the thoughts.
Thanks Timo for all of the effort here.
|
||
"compilerOptions": { | ||
"outDir": "./build", | ||
// FIXME https://github.com/hyperledger/aries-framework-javascript/pull/327 |
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.
Available for fixing?
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.
Yes and no. It's really a hassle to not depend on any global node/react-native/browser types. We want types for fetch
and WebSocket
. We can either do that by depending on types for a specific platform, or we should write them ourselves...
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.
Hmmm.. can we rely on global Node types, and then specify/override those in the respective environments? (my knowledge is a little light here so)
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.
I would rather avoid writing our own types, but I understand it's a tricky problem 🙁
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.
That's Awesome 🎉 Great job Timo.
I added just a few insignificant notes :)
"@types/bn.js": "^5.1.0", | ||
"@types/events": "^3.0.0", | ||
"@types/indy-sdk": "^1.16.5", | ||
"@types/node-fetch": "^2.5.10", |
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.
I guess we will eventually remove this from the core, right?
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.
Yes once we resolve the typing issues as described above (declare them ourselves or use some trick to make it work)
packages/core/src/agent/Agent.ts
Outdated
// File system differs based on NodeJS / React Native | ||
this.container.registerInstance(InjectionSymbols.FileSystem, this.agentConfig.fileSystem) | ||
// Platform specific dependencies | ||
this.container.registerInstance(InjectionSymbols.FileSystem, new dependencies.FileSystem()) |
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.
Nitpick: What about creating an instance outside? Then you will have more flexibility to pass params into the constructor or set the instance as you need before passing it into the agent
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.
I'll look at that in a separate PR. That would mean extra steps to get started, even though you won't need in 99% of the cases
We can make it an optional config property?
import type fetch from 'node-fetch' | ||
import type WebSocket from 'ws' |
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.
Maybe you already mention something about thsese two deps. Would it be possible to remove it later? In other words. Just mentioning it in case we forgot it here :)
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.
Yes. But we only depend on the @types packages. Not the actual packages themselves
this.logger.debug('Starting WS outbound transport') | ||
this.WebSocket = agentConfig.agentDependencies.WebSocket |
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 this.WebSocket
could be hard to understand what it means 🤔 like what's actually behind that property. Just saying, don't have any idea for improvement right now. 😄
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.
I've renamed to WebSocketClass
for now. Let me know if you want something else
|
||
"compilerOptions": { | ||
"outDir": "./build", | ||
// FIXME https://github.com/hyperledger/aries-framework-javascript/pull/327 |
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.
I would rather avoid writing our own types, but I understand it's a tricky problem 🙁
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Basically ready to be merged.
Task list:
@aries-framework/core
,@aries-framework/node
&@aries-framework/react-native