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

Proposal: Exclude generated files from code repository #8

Open
2 tasks
iperdomo opened this issue Jun 10, 2022 · 2 comments
Open
2 tasks

Proposal: Exclude generated files from code repository #8

iperdomo opened this issue Jun 10, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@iperdomo
Copy link
Contributor

Context

The project used Xtend to generate Java source code. Those files under *xtend-gen* folders are almost always modified.
After fresh clone and compilation you get 68 modified files without any other intervention:

git status | grep -E '.*modified:.*xtend-gen*.*\.java$' | wc -l
68

The modifications are a full rewrite of the files, e.g.

git diff kim/org.integratedmodelling.kim/xtend-gen/org/integratedmodelling/kim/validation/KimValidator.java | diffstat
 KimValidator.java | 6180 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------------------------------
 1 file changed, 3090 insertions(+), 3090 deletions(-)

Proposal

Since those are generated files, they shouldn't be tracked and part of the code repository.

  • Remove those files from source code
  • Include xtend-gen folders to .gitignore
@iperdomo iperdomo added the enhancement New feature or request label Jun 10, 2022
@iperdomo iperdomo self-assigned this Jun 10, 2022
@iperdomo
Copy link
Contributor Author

@fvilla feedback, more than welcome.

@fvilla
Copy link
Contributor

fvilla commented Jun 10, 2022

We have intentionally left these - it's clearly bad practice, but we have several users who work from a code installation so that they can pick up updates, do some limited debugging and check out the logs from a closer perspective, report exception stack traces and the like. Unfortunately regenerating the languages whenever the grammar has changed is much above their understanding. Not sure what we should do, but so far it's worked out well this way. When we had the "proper" repository structure it was a constant nightmare telling people how to do that.

iperdomo added a commit that referenced this issue Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants