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

Open
@MaxXxaM

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/[email protected] 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 [email protected]):

//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
			}
		}
	}
}

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