amphitheatre
amphitheatre copied to clipboard
Refactor amp-resolver
@wangeguo Can you please elaborate on this issue? Is this to use a better design patter or is there a bug that needs to be fixed? (Just interested to know more here 🤔 💭 )
@wangeguo Can you please elaborate on this issue? Is this to use a better design patter or is there a bug that needs to be fixed? (Just interested to know more here 🤔 💭 )
I plan to refactor it, firstly because it only meets the early experiments, it's just a bunch of features and not modular enough, and secondly because more advanced features will be supported soon.
Cool! That sounds like a bigger PR; I'd love to be involved in this.
I see that it's in progress
in the project, could you please suggest a starting point for me to begin working on this :D
@AryanGodara
Yes, it is a big work, and in fact, I myself don't have a clearer and better plan yet. I can probably give a goal at the moment:
- As a core component of AMP, resolver is definitely a separate module from the previous one, and needs a complete engineering plan, module design, and stable interface.
- It needs to provide more test cases and maintain forward compatibility.
- More importantly, it needs to meet future requirements, which may require more references to amp Schema and manifest definitions, such as support for loading dependencies (Partners) from local, network, Character CRDs, etc., and to be ready for future Workspaces (refer to Cargo Workspace).
From my point of view, to do this task well, you need to be very familiar with AMP, it is not just a coding level thing, but a higher level of global planning and design.
At its core, Resolver is essentially a "package manager" parser, like Cargo, NPM, Maven, Go Mod, that assembles flat [partners]
into a directed acyclic graph (DAG) of dependencies, which is consistent with a parser's general properties of a parser.
Here are some references for more information:
- So you want to write a package manager https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527
- https://github.com/topics/dependency-manager
- Cargo.toml https://doc.rust-lang.org/cargo/reference/manifest.html
- package.json https://docs.npmjs.com/cli/v8/configuring-npm/package-json
- The package.json guide https://nodejs.dev/en/learn/the-package-json-guide
- Yarn package.json https://yarnpkg.com/configuration/manifest
- pnpm pakcage.json https://github.com/pnpm/pnpm/blob/main/package.json
- composer.json https://getcomposer.org/doc/04-schema.md
- conanfile.txt https://docs.conan.io/en/latest/reference/conanfile_txt.html
- conanfile.py https://docs.conan.io/en/latest/reference/conanfile.html
- vcpkg.json https://vcpkg.io/en/docs/maintainers/manifest-files.html
- pip https://pip.pypa.io/en/stable/reference/
- conda https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/pkg-specs.html
- go mod https://go.dev/ref/mod
- gopkg.toml https://golang.github.io/dep/docs/Gopkg.toml.html
- build.sbt https://www.scala-sbt.org/1.x/docs/Basic-Def.html
- pom.xml https://maven.apache.org/guides/introduction/introduction-to-the-pom.html
- Ant buildfile https://ant.apache.org/manual/using.html#buildfile
- Skaffold.yaml https://skaffold.dev/docs/references/yaml/
- devspace.yaml https://devspace.sh/docs/configuration/reference
- Tiltfile https://docs.tilt.dev/tiltfile_concepts.html
- OAM https://github.com/oam-dev/spec
- Poetry https://python-poetry.org/docs/dependency-specification/
So, if you want to get involved in this task, it may take some research, and it is not too late to suggest some options or ideas in this Issue, and we'll discuss this task a bit more fully before we do it. Expect some surprises!
@AryanGodara
Yes, it is a big work, and in fact, I myself don't have a clearer and better plan yet. I can probably give a goal at the moment:
- As a core component of AMP, resolver is definitely a separate module from the previous one, and needs a complete engineering plan, module design, and stable interface.
- It needs to provide more test cases and maintain forward compatibility.
- More importantly, it needs to meet future requirements, which may require more references to amp Schema and manifest definitions, such as support for loading dependencies (Partners) from local, network, Character CRDs, etc., and to be ready for future Workspaces (refer to Cargo Workspace).
From my point of view, to do this task well, you need to be very familiar with AMP, it is not just a coding level thing, but a higher level of global planning and design.
At its core, Resolver is essentially a "package manager" parser, like Cargo, NPM, Maven, Go Mod, that assembles flat
[partners]
into a directed acyclic graph (DAG) of dependencies, which is consistent with a parser's general properties of a parser.Here are some references for more information:
- So you want to write a package manager https://medium.com/@sdboyer/so-you-want-to-write-a-package-manager-4ae9c17d9527
- https://github.com/topics/dependency-manager
- Cargo.toml https://doc.rust-lang.org/cargo/reference/manifest.html
- package.json https://docs.npmjs.com/cli/v8/configuring-npm/package-json
- The package.json guide https://nodejs.dev/en/learn/the-package-json-guide
- Yarn package.json https://yarnpkg.com/configuration/manifest
- pnpm pakcage.json https://github.com/pnpm/pnpm/blob/main/package.json
- composer.json https://getcomposer.org/doc/04-schema.md
- conanfile.txt https://docs.conan.io/en/latest/reference/conanfile_txt.html
- conanfile.py https://docs.conan.io/en/latest/reference/conanfile.html
- vcpkg.json https://vcpkg.io/en/docs/maintainers/manifest-files.html
- pip https://pip.pypa.io/en/stable/reference/
- conda https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/pkg-specs.html
- go mod https://go.dev/ref/mod
- gopkg.toml https://golang.github.io/dep/docs/Gopkg.toml.html
- build.sbt https://www.scala-sbt.org/1.x/docs/Basic-Def.html
- pom.xml https://maven.apache.org/guides/introduction/introduction-to-the-pom.html
- Ant buildfile https://ant.apache.org/manual/using.html#buildfile
- Skaffold.yaml https://skaffold.dev/docs/references/yaml/
- devspace.yaml https://devspace.sh/docs/configuration/reference
- Tiltfile https://docs.tilt.dev/tiltfile_concepts.html
- OAM https://github.com/oam-dev/spec
- Poetry https://python-poetry.org/docs/dependency-specification/
So, if you want to get involved in this task, it may take some research, and it is not too late to suggest some options or ideas in this Issue, and we'll discuss this task a bit more fully before we do it. Expect some surprises!
Wow, I'm sorry I completely missed this. I'd been caught up with university exams and job interviews 😅 . This looks like a big issue, and I might not be able to dedicate enough time for few weeks. I'm really sorry for taking your time @wangeguo 🙇🏼
@AryanGodara That's okay, it didn't take me too long, and it helps me make this task even better, so feel free to join in the discussion when you have time!