-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: improve tooling, include ledger build flag #418
Conversation
Warning Rate limit exceeded@johnletey has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 27 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Co-authored-by: John Letey <john@noble.xyz>
ee034f2
to
b65b66a
Compare
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.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
Makefile (1)
19-20
: LGTM with suggestions for improvement.
While adding the ledger build tag is correct, consider making it more flexible and complete:
- The ledger tag could be made configurable through a variable
- Ledger support typically requires additional build tags for proper functionality
Consider this improvement:
+# Default to ledger support, can be disabled by setting LEDGER_ENABLED=false
+LEDGER_ENABLED ?= true
+
ldflags := $(LDFLAGS)
ldflags += -X github.com/cosmos/cosmos-sdk/version.Name=Noble \
-X github.com/cosmos/cosmos-sdk/version.AppName=nobled \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
- -X github.com/cosmos/cosmos-sdk/version.BuildTags='ledger'
+ -X github.com/cosmos/cosmos-sdk/version.BuildTags=$(if $(filter true,$(LEDGER_ENABLED)),'ledger','')
BUILD_FLAGS := -ldflags '$(ldflags)'
+BUILD_TAGS := $(if $(filter true,$(LEDGER_ENABLED)),ledger,)
+
+BUILD_FLAGS += $(if $(BUILD_TAGS),-tags $(BUILD_TAGS),)
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.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
Makefile
(3 hunks)
🔇 Additional comments (3)
Makefile (3)
6-7
: LGTM: netgo flag added as requested
The addition of the netgo
build tag addresses the previous feedback and will enable static builds.
57-57
: LGTM: Consistent use of BUILD_FLAGS
The build command correctly uses the configured BUILD_FLAGS with all the new tags and ldflags.
8-28
: Enhance ledger support verification
While the gcc detection is more robust now, additional checks might be needed for a complete ledger support verification:
- Required header files (like
usb.h
) - USB library dependencies
- Proper udev rules on Linux systems
Let's verify the current ledger implementation:
Consider adding a make ledger-deps
target that verifies and installs all required dependencies for ledger support.
This PR:
netgo
build flag which helps with static builds of Nobleversion