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

Alt+O doesn't honor files.exclude #485

Closed
csholmq opened this issue Feb 10, 2017 · 12 comments
Closed

Alt+O doesn't honor files.exclude #485

csholmq opened this issue Feb 10, 2017 · 12 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service

Comments

@csholmq
Copy link
Contributor

csholmq commented Feb 10, 2017

When swithching to matching header file, which is in another folder, all goes well. But switching back picks another matching source file (same folder as header file). Despite excluding all .c files in that folder.

E.g having src/file.c open and hitting Alt+O.

src/file.c
obj/file.c (should be exluded by files.exclude rule)
obj/file.h

Rule: "**/obj/*.c": true

@sean-mcmanus
Copy link
Contributor

Yes, you are right, The current header switching doesn't use the browse database and just creates its own isolated data structure and search which doesn't look at any of the exclude settings (in addition to other problems). We've implemented header switching using the browse database so this should be fixed in the next update, assuming we don't find some problem with the new implementation that causes us to revert the change.

@bobbrow
Copy link
Member

bobbrow commented Mar 2, 2017

This should be fixed in 0.10.2. Please reopen if you continue to see the issue.

@bobbrow bobbrow closed this as completed Mar 2, 2017
@csholmq
Copy link
Contributor Author

csholmq commented Mar 21, 2017

@bobbrow Still present in 0.10.4. :(

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Mar 21, 2017

We changed the behavior to always look in the same folder first, but it doesn't look at the files.excludes in that case...is that what is happening? As in, was this fixed in 0.10.3?

@csholmq
Copy link
Contributor Author

csholmq commented Mar 21, 2017

Correct. When switching to the .h it jumps to obj/out (since my .h files are auto generated there). When I then try to switch back it doesn't look at files.exclude and instead selects another, copied, .c file in the same folder (out/obj).

@sean-mcmanus
Copy link
Contributor

Okay, it's been fixed, and there was another "bug" in which the files.exclude would be parsed after it was manually opened. We might be able to release that in today's update.

@bobbrow bobbrow added the fixed Check the Milestone for the release in which the fix is or will be available. label Mar 21, 2017
@sean-mcmanus
Copy link
Contributor

With 0.10.5, it no longer switches to excluded files as long as the excluded file stays out of the browse database. Unfortunately, we found scenarios right before shipping that can cause the excluded files to enter the database and then file switching to happen. We intend to fix these in the next update.

@csholmq
Copy link
Contributor Author

csholmq commented Mar 23, 2017

Sounds solid. Will test later today.

In future releases, will modifying files.exclude also remove files from database? Not very intuitive having to purge the database each time you make an edit.

@sean-mcmanus
Copy link
Contributor

Modifying the files.excludes removes files from the database right now...the problem is that it will freeze the main thread while it searches for all the files to remove.

@csholmq
Copy link
Contributor Author

csholmq commented Mar 23, 2017

Confirmed to work!

So editing my settings.json would trigger that behaviour or do I have to actually add or remove an entry in the files.exclude?

@sean-mcmanus
Copy link
Contributor

Only modifying the files.exclude setting should trigger the potential freeze as it tries to remove all the excluded files on the main thread.

@csholmq
Copy link
Contributor Author

csholmq commented Mar 23, 2017

Oh, ok. Good to know. Well, better than no action!

@sean-mcmanus sean-mcmanus removed their assignment Apr 22, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

3 participants