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

make clean downloads all dependencies #27653

Closed
strk opened this issue Oct 16, 2023 · 6 comments · Fixed by #27689
Closed

make clean downloads all dependencies #27653

strk opened this issue Oct 16, 2023 · 6 comments · Fixed by #27689
Labels

Comments

@strk
Copy link
Member

strk commented Oct 16, 2023

Description

Running make clean downloads all dependencies. I don't think it should hit the net.

Gitea Version

current main branch as of 6c501b1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

not running it

Database

None

@strk strk added the type/bug label Oct 16, 2023
@BaiZe1998
Copy link

can u replicate this and show us the logs

@lng2020
Copy link
Member

lng2020 commented Oct 17, 2023

That seems to be an upstream issue about go clean. Because here we simply use go clean -i ./...
some related discussion(golang/go#32977)

@silverwind
Copy link
Member

There is no clear definition on what a clean shall do, but we do have clean and clean-all, so could maybe move the network stuff to clean-all.

@delvh
Copy link
Member

delvh commented Oct 17, 2023

Why should clean do network stuff?
That's not its task.

@silverwind
Copy link
Member

silverwind commented Oct 17, 2023

Do we actually need this go clean? From go help clean:

Clean removes object files from package source directories.
The go command builds most objects in a temporary directory,
so go clean is mainly concerned with object files left by other
tools or by manual invocations of go build.

If a package argument is given or the -i or -r flag is set,
clean removes the following files from each of the
source directories corresponding to the import paths:

	_obj/            old object directory, left from Makefiles
	_test/           old test directory, left from Makefiles
	_testmain.go     old gotest file, left from Makefiles
	test.out         old test log, left from Makefiles
	build.out        old test log, left from Makefiles
	*.[568ao]        object files, left from Makefiles

	DIR(.exe)        from go build
	DIR.test(.exe)   from go test -c
	MAINFILE(.exe)   from go build MAINFILE.go
	*.so             from SWIG

Maybe it's good for go generate bindata files? But I don't think there is anything else temporary inside the project source dirs and those bindata files could be deleted via rm as well.

techknowlogick added a commit to techknowlogick/gitea that referenced this issue Oct 19, 2023
fix go-gitea#27653

credit to silverwind for finding issue
@techknowlogick
Copy link
Member

Thanks @silverwind, I've created a PR based on your research

lunny pushed a commit that referenced this issue Oct 19, 2023
fix #27653

credit to silverwind for finding issue
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2023
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
fix go-gitea#27653

credit to silverwind for finding issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants