Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Compilation errors on openbsd (1.5.2) #442

Copy link
Copy link

Description

@radeksimko
Issue body actions

Describe the bug

Compilation fails on openbsd.

Snippet from our CI:

# github.com/fsnotify/fsnotify
Error: ../../../go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/kqueue.go:23:6: Watcher redeclared in this block
Error: 	/home/runner/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/fsnotify_unsupported.go:16:6: previous declaration
Error: ../../../go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/kqueue.go:45:6: NewWatcher redeclared in this block
Error: 	/home/runner/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/fsnotify_unsupported.go:19:30: previous declaration
Error: ../../../go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/kqueue.go:68:19: (*Watcher).Close redeclared in this block
Error: 	/home/runner/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/fsnotify_unsupported.go:24:6: previous declaration
Error: ../../../go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/kqueue.go:95:19: (*Watcher).Add redeclared in this block
Error: 	/home/runner/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/fsnotify_unsupported.go:29:6: previous declaration
Error: ../../../go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/kqueue.go:104:19: (*Watcher).Remove redeclared in this block
Error: 	/home/runner/go/pkg/mod/github.com/fsnotify/fsnotify@v1.5.2/fsnotify_unsupported.go:34:6: previous declaration

To Reproduce

GOOS=openbsd GOARCH=amd64 go build
# github.com/fsnotify/fsnotify
./kqueue.go:23:6: Watcher redeclared in this block
	./fsnotify_unsupported.go:16:6: other declaration of Watcher
./kqueue.go:45:6: NewWatcher redeclared in this block
	./fsnotify_unsupported.go:19:6: other declaration of NewWatcher
./kqueue.go:52:3: unknown field 'kq' in struct literal of type Watcher
./kqueue.go:53:3: unknown field 'watches' in struct literal of type Watcher
./kqueue.go:54:3: unknown field 'dirFlags' in struct literal of type Watcher
./kqueue.go:55:3: unknown field 'paths' in struct literal of type Watcher
./kqueue.go:56:3: unknown field 'fileExists' in struct literal of type Watcher
./kqueue.go:68:19: Watcher.Close redeclared in this block
	./fsnotify_unsupported.go:24:19: other declaration of Close
./kqueue.go:95:19: Watcher.Add redeclared in this block
	./fsnotify_unsupported.go:29:19: other declaration of Add
./kqueue.go:104:19: Watcher.Remove redeclared in this block
	./fsnotify_unsupported.go:34:19: other declaration of Remove
./kqueue.go:56:3: too many errors

Expected behavior

fsnotify to compile without errors on openbsd.

Which operating system and version are you using?

Compiling for openbsd using GOOS - reproducible from macOS 12.3.1 and ubuntu-latest in GitHub Actions Linux VM.

Additional context

This came up only with the latest version 1.5.2, 1.5.1 compiled on openbsd without issues.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.