noseglid / atom-build

:hammer: Build your project directly from the Atom editor
https://atom.io/packages/build
MIT License
248 stars 97 forks source link

F4 opens a separate buffer if the error message prints the path with a different case #406

Closed niklasfrykholm closed 8 years ago

niklasfrykholm commented 8 years ago

I have a project in C:\Work\code with a custom .atom-build.json file.

When I build it using Visual Studio, if there is an error in a header file, the path in the error message is printed in lower case (I guess this has something to do with how includes are resolved):

c:\work\code\runtime\foundation\io\database.h(16): error C2143: syntax error

If I now press F4 to open this file, Atom will open a separate buffer for the file. I.e. I now have two buffers pointing to the same database.h file, one with the path C:\Work\code\\runtime\foundation\io\database.h and another one with the path c:\work\code\\runtime\foundation\io\database.h.

In the second of these buffers, the build command (F9) doesn't work anymore. I guess because c:\work\code doesn't exactly match the project folder C:\Work\code, so it is not seen as part of the project.

This disrupts the workflow, because after I've pressed F4 and fixed the bugs, I naturally want to press F9 to build again, and then I just get an error message.

Note that this only happens with .h files, because for .cpp files, Visual Studio prints the error message with the correct case:

C:\Work\code\runtime\foundation\io\database.cpp(863): error

I'm not sure if this really is an issue with the build package or if it is a more general problem that has to do with how Atom handles paths on file system that are case preserving but case insensitive.

niklasfrykholm commented 8 years ago

Seems like this is a duplicate of #119.

niklasfrykholm commented 8 years ago

This does seem to be a general issue with Atom rather than anything else. I can open multiple copies of the same file in Atom with:

atom main.cpp
atom MAIN.cpp

And incidentally the build command (F9) doesn't work for any of these files, because for whatever reason they are opened with a lower case drive letter (c:). If I use a full path with the correct case:

atom C:\Work\main.cpp

Then the build command works.

Closing this since it doesn't seem to be an issue with the build package, but a general Atom problem.