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

Run go generate to generate the latest codecs #46

Merged
merged 1 commit into from
Jul 13, 2021
Merged

Run go generate to generate the latest codecs #46

merged 1 commit into from
Jul 13, 2021

Conversation

masih
Copy link
Member

@masih masih commented Jul 12, 2021

Re-generate code by running go generate to pick up the latest codecs
added to the codec table.

Most notable codec generated here is the CarIndexSorted codec needed in
go-car v2.

See:

Relates to:

Re-generate code by running `go generate` to pick up the latest codecs
added to the codec table.

Most notable codec generated here is the CarIndexSorted codec needed in
go-car v2.

See:
- https://github.com/ipld/go-car
- https://github.com/ipld/go-car/milestone/1
- https://github.com/ipld/go-car/blob/wip-v2/v2/index/index.go

Relates to:
- multiformats/multicodec#220
Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

We should probably add a GitHub Actions workflow that runs go generate and checks that the definitions are up to date (not required for this PR).

@masih
Copy link
Member Author

masih commented Jul 12, 2021

We should probably add a GitHub Actions workflow that runs go generate and checks that the definitions are up to date (not required for this PR).

Thank you for the speedy review. That'd be great 👍 I have captured #47 and #48 already

@masih masih merged commit b421db6 into multiformats:master Jul 13, 2021
@masih masih deleted the gen-latest branch July 13, 2021 08:15
Bencode Code = 0x63 // bencode

// DagPb is tagged "ipld" and described by: MerkleDAG protobuf.
// DagPb is tagged "ipld" and described by: permanent.
Copy link
Contributor

Choose a reason for hiding this comment

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

surely these are all regressions? the old description was better

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 am with you. Maybe something to improve in go generate or the CSV structure?

masih added a commit to ipld/go-car that referenced this pull request Jul 13, 2021
Use the codec dedicated to CAR index sorted when marshalling and
unmarshalling `indexSorted`. Note, the code depends on a specific commit
of `go-multicodec` `master` branch. This needs to be replaced with a tag
once a release is made on the go-multicodec side later.

Unexport index APIs that should not be exposed publicly. Remove
`Builder` now that it is not needed anywhere. Move `insertionIndex` into
`blockstore` package since that's the only place it is used.

Introduce an index constructor that takes multicodec code and
instantiates an index.

Fix ignored errors in `indexsorted.go` during marshalling/unmarshlling.

Rename index constructor functions to use consistent terminology; i.e.
`new` instead if `mk`.

Remove redundant TODOs in code.

Relates to:
- multiformats/go-multicodec#46
mvdan pushed a commit to ipld/go-car that referenced this pull request Jul 16, 2021
Use the codec dedicated to CAR index sorted when marshalling and
unmarshalling `indexSorted`. Note, the code depends on a specific commit
of `go-multicodec` `master` branch. This needs to be replaced with a tag
once a release is made on the go-multicodec side later.

Unexport index APIs that should not be exposed publicly. Remove
`Builder` now that it is not needed anywhere. Move `insertionIndex` into
`blockstore` package since that's the only place it is used.

Introduce an index constructor that takes multicodec code and
instantiates an index.

Fix ignored errors in `indexsorted.go` during marshalling/unmarshlling.

Rename index constructor functions to use consistent terminology; i.e.
`new` instead if `mk`.

Remove redundant TODOs in code.

Relates to:
- multiformats/go-multicodec#46

Address review comments

* Rename constructor of index by codec to a simpler name and update
docs.

* Use multicodec.Code as constant instead of wrappint unit64 every time.
Jorropo pushed a commit to ipfs/boxo that referenced this pull request Mar 22, 2023
Use the codec dedicated to CAR index sorted when marshalling and
unmarshalling `indexSorted`. Note, the code depends on a specific commit
of `go-multicodec` `master` branch. This needs to be replaced with a tag
once a release is made on the go-multicodec side later.

Unexport index APIs that should not be exposed publicly. Remove
`Builder` now that it is not needed anywhere. Move `insertionIndex` into
`blockstore` package since that's the only place it is used.

Introduce an index constructor that takes multicodec code and
instantiates an index.

Fix ignored errors in `indexsorted.go` during marshalling/unmarshlling.

Rename index constructor functions to use consistent terminology; i.e.
`new` instead if `mk`.

Remove redundant TODOs in code.

Relates to:
- multiformats/go-multicodec#46

Address review comments

* Rename constructor of index by codec to a simpler name and update
docs.

* Use multicodec.Code as constant instead of wrappint unit64 every time.


This commit was moved from ipld/go-car@2b593c1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants