-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: remove obsolete // +build tag #13440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the PR title to match https://github.com/filecoin-project/lotus/blob/master/CONTRIBUTING.md#pr-title-conventions
PR title now matches the required format.
Modified~ |
|
Nice, thanks, but if you wouldn't mind running |
@rvagg Thank you for your suggestions. I have reviewed, revised, and resubmitted. I have confirmed that there are no similar examples.
|
There was a problem hiding this 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 modernizes the codebase by removing deprecated // +build build constraint syntax in favor of the modern //go:build directive introduced in Go 1.17. The changes are purely cosmetic cleanup with no functional impact.
Key Changes:
- Removed obsolete
// +buildtags from 24 files across the codebase - Retained modern
//go:builddirectives that are semantically equivalent to the removed tags
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| storage/sealer/fsutil/statfs_unix.go | Removed // +build !windows tag |
| storage/sealer/fsutil/filesize_unix.go | Removed // +build !windows tag |
| storage/sealer/fsutil/dealloc_other.go | Removed // +build !linux tag |
| lib/ulimit/ulimit_unix.go | Removed // +build darwin linux netbsd openbsd tag |
| lib/ulimit/ulimit_test.go | Removed // +build !windows tag |
| lib/ulimit/ulimit_freebsd.go | Removed // +build freebsd tag |
| chain/types/message_fuzz.go | Removed // +build gofuzz tag |
| build/tools.go | Removed // +build tools tag |
| build/builtin_actors_gen_test.go | Removed // +build release tag |
| build/buildconstants/params_testground_test.go | Removed // +build testground tag |
| build/buildconstants/params_testground.go | Removed // +build testground tag |
| build/buildconstants/params_shared_vals.go | Removed // +build !testground tag |
| build/buildconstants/params_mainnet_test.go | Removed // +build !debug,!2k,!testground,!calibnet,!butterflynet,!interopnet tag |
| build/buildconstants/params_mainnet.go | Removed // +build !debug,!2k,!testground,!calibnet,!butterflynet,!interopnet tag |
| build/buildconstants/params_interop_test.go | Removed // +build interopnet tag |
| build/buildconstants/params_interop.go | Removed // +build interopnet tag |
| build/buildconstants/params_debug.go | Removed // +build debug tag |
| build/buildconstants/params_calibnet_test.go | Removed // +build calibnet tag |
| build/buildconstants/params_calibnet.go | Removed // +build calibnet tag |
| build/buildconstants/params_butterfly_test.go | Removed // +build butterflynet tag |
| build/buildconstants/params_butterfly.go | Removed // +build butterflynet tag |
| build/buildconstants/params_2k_test.go | Removed // +build debug 2k tag |
| build/buildconstants/params_2k.go | Removed // +build debug 2k tag |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
By my reckoning these are still missing @zjumathcode: |
Signed-off-by: zjumathcode <[email protected]>
@rvagg Oh, indeed. I checked and found the reason: it's because the + has a special meaning in regular expressions. I should use Modified. Thank you very much for your guidance. |
|
Excellent, thanks |

Related Issues
Proposed Changes
From Go 1.17, the preferred syntax for build constraints is
//go:build,which replaces the old
// +buildform. The old style is now considereddeprecated but still supported for backward compatibility.
This change removes the obsolete
// +build xxxline, keeping only themodern
//go:build xxxdirective.More info: golang/go#41184 and https://go.dev/doc/go1.17#build-lines
Design Doc / Proposal:
https://go.dev/design/draft-gobuild
Additional Info
Checklist
Before you mark the PR ready for review, please make sure that: