0.2.8-u14.0 • Published 10 months ago

@agoric/same-structure v0.2.8-u14.0

Weekly downloads
1,814
License
Apache-2.0
Repository
github
Last release
10 months ago

Agoric Platform SDK

This repository contains most of the packages that make up the Agoric platform. If you want to build on top of this platform, you don't need this repository: instead you should follow our instructions for getting started with the Agoric SDK.

But if you are improving the platform itself, this is the repository to use.

Prerequisites

  • Git
  • Node.js (version 11 or higher)
  • Yarn (npm install -g yarn)

You don't need Golang if you just want to test contracts and run the "scenario3" simulator. Golang (1.13 or higher) is needed only if you want to build/debug Cosmos SDK support. (The 1.12 release will work, but it will modify packages/cosmic-swingset/go.mod upon each build (by adding a dependency upon appengine). The 1.13 release will leave the go.mod file correctly unmodified.

Any version of Yarn will do: the .yarnrc file should ensure that all commands use the specific checked-in version of Yarn (stored in .yarn/releases/), which we can update later with PRs in conjunction with any necessary compatibility fixes to our package.json files.

Build

From a new checkout of this repository, run:

  • yarn install
  • yarn build

When the yarn install is done, the top-level node_modules/ will contain all the shared dependencies, and each subproject's node_modules/ should contain only the dependencies that are unique to that subproject (e.g. when the version installed at the top level does not meet the subproject's constraints). Our goal is to remove all the unique-to-a-subproject deps.

When one subproject depends upon another, node_modules/ will contain a symlink to the subproject (e.g. ERTP depends upon marshal, so node_modules/@agoric/marshal is a symlink to packages/marshal).

Run yarn workspaces info to get a report on which subprojects (aka "workspaces") depend upon which others. The mismatchedWorkspaceDependencies section tells us when symlinks could not be used (generally because e.g. ERTP wants marshal@0.1.0, but packages/marshal/package.json says it's actually 0.2.0). We want to get rid of all mismatched dependencies.

The yarn build step generates kernel bundles.

Test

To run all unit tests (in all packages):

  • yarn test (from the top-level)

To run the unit tests of just a single package (e.g. eventual-send):

  • cd packages/eventual-send
  • yarn test

Run the larger demo

  • cd packages/cosmic-swingset
  • make scenario2-setup
  • make scenario2-run-chain (in one shell)
  • make scenario2-run-client (in a second shell)

Edit Loop

  • modify something in e.g. SwingSet/
  • run yarn build (at the top level or in SwingSet/)
  • re-run tests or setup/run-chain/run-client
  • repeat

Doing a yarn build in SwingSet creates the "kernel bundle", a single file that rolls up all the kernel sources. This bundle file is needed by callers (like cosmic-swingset) before they can invoke buildVatController. If you don't run yarn build, then changes to the SwingSet kernel code will be ignored.

Development Standards

  • All work should happen on branches. Single-commit branches can land on trunk without a separate merge, but multi-commit branches should have a separate merge commit. The merge commit subject should mention which packages were modified (e.g. (SwingSet,cosmic-swingset) merge 123-fix-persistence)
  • Keep the history tidy. Avoid overlapping branches. Rebase when necessary.
  • All work should have an Issue. All branches names should include the issue number as a prefix (e.g. 123-description). Use "Labels" on the Issues to mark which packages are affected.
  • Add user-visible changes to a new file in the changelogs/ directory, named after the Issue number. See the README in those directories for instructions.
  • Unless the issue spans multiple packages, each branch should only modify a single package.
  • Releases should be made from the package subdirectories, with a tag like SwingSet-v0.3.0 or eventual-send-v0.4.5. Retain mutual compatibility between all packages in the monorepo (run yarn workspaces info and make sure there are no mismatchedWorkspaceDependencies). Do not use post-release -dev.0 suffixes. Merge all the changelogs/* fragment files together and add to the NEWS.md file, then delete the fragments.

Adding a new package

To create a new (empty) package (e.g. spinning Zoe out from ERTP):

  • mkdir packages/zoe
  • add your sources/tests/etc to packages/zoe/src/ etc
  • populate a new packages/zoe/package.json, using other packages as a template
  • edit the top-level package.json to add packages/zoe to "workspaces"
  • run yarn install, and commit the resulting changes to yarn.lock
  • check the output of yarn workspaces info to make sure there are no mismatchedWorkspaceDependencies, adjust the new package's dependencies until they are correctly satisfied by the other local packages
  • edit .github/workflows/test-all-packages.yml to add a clause that tests the new package
  • commit everything to a new branch, push, check the GitHub Actions tab to make sure CI tested everything properly
  • merge with a PR
0.2.8-u14.0

10 months ago

0.2.8-dev-c132a31.0

11 months ago

0.2.8-dev-2c609b8.0

11 months ago

0.2.8-dev-09e90ee.0

11 months ago

0.2.8-dev-99fc025.0

11 months ago

0.2.8-dev-6b07a7b.0

11 months ago

0.2.8-dev-af57c38.0

11 months ago

0.2.8-dev-0769559.0

11 months ago

0.2.8-dev-01baa28.0

11 months ago

0.2.8-dev-1cea34c.0

11 months ago

0.2.8-dev-853cca5.0

11 months ago

0.2.8-dev-e0447b8.0

11 months ago

0.2.8-dev-55a0902.0

11 months ago

0.2.8-dev-046af59.0

11 months ago

0.2.8-dev-305b232.0

11 months ago

0.2.8-dev-f85d35b.0

11 months ago

0.2.8-dev-51f64c2.0

11 months ago

0.2.8-dev-8ef62f4.0

11 months ago

0.2.8-dev-00137a3.0

11 months ago

0.2.8-dev-6e90d96.0

11 months ago

0.2.8-dev-87e4ef4.0

11 months ago

0.2.8-dev-627b56b.0

11 months ago

0.2.8-dev-d48e752.0

12 months ago

0.2.8-dev-df3d0a7.0

12 months ago

0.2.8-dev-73364fa.0

12 months ago

0.2.8-dev-ba2f0d9.0

12 months ago

0.2.8-dev-82d3548.0

12 months ago

0.2.8-dev-8604b01.0

12 months ago

0.2.8-dev-d3ddae6.0

12 months ago

0.2.8-dev-4dcc411.0

12 months ago

0.2.8-dev-780a461.0

12 months ago

0.2.8-dev-05aeff2.0

12 months ago

0.2.8-dev-6466eec.0

12 months ago

0.2.8-dev-75ef233.0

12 months ago

0.2.8-dev-376e47d.0

12 months ago

0.2.8-dev-6388a00.0

12 months ago

0.2.8-dev-8ecb5d7.0

12 months ago

0.2.8-dev-92855b2.0

12 months ago

0.2.8-u13.0

1 year ago

0.2.8-u12.0

1 year ago

0.2.8-u11.0

1 year ago

0.2.8-u11wf.0

1 year ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.31

3 years ago

0.1.29-dev.1

3 years ago

0.1.29-dev.0

3 years ago

0.1.29-dev.2

3 years ago

0.1.29

3 years ago

0.1.28

3 years ago

0.1.27

3 years ago

0.1.26

3 years ago

0.1.25

3 years ago

0.1.24

3 years ago

0.1.23

3 years ago

0.1.22

3 years ago

0.1.21

3 years ago

0.1.20

3 years ago

0.1.19

3 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.14

4 years ago

0.1.15

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.5-dev.0

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2-dev.0

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.12

4 years ago

0.0.12-dev.0

4 years ago

0.0.11

4 years ago

0.0.11-dev.2

4 years ago

0.0.11-dev.1

4 years ago

0.0.11-dev.0

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago