Redis: errors.Join is undefined (#YG4)

I’m going through the Redis challenge using Go, I’m currently in the 13 stage of the replication part. Tests were running perfectly, but today after pushing new changes, it can’t find a function inside the module “errors”. The module is imported and this code works perfectly on my machine. It works even if I clone the repo from a remote. I would really appreciate any suggestions you might have.

Logs:

[stage-1] $ ./spawn_redis_server.sh
[stage-1] Connecting to port 6379...
[your_program] # github.com/codecrafters-io/redis-starter-go/pkg/client
[your_program] pkg/client/client.go:42:18: undefined: errors.Join

My code:

package client

import (
	"errors"
	"log"
	"net"
)

//...
		if err != nil {
			errs = errors.Join(errs, err) // <-- undefined: errors.Join
		}
//...

It’s also worth noting that my local repository broke recently, I just did a backup, cloned the remote repository, and replaced the files with the files from the backup.

Hey @xunterr,

It looks like your repository was created a while ago, before we upgraded to the latest Go version. errors.Join was introduced in Go 1.20, and your repository is currently running 1.19.

We don’t have an automatic way to upgrade via the app, but I’ve processed the upgrade manually for you so you should be good! We’ll have a more self-serve flow for this available soon :slight_smile:

1 Like

Note to others reading this: If you’re seeing the same error before we ship the upgrade flow, you can either:

  • Create a new repository, that’ll automatically pick the latest version
  • Tag me here and I’ll process a manual upgrade on your account

Thank you for your reply! Running the tests, I now get the following error:

remote: Detected changes to language_pack (old: go-1.22, new: go-1.19).
remote: This isn't supported. If you're trying to upgrade to a new language version, please try creating a new repository.
remote: If you think this is a CodeCrafters bug, please contact us at hello@codecrafters.io.
remote: 
remote: Looks like your codebase failed to build.
remote: If you think this is a CodeCrafters error, please let us know at hello@codecrafters.io.

Ah, sorry forgot to mention - you’ll need to change the value of “language_pack” in codecrafters.yml.

@xunterr could you give this a try, let me know if it works?

Yes, it works. Thank you!

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.

Note: I’ve updated the title of this post to include the stage ID (#YG4). You can learn about the stages rename here: Upcoming change: Stages overhaul