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

chore(pact-project-proposal): initial proposal #1686

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alber70g
Copy link
Member

@alber70g alber70g commented Feb 20, 2024


Copy link

changeset-bot bot commented Feb 20, 2024

⚠️ No Changeset found

Latest commit: a70a03f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Feb 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
alpha-docs ✅ Ready (Inspect) Visit Preview Feb 20, 2024 4:01pm
proof-of-us ✅ Ready (Inspect) Visit Preview Feb 20, 2024 4:01pm
react-ui ✅ Ready (Inspect) Visit Preview Feb 20, 2024 4:01pm
tools ✅ Ready (Inspect) Visit Preview Feb 20, 2024 4:01pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs-storybook ⬜️ Ignored (Inspect) Feb 20, 2024 4:01pm

dependencies (recursively through `dependencies`)
- `path`: the path to the contract that needs to be available for the
depending project to work
- `dependencies`: a list of object that define this contracts' dependencies.
Copy link
Member

Choose a reason for hiding this comment

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

So this makes sense, but we need to tease out some structure here:

  1. What does it mean to be a unit of distribution, as in, what is considered a singular, self-contained unit that can be delivered via its source code and deployed on the blockchain in an automatic fashion? I think this is a good start. You'll also probably want to include the install script (tx.yaml or smth) as a field in this distribution. I imagine deploy would only understand how to upload and deploy to a network if that were present.
  2. What does it mean to be a project, distinct from a unit of distribution? I would deploy a unit of distribution, but what would i build upon? A project, to me, should contain the following:
    • A list of dependencies, and a specification for where they're being stored, whether we have a default location local to the project, or user-specified.
    • A distinction between source and test directories, and tools to test that i could compose with deployment to build a CI/CD pipeline.
    • directories I could specify to dump FV or coverage artifacts

Together, i think 1 and 2 would be enough of a start to talk about a fully fledged "Pact Project" .

HTH

"description": "Chainweb Pact Project",
"source": "[email protected]:kadena-io/chainweb-pact.git",
"dependencies": [
"[email protected]:other-user/my-other-dependency.git"
Copy link
Member

Choose a reason for hiding this comment

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

I like the idea of content address-ability here. We should figure out how to reference contract hashes directly with some nice syntax. Having github support would be killer to mix with that.

Copy link
Member

Choose a reason for hiding this comment

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

Another thought a day later: supporting commit hashes, as opposed to git repos would be preferable.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like this to be similar to how NPM allows to use dependencies. This includes various ways of specifying versions, git urls, github urls (kadena-community/a-repo#commit-sh) etc

https://docs.npmjs.com/cli/v10/configuring-npm/package-json#dependencies

Copy link
Member

Choose a reason for hiding this comment

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

That's fine by me, but we should specify the variations in syntax that we plan to support beforehand.

"dependencies": [
{
"path": "./some-other-contract.pact"
}
Copy link
Member

Choose a reason for hiding this comment

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

hash or checksum would be nice to include here.

Copy link
Contributor

This PR is stale because it is open for 60 days with no activity

Copy link
Contributor

github-actions bot commented Nov 4, 2024

This PR is stale because it is open for 60 days with no activity

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

Successfully merging this pull request may close these issues.

3 participants