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

IPFS plugin separation of concerns #930

Merged
merged 30 commits into from
Jun 27, 2022

Conversation

pileks
Copy link
Contributor

@pileks pileks commented Jun 18, 2022

Partially closes #622 and #714 (IPFS part)

After discussion with @nerfZael the following was done:

Introduced an interface for IPFS-like plugins
Extracted uri-resolver interface implementation from IPFS plugin into its own ipfs-uri-resolver-plugin-js plugin
ipfs-plugin-js now contains only basic IPFS-related functions, with the ipfs-uri-resolver-plugin-js depending on the ipfs-plugin-js.

Introduced a new build command for interfaces that follow the @web3api/*-interface pattern and added it to the main build command - same as #912

Possible circular dependency noticed:
Interfaces require CLI to be built, which results in a CLI -> Plugins -> Interfaces -> CLI circular dependency. Advice on how to proceed is very much appreciated.

Remaining work:

  • Add tests for ipfs-uri-resolver-plugin-js
  • Add tests for ipfs-plugin-js <- I noticed these were missing

@dOrgJelli We commented on moving the resolver plugins into a separate folder - I would like to do this once we finish up the separation of concerns work so that we move all 3 resolver plugins as part of a single PR. Hope that's okay.

Advice/feedback would be much appreciated!

@pileks pileks changed the title Pileks ipfs plugin separation of concerns IPFS plugin separation of concerns Jun 19, 2022
@pileks pileks marked this pull request as ready for review June 21, 2022 09:42
@pileks pileks requested a review from cbrzn June 21, 2022 09:42
@pileks pileks self-assigned this Jun 21, 2022
packages/core-interfaces/ipfs/package.json Outdated Show resolved Hide resolved
packages/js/plugins/ipfs/package.json Outdated Show resolved Hide resolved
packages/core-interfaces/ipfs/.gitignore Outdated Show resolved Hide resolved
packages/core-interfaces/ipfs/polywrap.yaml Outdated Show resolved Hide resolved
packages/js/plugins/ipfs/src/index.ts Outdated Show resolved Hide resolved
packages/js/plugins/ipfs/src/__tests__/e2e.spec.ts Outdated Show resolved Hide resolved
@pileks pileks requested a review from nerfZael June 23, 2022 07:31
Copy link
Contributor

@cbrzn cbrzn left a comment

Choose a reason for hiding this comment

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

Awesome stuff ser 🔥

Feel free to ignore my code styles suggestions :-D

schema: ./src/schema.graphql
import_redirects:
- uri: "ens/uri-resolver.core.polywrap.eth"
schema: ../../../../core-interfaces/uri-resolver/src/query.graphql
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove the query word and rename the file to schema.graphql

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is referenced in multiple PRs right now - If it's okay with you, I'd do this as part of an end-of-PRs "cleanup PR" which would redo some of the folder structure, and change naming. We should also think about building the interface rather than referencing directly from src - something I've done in the FS MR (#912) and this one for their respective interfaces.

nerfZael
nerfZael previously approved these changes Jun 23, 2022
@dOrgJelli dOrgJelli merged commit d501be0 into prealpha-dev Jun 27, 2022
@dOrgJelli dOrgJelli deleted the pileks-ipfs-plugin-separation-of-concerns branch April 10, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants