Community
Participate
Working Groups
Build Identifier: I20100312-1448 On Mac OS X file system is case insensitive by default. So it's possible to #include "foo.h" while file is named "Foo.h". Currently CDT doesn't handle this and marks such includes as unresolved that cause indexer errors. One of possible solutions is some kind of project setting to use case-insensitive #include. Reproducible: Always Steps to Reproduce: 1. echo '#include "foo.h"' > foo.cpp 2. echo '// some include' > Foo.h 3. create project from this and index it.
CDT does handle case insensitive file systems. Your example works on windows. Whether the file system is case sensitive is tested with: boolean insensitive= new File("A").equals(new File("a")); What is the result of this test on your mac?
Hi, result is "false". However filesystem is case insensitive: % echo aa > testfile % cat TESTFILE aa java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) This is regular Mac JFS+ filesystem with osx 10.6
Also new File("TESTFILE").exists() returns true after "echo aa > testfile".
I'd say this is a bug in the jvm.
Looks like similar issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=69854 Any workaround planned?
(In reply to comment #5) > Looks like similar issue: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=69854 > > Any workaround planned? The workaround used by the platform should be fine for CDT as well. Ideally you'd provide a patch, since you are on a mac you could also test it (while I cannot).
Created attachment 172405 [details] fix I have no means of testing the patch, however it should work.
Fixed in 8.0 > 20100622.
*** cdt cvs genie on behalf of mschorn *** Bug 312666: Default filesystem on Mac is case insensitive. [*] ProjectIndexerInputAdapter.java 1.14 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerInputAdapter.java?root=Tools_Project&r1=1.13&r2=1.14 [*] FileExistsCache.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/FileExistsCache.java?root=Tools_Project&r1=1.4&r2=1.5
*** Bug 329242 has been marked as a duplicate of this bug. ***
Reopening because it's broken again. Such includes are marked as unresolved and it's impossible to navigate them using "F3" or Ctrl+click. This is Mac OS X 10.6 (default case-insensitive format): --- % echo "hello" > a.txt % cat A.TXT hello --- java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261) Java HotSpot(TM) Client VM (build 17.1-b03-307, mixed mode) Eclipse: - eclipse-SDK-3.7M3-macosx-cocoa.tar.gz - cdt-master-8.0.0-I201011040003.zip
Created attachment 182356 [details] extends the fix to the include file resolution heuristics. Additional fix in 8.0 > 20101104.
*** cdt cvs genie on behalf of mschorn *** Bug 312666: Default file system on Mac is case insensitive. [*] ProjectIndexerInputAdapter.java 1.18 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerInputAdapter.java?root=Tools_Project&r1=1.17&r2=1.18 [*] FileExistsCache.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/FileExistsCache.java?root=Tools_Project&r1=1.5&r2=1.6 [*] ProjectIndexerIncludeResolutionHeuristics.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerIncludeResolutionHeuristics.java?root=Tools_Project&r1=1.2&r2=1.3 [*] ASTFilePathResolver.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/ASTFilePathResolver.java?root=Tools_Project&r1=1.5&r2=1.6 [*] StandaloneIndexerInputAdapter.java 1.15 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java?root=Tools_Project&r1=1.14&r2=1.15
(In reply to comment #11) > Reopening because it's broken again. Such includes are marked as unresolved and > it's impossible to navigate them using "F3" or Ctrl+click. > This is Mac OS X 10.6 (default case-insensitive format): > --- > % echo "hello" > a.txt > % cat A.TXT > hello > --- > java version "1.6.0_22" > Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261) > Java HotSpot(TM) Client VM (build 17.1-b03-307, mixed mode) > Eclipse: > - eclipse-SDK-3.7M3-macosx-cocoa.tar.gz > - cdt-master-8.0.0-I201011040003.zip My initial fix did not cover the heuristics for finding included files, I have extended the fix. This should resolve the issue, however I have no means of testing the fix. In your version the included files should be found (ignoring case) as long as you provide the proper include search path.