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

Find in Files doesn't search in .cs files out of the box in Mono build #95496

Closed
alakoring opened this issue Aug 13, 2024 · 8 comments · Fixed by #95502
Closed

Find in Files doesn't search in .cs files out of the box in Mono build #95496

alakoring opened this issue Aug 13, 2024 · 8 comments · Fixed by #95502

Comments

@alakoring
Copy link

Tested versions

Reproducible in 4.3 RC3
Not reproducible in 4.2

System information

Godot v4.3.rc3.mono - macOS 12.7.6 - GLES3 (Compatibility) - Apple M1 Pro - Apple M1 Pro (8 Threads)

Issue description

After I updated to 4.3 RC3, Find in Files no longer returns any results.

Steps to reproduce

Using not-menu-bar, Search > Find in Files (or shift+command+F).
Enter text you can see
Click Find…

Search results are empty and show 0 matches in 0 files.
Screen Shot 28

Minimal reproduction project (MRP)

My sincere apologies, this did work with a new project. It repeatedly fails with my large project (unless I go back to 4.2). So I can’t provide an MRP. I do want to make you aware of the bug, however.

@bruvzg
Copy link
Member

bruvzg commented Aug 13, 2024

Is it text in the cs files? I do not see cs in the filter list, so it's possible that #94680 has not fixed all .NET detection cases (project settings might too early to check for the class type)

@alakoring
Copy link
Author

I found #52789 which seemed to suggest .gdignore was responsible. If I remove this file, Find in Files works as expected.

If I create a brand new project with one Control and one attached GDScript script, I cannot find the text in that script after I create a .gdignore at the top level.

@alakoring
Copy link
Author

This is a mixed GDScript/C# project, so not sure why .cs isn’t showing up as an option. However, I am using Godot to search my .gd files, which is what is failing.

@raulsntos
Copy link
Member

If I create a brand new project with one Control and one attached GDScript script, I cannot find the text in that script after I create a .gdignore at the top level.

That seems to be intentional, directories with a .gdignore file are ignored.

@alakoring
Copy link
Author

Fair enough, I’ll have to see why I wanted to exclude files from res:// (probably to keep ReadMe.txt from cluttering the Godot editor file list), and if there’s a different way to do it.

@akien-mga
Copy link
Member

akien-mga commented Aug 14, 2024

To be clear, .gdignore excludes the whole folder it's in. It's not a pattern-based exclusion list like .gitignore, just the presence of the file (empty) means the folder is excluded.

If you put it in res://, I'd expect the whole project to simply stop working.

@alakoring
Copy link
Author

In fact, everything worked in 4.2 with a top-level .gdignore, and it looked like only Find in Files stopped working in 4.3 RC3. (But I don’t think any of files I didn’t want to see were actually excluded from the file list!) I removed it as that seems to be the intent.

Not sure if I should close the issue though, it does seem odd that none of the .cs files could be searched.

@akien-mga akien-mga changed the title Find in Files no longer works in 4.3 RC3 Find in Files doesn't search in .cs files out of the box in Mono build Aug 14, 2024
@akien-mga
Copy link
Member

Not sure if I should close the issue though, it does seem odd that none of the .cs files could be searched.

I repurposed the issue to keep track of that, which should be fixed when #95502 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants