-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix .gitignore files ignore part of the repo. #47212
Conversation
It also occurs to me that (given that this has happened at least three times) this should probably be a build test. Maybe under Static Checks? Let me know if that's desirable and I'll get it in. |
Can't confirm, these files aren't ignored and are committed. I also tried deleting them, committing, and restoring them, and they show up as additions. Can you give us details of your exact environment? Maybe it's broken on Windows or Mac due to case insensitivity? I only tested on Linux as of writing this comment. |
Yeah I'd bet actual money this is a case-insensitive-filesystem deal (I actually meant to write that in and forgot, mea culpa.) The .gitignore lists (thinking this over, this would also make it a lot harder to test in the Static Checks build phase) |
# Don't ignore some graphics. Overrides Godot's global gitignore (specifically the part that filters out code coverage.) | ||
!*.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be solved in the main .gitignore
by making the code coverage ignores absolute.
CC @qarmin, are those always generated in the root folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not always, but depends where user execute specific commands.
I think that only sensible directories in which user may execute generation of html files are root(/) or bin folder(which is hidden by default in git.) - to generate coverage report, Godot binary must be executed.
So changing this records to point to absolute path are fine to me
MachineIndependent/
godot.info
amber.png
emerald.png
glass.png
ruby.png
snow.png
updown.png
gcov.css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would those files show up in the actual root directory, or in a subdirectory? Alternatively, can you give me the magic command needed to generate that coverage report so I can test it? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I cannot test how exactly it works but this are steps how to get coverage report(works only on Linux and 4.0 branch):
sudo apt install gcc gcov lcov clang # Some may be not available
scons p=linuxbsd use_coverage=yes
bin/godot.linuxbsd.tools.64s
lcov --directory ./ --capture --output-file godot.info
genhtml godot.info --ignore-errors source
lcov --zerocounters # To clear results
xdg-open index.html # opens results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it looks like this doesn't function under VirtualBox, which means I can't test it either.
However, looking at the commandline, it looks like you can specify a directory for this stuff to end up in. Maybe we should just ignore an lcov
or coverage
directory, then tell people to put their coverage data in there instead of in the root directory?
That would be overkill IMO, we shouldn't have to test this on every single PR for a somewhat niche use case which wouldn't be broken often. Overreaching |
Ping. Advice requested for what to do with the coverage segment? I'll just make the |
Change made, let me know if you want it changed back or with a different solution. |
7707077
to
296bbd3
Compare
Alright, back to this! In the intervening time, most of the existing issues were fixed at some point . . . replaced with a new set of issues. I've added fixes for those, but I'd like to reiterate that I think this should be part of the precommit tests. For what it's worth, this is important to me because I would like the Godot sourcecode included per-project since I know I'll be making changes to it. I'd like to be able to just copy the latest Godot into a directory and have it work; this bit me for a while when I screwed it up the first time, now it's just a pain point whenever I update. Please let me know if there's a better solution to this. |
thirdparty/.gitignore
Outdated
# Directories caught by the root .gitignore's buildfile list | ||
!embree/common/simd/arm/ | ||
!libpng/arm/ | ||
!libtheora/x64/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don't seem needed anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The x64 one is no longer needed. The arm exclusions are still needed in some form, they're matching .gitignore:250:
[Aa][Rr][Mm]/
I'll move them into the main file and follow the x64 pattern.
misc/dist/.gitignore
Outdated
@@ -0,0 +1,2 @@ | |||
# Directory caught by the dependency .gitignore | |||
!ios_xcode/godot_ios/vulkan/icd.d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just put this in the main .gitignore
with an absolute path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vulkan/icd.d
files can be removed, we use static libs for MoltenVK, so these are useless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to delete 'em if you want; this feels out of my paygrade, if that makes sense, but if it's the right choice I can just do it.
Alright, moved them into the root .gitignore file. For reference, the Linux incantation to find issues like this is:
although for obvious reasons you need to run this before doing a build or you're going to find a lot of ignored files. |
aad1d2d
to
37d6892
Compare
I squashed the commits, moved the ignores to the main |
Thanks! |
Cherry-picked for 3.6. |
Gentle ping to point someone at #78908 to fix these issues once and for all :V |
Cherry-picked for 3.5.3. |
At the moment, if you download the Godot release .zip, decompress it into a new git repo, add the entire contents, clean the git repo, and try to build Godot, the build is broken. Turns out Godot has several critical files (and a few less-critical files) included in its .gitignore.
From my perspective, the most important ones are the entire
modules/mono/editor/GodotTools/GodotTools/Build/
directory, which breaks the Mono build if they don't exist. These are filtered out due to thebuild/
entry. As near as I can tell, that entry is part of the .gitignore template, and Godot does not actually use any directory namedbuild/
. So I just took that line out. This may have been the wrong decision if Godot's build process is markedly different on other operating systems.The second most important ones are a bunch of Vulkan files for various Apple operating systems:
misc/dist/ios_xcode/godot_ios/vulkan/icd.d
misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d
misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d
In all of these cases it's the .d suffix causing problems. I added a .gitignore in misc/dist to cover
icd.d
, mostly because it was easy, but it's possible this should be three separate .gitignore's in the exact relevant directory. Alternatively: does Godot even use the .d extension? If it does, it's probably on Linux, and I don't have a good way to do a Linux build right now. But if it doesn't, that could probably just be removed from the .gitignore.The last was the
updown.png
file in the default theme, removed because it happens to match gcov/lcov code coverage files, change added in 5b4d74e. I just unfiltered all the .png files in that directory. This is the fix I like the least - this really should be filtering out gcov/lcov in some other way, not ignoring a pile of generically-named files throughout the entire repository - but I have no idea what directory names gcov/lcov uses.Obviously I am dissatisfied with these fixes.
On the other hand, now I can build Godot in a fresh Git repo. So . . . it's better, at least.