Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Dependencies, go version update, and Makefile fixes #44

Merged
merged 9 commits into from
Dec 15, 2021
Merged

Dependencies, go version update, and Makefile fixes #44

merged 9 commits into from
Dec 15, 2021

Conversation

gbmor
Copy link
Contributor

@gbmor gbmor commented Dec 5, 2021

All of these changes are related to either dependency updates, the go version update 1.13 -> 1.16, or the Makefile (and some of the Makefile changes are related to the go version update).

Updated the dependencies since they were several versions behind.

Makefile was no longer functioning as intended. The default target had been changed to deps, so it would install stuffbin and exit. I added all as the default target to call both deps and build, and fixed the build line in build (it wasn't building anything). I also fixed the deps target to install stuffbin without mangling go.mod (go now lets you use go install url/to/repo@latest to do this). Then cleaned up the remaining targets, so the Makefile is working 100% again.

go.mod still referred to the old repository, so I updated it to have the new path at github.com/hoppscotch/hopp-cli and bumped the minimum go version to 1.16.

Note: The install script linked in README.md still references pwcli so it needs to be updated, but it doesn't live in this repo so I can't update it.

Removed references to deprecated standard library package ioutil in favor of io.ReadAll and os.ReadFile.

Replaced string interpolation with wrapping when bubbling up errors with additional context.

When the deps target was added in November 2020, it became the default
make target. When make was called without arguments, it would install
stuffbin and exit without building hopp-cli.

Added an 'all' target as the default target that installs stuffbin and
builds hopp-cli.

Cleaned up all of the targets.

Changed the deps target to use the idiomatic 'go install' instead of
'go get' to prevent mangling go.mod when installing stuffbin.

Removed the 'update' target as it's redundant re: git pull.
it still mentioned the old pwcli repo.
also updated cli.go 'methods' import statement to reflect this.
ioutil is deprecated.

ioutil.ReadAll() is deprecated in favor of io.ReadAll()
ioutil.ReadFile() is deprecated in favor of os.ReadFile()
@athul
Copy link
Contributor

athul commented Dec 6, 2021

Possibly we'll need to remove the stuffbin deps since go 16x introduced the same functionality in the stdlib. Will push an update as soon as possible.

@athul
Copy link
Contributor

athul commented Dec 6, 2021

A lot of stuff needs to be fixed 😅 . Will push some of the patches in time

@athul athul closed this Dec 8, 2021
@athul athul reopened this Dec 8, 2021
@athul
Copy link
Contributor

athul commented Dec 13, 2021

@gbmor this is good to merge right? I'm planning to merge this as soon as I get a response

@gbmor
Copy link
Contributor Author

gbmor commented Dec 13, 2021

@athul added conditional to only install stuffbin if it's not already installed on 'make' or 'make deps' or 'make all', merged hopp-cli/master back into my branch, looks okay

Copy link
Contributor

@athul athul left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks 🤝

@athul athul merged commit e5f4f91 into hoppscotch:master Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants