-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Load a Project from a Manifest #1113
Comments
What are the types of thing you would do with the |
We can actually achieve pretty straightforwardly by adding a method to
|
Plugins, like compiler implementations, are driven by config values. For example, you setup remappings there and even compiler versions. Somehow, those needs to be captured and used without the need of |
I am definitely for not making it more complex than it needs to be, probably not the greatest to try to redesign the system if it's not exactly broken (just works differnetly from what I expected) Most important thing is to be able to load a project from a cached manifest on-disk and get contract types from it without having to recompile anything (this is part of the reason why I had the JSON file compiler built into core) |
Overview
I have a package manifest, I would love to be able to load it via
Project.from_manifest(manifest: ethpm.PackageManifest) -> Project
Specification
In the
ape
namespace, there is a class re-import ofProjectManager
calledProject
, so we would add a methodfrom_manifest
that would be able to load from a manifest type.Upon further investigation, it turns out that the internal structure of the project manager isn't set up well to replicate this type of use case. Here is one suggestion for a set of changes to make in order to better support these kinds of use cases:
ProjectType
sub-types (ApeProject
,BrownieProject
, etc.) to parse out a manifest from dependencies (assuming they are not going to change)ProjectManager
to be a superclass ofApeProject
, and add methods for managing an active local project's cached manifestProjectType
with a finalized manifest that the localProjectManager
can work withNOTE: Only
ProjectManager
superclass can mutate it's encapsulated project. Dependencies would recursively build a final manifest for themselves (e.g. dependencies of dependencies would build a finalized manifest including linking extra manifests) so that the local project was working against a final set of dependency filesNOTE: A
ProjectManager
may not actually have any localcontracts/
files to work with, which is okay. ethPM supports this use case of dependency-only manifests (which we can store in local cache, but never deploy)Dependencies
n/a
The text was updated successfully, but these errors were encountered: