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

[Other]: failed to compile openkf,error: "internal/service/mail.go:54:38: string code: has 3 occurrences, make it a constant (goconst)" #212

Closed
jamky opened this issue Nov 23, 2023 · 4 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@jamky
Copy link

jamky commented Nov 23, 2023

What would you like to share?

use the command "make all", occur an error:

===========> Building binary /root/openkf/_output/ *[Git Info]: v1.2.0.13.gf4a5a14.dirty        -f4a5a14a4ce0bdf912a4687fa09f1df20bc37943
[root@VM-90-107-tencentos openkf]# make all
===========> Verifying addlicense is installed
===========> addlicense is install in /root/openkf/_output/tools/addlicense
===========> Adding /root/openkf/scripts/template/LICENSE_TEMPLATES   the boilerplate headers for all files
2023/11/23 16:21:07 /root/openkf/kf_plugins error: lstat /root/openkf/kf_plugins: no such file or directory
===========> End the copyright is added...
===========> Validate boilerplate headers for assign files starting in the /root/openkf directory
2023/11/23 16:21:07 skipping: /root/openkf/server/test/README.md
2023/11/23 16:21:07 skipping: /root/openkf/server/test/config_test.go
2023/11/23 16:21:07 skipping: /root/openkf/server/test/integration_test.go
2023/11/23 16:21:07 skipping: /root/openkf/server/test/log_test.go
2023/11/23 16:21:07 skipping: /root/openkf/server/test/redis_mock.go
2023/11/23 16:21:07 /root/openkf/kf_plugins error: lstat /root/openkf/kf_plugins: no such file or directory
===========> End of boilerplate headers check...
===========> Verifying golangci-lint is installed
===========> golangci-lint is install in /root/openkf/_output/tools/golangci-lint
===========> Run golangci to lint source codes
WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive. 
WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
WARN [runner] The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner.  
WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused. 
internal/service/mail.go:54:38: string `code:` has 3 occurrences, make it a constant (goconst)
        code, err := svc.cache.Get(svc.ctx, "code:"+email)
                                            ^
make: *** [Makefile:265: lint] Error 1

use the command "npm run dev", occur an error:


> [email protected] dev
> vite

sh: line 1: vite: command not found

can provide docker compose for deployment ?

Additional information

No response

@jamky jamky added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Nov 23, 2023
@IRONICBo
Copy link
Collaborator

It looks like a problem with the CI specification.

@cubxxw
Copy link
Contributor

cubxxw commented Nov 23, 2023

For the "make all" command, it looks like there is an error with the addlicense tool and with some of the files in the /root/openkf/kf_plugins directory. One thing you could try is to check if the addlicense tool is installed correctly and if the /root/openkf/kf_plugins directory exists. If not, you may need to reinstall the tool or create the directory.

Note

In OpenKF, the "make all" command includes numerous sub-commands. However, for the purpose of source code deployment, you can directly compile or simply use the "make build" command.

For the "npm run dev" command, it looks like there is an error with the vite tool. One thing you could try is to check if the vite tool is installed correctly and if it is added to your PATH environment variable. If not, you may need to reinstall the tool or add it to your PATH. Additionally, you could try running the command with sudo privileges or as root to see if that resolves the issue.

Regarding your question about a Docker Compose file for deployment, we do have a sample Docker Compose file available in our project repository. You can find it at https://github.com/openimsdk/openkf/tree/main/deploy. Please note that this file may need to be customized to fit your specific deployment needs.

Important

Thank you for your interest in openkf. In the early stages, we may encounter many bugs or areas where the code is not mature. We hope that you can be patient and help improve the code by submitting more PRs and issues for openkf.

@kubbot
Copy link
Member

kubbot commented Jan 23, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@kubbot kubbot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 23, 2024
@kubbot
Copy link
Member

kubbot commented Jan 31, 2024

This issue was closed because it has been stalled for 7 days with no activity.

@kubbot kubbot closed this as completed Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

4 participants