You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dependency management logic (used by flow dependencies command group) can't be (re)used by external packages at the moment, as it lives in the flow-cli/internal package.
Suggest A Solution
More core logic (dependencyinstaller.go) to a non-internal package (preferably to flowkit repo, as that's where other such logic already lives), so that other packages or projects can reuse it if needed (useful mostly for other devtools).
This is similar to how DeployProject function lives in flowkit, instead of internal/project package.
Context
This would be useful for Flowser, as we want to build a browser-based Flow playground, which would include an emulator and (a subset of) Flow CLI all running within the browser.
Since we can't just "import" the flow-cli/cmd and use it in the browser like so flowCli.RunCommand("flow dependencies add ...") (made up function for illustration), we'll need to re-implement a subset of Flow CLI commands (which would include contract management commands imo) from scratch and hopefully reuse as much of the underlying core logic as possible to ensure consistent behavior and more code reuse.
Issue To Be Solved
Dependency management logic (used by
flow dependencies
command group) can't be (re)used by external packages at the moment, as it lives in theflow-cli/internal
package.Suggest A Solution
More core logic (
dependencyinstaller.go
) to a non-internal package (preferably to flowkit repo, as that's where other such logic already lives), so that other packages or projects can reuse it if needed (useful mostly for other devtools).This is similar to how
DeployProject
function lives in flowkit, instead ofinternal/project
package.Context
This would be useful for Flowser, as we want to build a browser-based Flow playground, which would include an emulator and (a subset of) Flow CLI all running within the browser.
Since we can't just "import" the
flow-cli/cmd
and use it in the browser like soflowCli.RunCommand("flow dependencies add ...")
(made up function for illustration), we'll need to re-implement a subset of Flow CLI commands (which would include contract management commands imo) from scratch and hopefully reuse as much of the underlying core logic as possible to ensure consistent behavior and more code reuse.For more context, see our grant proposal: onflow/developer-grants#260
The text was updated successfully, but these errors were encountered: