Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

feat: add filecoin to dynamic CLI #726

Closed
wants to merge 10 commits into from

Conversation

mikeseese
Copy link
Contributor

This PR is the filecoin-specific changes to support the CLI. This PR is part of #689

src/chains/filecoin/options/src/miner-options.ts Outdated Show resolved Hide resolved
@@ -55,6 +55,7 @@
"@ganache/colors": "^0.1.0",
"@ganache/ethereum": "0.1.0",
"@ganache/ethereum-options": "0.1.0",
"@ganache/filecoin": "0.1.0",
Copy link
Member

Choose a reason for hiding this comment

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

Since we don't want filecoin shipping with cli (and ganache) I think this should be a peerDependency, and the version should probably be "^0.1.0". This gets into the "fancy downloader" convo, so maybe it's time we have that.

Perhaps we should add the download into @ganache/core's connector-loader.ts? I figure @ganache/core would also need to detect that a flavor is valid but not installed; of course, when used programmatically it wouldn't provide an interactive installation, but it could still perform the same error logic.

Now that I've typed all that... for now we could just show a helpful error message if the flavor dependency isn't already installed. e.g., 'The "filecoin" flavor of ganache is not installed. Install it by running npm install @ganache/filecoin' (obviously it's a little more complex if we want to determine global installation, package manager used, etc)

image

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 gets into the "fancy downloader" convo, so maybe it's time we have that.

Because of this, I'm favoring that we leave this as is until we're actually considering merging this into develop. That way I can continue working without any fancy stuff. We can determine the delivery mechanism and how I need to support that later. I don't think we should work any of this part until we're closer to merging this into develop (probably early March)

and the version should probably be "^0.1.0"

When should versions be pinned and when shouldn't they be? This just did whatever the default lerna add behavior was, but I am trying to pin everything new I add due to the contribution guidelines

Copy link
Contributor Author

@mikeseese mikeseese Jan 23, 2021

Choose a reason for hiding this comment

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

FYI I went ahead and added initial support for this as it's necessary for some of my future PRs to be acceptable for you (otherwise I'd have to turn off all tests with node versions less than 12 rather than just filecoin tests)

I added the logic in @ganache/flavors. I initially was thinking of putting it in connector-loader.ts like you, but something felt better about putting it in flavors. We can definitely discuss more whenever we review that work

src/chains/filecoin/filecoin/src/provider.ts Outdated Show resolved Hide resolved
src/packages/core/src/options/server-options.ts Outdated Show resolved Hide resolved
src/packages/core/src/servers/http-server.ts Outdated Show resolved Hide resolved
src/packages/core/src/servers/ws-server.ts Outdated Show resolved Hide resolved
@@ -43,6 +43,8 @@
"dependencies": {
"@ganache/ethereum": "^0.1.0",
"@ganache/ethereum-options": "0.1.0",
"@ganache/filecoin": "0.1.0",
Copy link
Member

Choose a reason for hiding this comment

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

This should also probably be a miner-semver peerDependency here as well (tezos technically needs to be moved as well)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can move tezos on develop if you'd like. My response from #726 (comment) applies here too

src/packages/options/src/create.ts Outdated Show resolved Hide resolved
mikeseese and others added 3 commits January 20, 2021 13:17
…oin-to-dynamic-cli' of github.com:trufflesuite/ganache-core into feat/add-filecoin-to-dynamic-cli
@mikeseese
Copy link
Contributor Author

We're postponing these reviews until later

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants