-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
fix!: remove ipc from default used packages #5978
Conversation
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
Deploying with
|
Latest commit: |
d52cb6e
|
Status: | ✅ Deploy successful! |
Preview URL: | https://496b4513.web3-js-docs.pages.dev |
Branch Preview URL: | https://fix---remove-ipc-from-defaul.web3-js-docs.pages.dev |
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
@spacesailor24 @jdevcs This wont work since loading ipc conditionally in request manager breaks default webpack configuration. Could we convert ipc to plugin and than add support in RequestManager when registering plugin? |
If we follow current plugin architecture, my understanding is, plugin functionality should be on top of existing building blocks of web3 4x lib ( providers, requestmanager, context.. or eth or contracts ) and not modifying core behavior by using core features it self ( else it will be cyclic ) , and IPC is among building blocks of our lib. But another way of decoupling it can be: removing all IPC references from 4.x and releasing it as independent package and doing some refactoring in 4.x.. As long as its in compliance with EIP1193 users should be able to inject it in web3 4x. What will you suggest, about refactoring before full release? or just add webpack guide for users. |
Honestly, I think I need couple of hours to refactor that^^ |
@mpetrunic as @jdevcs mentioned, the only plugin we have successfully implement as of yet adds a layer of functionality ontop of web3.js, but doesn't change it's internals. While I think a plugin like this should be supported, the major difficulty comes from making it type safe In my time of maintaing web3.js, I don't remember anyone coming to us in regards of the ipc provider. So, I think removing it from the standard |
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller
Unchanged
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #5978 +/- ##
==========================================
- Coverage 85.83% 85.82% -0.02%
==========================================
Files 156 156
Lines 7413 7406 -7
Branches 2010 2008 -2
==========================================
- Hits 6363 6356 -7
Misses 1050 1050
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
Changelog needs to be updated |
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
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.
It looks like integration IPC tests always fail.
Actually, those 2 tests are failing for all new MRs. |
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.
Looks great!
I just have one suggestion/question.
Thanks for your contribution.
* fix!: ipc provider no longer installed by default Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> * conditional require Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> * use ipc provider as injected eip1193 provider Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> * fix integration tests Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> * fix integration tests Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> * fuix integration tests Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> * fix cypress config Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> * fix web3 test Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> * update changelog Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> --------- Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
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.
😃
Description
Please include a summary of the changes and be sure to follow our Contribution Guidelines.
Fixes #5977
Type of change
Checklist for 1.x:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
with success.dist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.Checklist for 4.x:
yarn
successfullyyarn lint
successfullyyarn build:web
successfullyyarn test:unit
successfullyyarn test:integration
successfullycompile:contracts
successfullyCHANGELOG.md
file in the packages I have edited.