Skip to content

Build error with Go 1.23.8 on darwin/arm64: "package iter is not in std" in proto/col_arr_go123.go #1066

Description

@MaxXxaM

Environment:

  • Go Version: go1.23.8 darwin/arm64
  • github.com/ClickHouse/ch-go version: v0.66.0 (and later versions pulled as a dependency by github.com/ClickHouse/clickhouse-go/v2@v2.35.0 or @latest)
  • Operating System: macOS (darwin/arm64)

Observed Behavior:
When attempting to build a project that depends on github.com/ClickHouse/clickhouse-go/v2 (which in turn depends on ch-go), the build fails with the following error:

This error occurs because the file proto/col_arr_go123.go within the ch-go module, which is compiled due to the //go:build go1.23 build tag, attempts to import "iter".

File content (proto/col_arr_go123.go in ch-go@v0.66.0):

//go:build go1.23

package proto

import "iter"

// RowRange returns a [iter.Seq] iterator over i-th row.
func (c ColArr[T]) RowRange(i int) iter.Seq[T] {
	var start int
	end := int(c.Offsets[i])
	if i > 0 {
		start = int(c.Offsets[i-1])
	}

	return func(yield func(T) bool) {
		for idx := start; idx < end; idx++ {
			if !yield(c.Data.Row(idx)) {
				return
			}
		}
	}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions