make clean downloads all dependencies #11869

Closed
opened 2025-11-02 09:50:15 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @strk on GitHub (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 6c501b1498

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

Originally created by @strk on GitHub (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 6c501b149809a7015e58d9627e84bfd593702f95 ### 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
GiteaMirror added the type/bug label 2025-11-02 09:50:15 -06:00
Author
Owner

@BaiZe1998 commented on GitHub (Oct 17, 2023):

can u replicate this and show us the logs

@BaiZe1998 commented on GitHub (Oct 17, 2023): can u replicate this and show us the logs
Author
Owner

@lng2020 commented on GitHub (Oct 17, 2023):

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

@lng2020 commented on GitHub (Oct 17, 2023): That seems to be an upstream issue about `go clean`. Because here we simply use `go clean -i ./...` some related discussion(https://github.com/golang/go/issues/32977)
Author
Owner

@silverwind commented on GitHub (Oct 17, 2023):

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.

@silverwind commented on GitHub (Oct 17, 2023): 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`.
Author
Owner

@delvh commented on GitHub (Oct 17, 2023):

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

@delvh commented on GitHub (Oct 17, 2023): Why should `clean` do network stuff? That's not its task.
Author
Owner

@silverwind commented on GitHub (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.

@silverwind commented on GitHub (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.
Author
Owner

@techknowlogick commented on GitHub (Oct 19, 2023):

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

@techknowlogick commented on GitHub (Oct 19, 2023): Thanks @silverwind, I've created a PR based on your research
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11869