Skip to content

refactor: clean up deprecated build tags#1240

Merged
rsdmike merged 1 commit intonextfrom
cleanupBuildTags
Apr 2, 2026
Merged

refactor: clean up deprecated build tags#1240
rsdmike merged 1 commit intonextfrom
cleanupBuildTags

Conversation

@rsdmike
Copy link
Copy Markdown
Member

@rsdmike rsdmike commented Apr 2, 2026

This PR intentionally expands OS support to support discovery in the future.

Copilot AI review requested due to automatic review settings April 2, 2026 17:16
@rsdmike rsdmike changed the title refactor: cleans up build tags refactor: cleans up deprecated build tags Apr 2, 2026
@rsdmike rsdmike changed the title refactor: cleans up deprecated build tags refactor: clean up deprecated build tags Apr 2, 2026
@rsdmike rsdmike enabled auto-merge (rebase) April 2, 2026 17:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors Go build constraints across platform-specific files, primarily removing legacy // +build directives and normalizing some OS selection expressions.

Changes:

  • Removed deprecated // +build ... lines in multiple Windows/Linux-specific files (relying on //go:build ... only).
  • Changed several previously-linux build constraints to !windows (expanding those implementations to all non-Windows OSes).

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/windows/setupapi.go Removes legacy // +build windows directive.
pkg/upid/windows.go Removes legacy // +build windows directive.
pkg/upid/windows_test.go Removes legacy // +build windows directive.
pkg/upid/linux.go Expands build constraint from linux to !windows.
pkg/upid/linux_test.go Removes legacy // +build linux directive.
pkg/network/dhcp_windows.go Removes legacy // +build windows directive.
pkg/network/dhcp_linux.go Removes legacy // +build !windows directive.
pkg/heci/windows.go Removes legacy // +build windows directive.
pkg/heci/windows_test.go Removes legacy // +build windows,amt directive.
pkg/heci/linux.go Expands build constraint from linux to !windows.
pkg/heci/linux_test.go Removes legacy // +build linux,amt directive.
pkg/amt/windows.go Removes legacy // +build windows directive.
pkg/amt/linux.go Expands build constraint from linux to !windows.
Comments suppressed due to low confidence (1)

pkg/upid/linux.go:1

  • The build constraint change from linux to !windows makes this “Linux UPID client” compile on all non-Windows OSes, but the implementation depends on the Linux HECI/MEI driver (/dev/mei0 via heci.NewDriver()). If non-linux platforms aren’t actually supported, this should stay //go:build linux (or provide a !windows && !linux implementation that returns ErrUPIDNotSupported).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rsdmike rsdmike merged commit c2737ad into next Apr 2, 2026
21 checks passed
@rsdmike rsdmike deleted the cleanupBuildTags branch April 2, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants