ChainSafe / ChainSafe/gossamer

Gossamer v0.6.0 is Incorrect on Go Module Proxy Server

Open
#2,138 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
454
Forks
144
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug

- The version of Gossamer that is returned by the Go module proxy server for v0.6.0 does not match what is in GitHub, presumably because the tag was moved due to difficulties with the most recent release process. In particular, it's not possible to import the SCALE package.

## Expected Behavior

- When I include a version of Gossamer in my go.mod file, the version that is returned by the Go module proxy server should match what I see in GitHub.

## Current Behavior

- Despite the fact that Gossamer has the SCALE package in v0.6.0 according to GitHub, this package is not accessible when go mod is used to require Gossamer v0.6.0.

## Possible Solution

- Document this problem and publish a new release. I checked with the Go module team in their Slack channel and these systems are immutable, apparently.

## To Reproduce
Steps to reproduce the behaviour:

1. Use go.mod to require Gossamer v0.6.0
2. Import Gossamer's SCALE package in a main.go file and write some code to exercise its capabilities.
3. Try to compile and/or run the program.

## Log output

### `go.mod`

```go
module test

require github.com/ChainSafe/gossamer v0.6.0

go 1.17
```

### `main.go`

```go
package main

import (
"fmt"

"github.com/ChainSafe/gossamer/pkg/scale"
)

func main() {
// compact length encoded uint
var ui uint = 999
bytes, err := scale.Marshal(ui)
if err != nil {
panic(err)
}

var unmarshaled uint
err = scale.Unmarshal(bytes, &unmarshaled)
if err != nil {
panic(err)
}

// 999
fmt.Printf("%d", unmarshaled)
}
```

Log Output

```
test: go mod tidy
go: finding module for package github.com/ChainSafe/gossamer/pkg/scale
test imports
github.com/ChainSafe/gossamer/pkg/scale: module github.com/ChainSafe/gossamer@latest found (v0.6.0), but does not contain package github.com/ChainSafe/gossamer/pkg/scale
```


Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.