Skip to content
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

Fix/texts #11298

Merged
merged 3 commits into from
Oct 27, 2023
Merged

Fix/texts #11298

merged 3 commits into from
Oct 27, 2023

Conversation

criadoperez
Copy link
Contributor

Related Issues

No issue opened

Proposed Changes

Multiple typos on files

@criadoperez criadoperez requested a review from a team as a code owner September 26, 2023 10:35
Copy link
Contributor

@fridrik01 fridrik01 left a comment

Choose a reason for hiding this comment

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

You need to run "make gen" to address the failing CI test

@criadoperez
Copy link
Contributor Author

When I run make gen I get the following error that it can't find goimports. Can you please guide me on the right direction to fix this?

chain/actors/policy/policy.go
itests/kit/ensemble_opts_nv.go
go run ./gen/api
goimports -w api
bash: line 1: goimports: command not found
make: *** [Makefile:308: api-gen] Error 127

So then installed goimports with go install golang.org/x/tools/cmd/goimports@latest but didn't solve the problem.

Then when trying to install goimports with go get I get an error:

# go get -v golang.org/x/tools/cmd/goimports
go: github.com/filecoin-project/filecoin-ffi@v0.30.4-0.20220519234331-bfd1f5f9fe38 (replaced by ./extern/filecoin-ffi): reading extern/filecoin-ffi/go.mod: open /go/filecoin-project_lotus/extern/filecoin-ffi/go.mod: no such file or directory

So finally I built and installed goimports from source which made goimports work but make gen now produces the following error:

go run ./gen/api
goimports -w api
goimports -w api
go run ./gen/main.go
chain/consensus/utils.go:12:2: github.com/filecoin-project/filecoin-ffi@v0.30.4-0.20220519234331-bfd1f5f9fe38 (replaced by ./extern/filecoin-ffi): reading extern/filecoin-ffi/go.mod: open /root/filecoin-project_lotus/extern/filecoin-ffi/go.mod: no such file or directory
chain/vm/fvm.go:21:2: github.com/filecoin-project/filecoin-ffi@v0.30.4-0.20220519234331-bfd1f5f9fe38 (replaced by ./extern/filecoin-ffi): reading extern/filecoin-ffi/go.mod: open /root/filecoin-project_lotus/extern/filecoin-ffi/go.mod: no such file or directory
make: *** [Makefile:288: type-gen] Error 1

@fridrik01
Copy link
Contributor

When I run make gen I get the following error that it can't find goimports. Can you please guide me on the right direction to fix this?

After installing goimports with go install, you need to make sure its install location is in your $PATH. You can run go env and sees where that location is under GOPATH. It should probably be in your HOME directory so usually you would just add $HOME/go/bin to your PATH.

@criadoperez
Copy link
Contributor Author

I had to make some extra steps for it to work, but finally go it. Adding this note here in case it helps anybody else in the future, but it maybe it should be added to the Contribute page.

First, an issue was that this repo has submodules so a standard git clone will give you an error.
Fixed it by using git clone --recurse-submodules when cloning.

Second I had to build the module filecoin-ffi first:

cd extern/filecoin-ffi
make

Note: that requires to install jq first. (apt install jq)

Then a couple of dependencies are required:

apt install libhwloc-dev
apt install ocl-icd-opencl-dev

Finally after all this, make gen works.

@criadoperez
Copy link
Contributor Author

After running make gen no files are modified.
However I then ran make docsgen-cli which did. Committing these changes.

@Stebalien Stebalien merged commit b6a77df into filecoin-project:master Oct 27, 2023
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