-
Notifications
You must be signed in to change notification settings - Fork 634
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
Refactor Makefile, update build and install targets, and fix Node.js conflict #4847
Conversation
cc: @mikedotexe |
Was the old |
No, I don't think so. There are separate Docker-image-building-related makefile steps that are used by e2e |
Then we are good to merge :) |
build-all: check_version go.sum | ||
mkdir -p $(BUILDDIR)/ | ||
GOWORK=off go build -mod=readonly $(BUILD_FLAGS) -o $(BUILDDIR)/ ./... |
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.
do we have binaries that aren't just osmosisd?
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.
yeah! This was the cause of the issue.
The following binaries get created:
osmosisd
chain
(e2e)
node
(e2e)
querygen
Can we get a changelog entry for the bugfix for node users? |
Added CHANGELOG entry! |
…conflict (backport #4847) (#4890) * Refactor Makefile, update build and install targets, and fix Node.js conflict (#4847) * Update targets in Makefile * Restore go 1.20 * Update CHANGELOG.md (cherry picked from commit 353933a) # Conflicts: # CHANGELOG.md # Makefile * Update CHANGELOG.md * Update Makefile --------- Co-authored-by: Niccolo Raspa <6024049+niccoloraspa@users.noreply.github.com>
Thank you, and thanks Osmosis team! |
Friendly reminder to remove node and reinstall node in order to fix this issue.
Then reinstall your preferred node version. Simply reinstalling node w/o removing the old one did not work on my end. |
Closes: #3125
What is the purpose of the change
This PR refactors the Makefile to simplify the build and install process, as well as address an issue where the
make install
command may cause a conflict with Node.js'snode
command.Now the
make build
(make install
) command builds (installs) only theosmosisd
binary while a new targetmake build-all
builds all the binaries in the repo (chain
,node
,osmosisd
,querygen
).Brief Changelog
The changes include:
GO_MODULE
variable to automatically extract the module path from the go.mod fileGO_MODULE
variable and build theosmosisd
package alonebuild-all
target to build all packages in the current directory and its subdirectories, similar to the original build targetGO_MODULE
variable and install theosmosisd
package alone, avoiding conflicts with Node.js's node commandThese changes make the Makefile more concise, improve maintainability, simplify the build and install process, and resolve the conflict with Node.js's node command.
Testing and Verifying
New
build
target:New
build-all
target:Old
make build
(same as the newmake build-all
) command:Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no