Do you have a favorite way of doing a project-wide...
# apollo-kotlin
s
Do you have a favorite way of doing a project-wide search (Cmd + Shift + F) for some text while excluding all apollo-kotlin generated code from that search? I've tried the
scope
inside IJ to try and exclude something like all files that are in a directory named
/generated/
perhaps, but I can't seem to get it to work. And since they are considered normal project files, excluding non-project files won't filter those out either.
m
I declared bankruptcy on IJ scopes 😞
same 3
When I really need to narrow a search, I just search inside a directory (
src/main/kotlin
or so)
b
!file:*/build//*
not working for me 😞 - this has to be a bug! It looks like generated sources are added to the scope no matter what.
1
s
Yup, doesn't work for me either. And the suggestion from Łukasz also does not work for me. These IJ scopes never worked for me, and it's so unfortunate 🤷
Alright, see ya all in 2025 when inevitably I will come back here with the same question when I forgot that I already asked in the past and IJ scopes will still be giving me a hard time 😂
😂 1
w
2025 is just around the corner, but I think this issue may help: https://youtrack.jetbrains.com/issue/KT-45161/Gradle-Support-registering-generated-sources-with-the-Kotlin-model and the target version is 2.1.20 🤞 Unrelated ranty remark: I’m pretty sure this used to work, and then stopped for a couple of years, and I’m not the biggest fan of move fast and break things where the broken things are a massive pain for 90% of the projects/developers. I’m looking at you too, mr
rename refactoring
taking minutes 😠
thank you color 2
nod 1
1
s
Don't make me say 2026 😂 Thanks for the link, starred it!
b
I think the issue is that the patterns in the scopes are filters relative to the "source sets" / "modules" (not even sure what these are in IJ) we see in the left side. But what we need is a "global" filter.
I think I'll open an issue even though it's almost certain one already exists 🙂
2
actually it looks like I managed to do what we want, by using includes instead of excludes... I unfolded
app/src/main
and clicked on
kotlin
and "Include recursively". Can also include
graphql
and
res
Of course, this is tedious if you have many modules I guess you need to do that for each
s
Uhhh, yeah that'd be like 50+ modules, probably quite tricky 😅 Thanks for the idea, I will try to see if that works for me though!
👍 1