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

Externalize bindata.go to an auto-generated file #77

Closed
thibaultmeyer opened this issue Nov 5, 2016 · 14 comments
Closed

Externalize bindata.go to an auto-generated file #77

thibaultmeyer opened this issue Nov 5, 2016 · 14 comments
Labels
issue/duplicate The issue has already been reported.

Comments

@thibaultmeyer
Copy link
Contributor

I think bindata.go dont have to be committed on repository and must be auto-generated during the make process.

It become a mess when two (or more) Pull Requests update different files (eg : app.ini for the first commit and add new files for the second) because the bindata.go file cause merge error each time.

@strk
Copy link
Member

strk commented Nov 5, 2016

I generally agree on never keeping anything that's not source code into the repository.
What I've understood is that bindata.go is there to allow for "go get" to get you a compiled binary, so basically a workaround to a "go get" limitation. But I don't have further references about this limitation and other possible workarounds.

In all cases, I think it is acceptable to go get ...; less README.md; make;

@strk strk added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Nov 5, 2016
@tboerger
Copy link
Member

tboerger commented Nov 5, 2016

I don't agree on that. There are no other ways to stay go gettable than adding bindata to the repo.

If there are other ways around we can talk about that.

@tboerger
Copy link
Member

tboerger commented Nov 5, 2016

BTW, go get will fail without the bindata because the imports can't be accomplished

@strk
Copy link
Member

strk commented Nov 5, 2016

@tboerger it will fail but will have downloaded all the sources, right ?

@tboerger
Copy link
Member

tboerger commented Nov 5, 2016

But if I go get something I expect to have it working without reading the readme to find out what else needs to be done

@strk
Copy link
Member

strk commented Nov 5, 2016

I'm not a long Go user enough to know what one would have to expect by "go get". I've read it's not a package manager, but I do see it being used as such

@strk
Copy link
Member

strk commented Nov 5, 2016

For the PR mess (conflicts and changelogs size), I shall note that @unkwon used to only update bindata.go before releases, and not accepting those updates in the PRs themselves.

@tboerger
Copy link
Member

tboerger commented Nov 5, 2016

I would suggest an additional commit made by the CI system that updates the bindata.

@tboerger tboerger added this to the 1.x.x milestone Nov 5, 2016
@strk
Copy link
Member

strk commented Nov 5, 2016

If bindata.go has to stay, +1 for the CI system automation (only if it would change).
But I'd really prefer to give-up go-get'ability than keeping generated files in the repo.
How about making bindata.go usage optional, so to retain go-getability while still allowing bindata.go usage upon request ?

@strk
Copy link
Member

strk commented Nov 5, 2016

@tboerger is the optional bindata.go what you'd get with build tags ? (#74 (comment))

@strk
Copy link
Member

strk commented Nov 5, 2016

My take on the optional embedding of files is in this PR: #78
I've understood @tboerger is also working on making embedding optional in his #74, but I think that PR also adds public and templates into the bindata, so maybe it make sense to divide the work in two steps, for easier reviews ?

@strk
Copy link
Member

strk commented Nov 5, 2016

For reference, @tboerger PR about conditional bindata embedding is #30 (came out in gitter chat)

@strk
Copy link
Member

strk commented Nov 5, 2016

So, should this be closed as a duplicate of #30 ?

@tboerger tboerger added issue/duplicate The issue has already been reported. and removed type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Nov 11, 2016
@tboerger tboerger removed this from the 1.x.x milestone Nov 11, 2016
@tboerger
Copy link
Member

Duplicate of #30

lunny pushed a commit to lunny/gitea that referenced this issue Feb 7, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants