Unsolved how to sort errors (issues panel) by file?
-
look at this: is there some way to sort that by file then line number? seems kindof randomly sorted now.
-
@davecotter The order is the same as the compiler outputs these errors. Usually it is better to start with the first error as many other errors are follow ups of the first one. So, if you would sort the errors like you suggest you would not know what the first error was and try to fix issues which are actually just follow up and disappear when the real issue is fixed.
-
perhaps i'm not making myself clear.
i want the errors sorted by file, then by line number. fixing an error on an earlier line number may make subsequent errors (on higher line numbers) go away.
there's no way that an error in a file2 can cause errors in file1 (assuming it's not a header)
-
@davecotter
Sorry I don't use C++ or Creator and can't answer whether you can sort by file perhaps at he end of the build. But:seems kindof randomly sorted now.
For C++ can't each
.cpp
be compiled in its own thread, so is that what's happening? If, say, you've changed a.h
causing a bunch of.cpp
s to be re-compiled that could lead to the output order you see? -
yes, i expect the errors are happening on different compile threads, that explains why several entries from the same file are interleaved with entries from another file. this is exactly how i do NOT want to read errors. i want them by file, not by chronological order of reporting from separate threads
how do i sort by file?
-
@davecotter said in how to sort errors (issues panel) by file?:
how do i sort by file?
You don't, at least not to my knowledge. You could file this as a feature request on the bugtracker.
-
@davecotter
I realise it would be a drastic step, but would you even consider seeing if you can tell whatever builds or compiles to be limited to only using one thread, like in the olden days, then you'd get the output order you'd like? I know MSVC/Visual Studio allows that choice. Whether it would sufficiently slow you down in practice, or you'd just use it when you had multiple errors to deal with, you'd have to test.You should certainly request the sorting as future feature if you'd like to.
-
@JonB Good idea. In practice, it would be enought, to build the file in doubt again (Ctrl+Alt+B), then the list only contains the errors from this file and should be pretty good sorted.
The normal build should use all cores. C++ can still takes some minutes to compile, depending on the project size.
-
Continued as QTCREATORBUG-21893
-
@aha_1980
I've always had a healthy suspicion of multiprocessing. In theory men are multi-core/threaded too. However, in practice if we use more than one core they tend to overheat, stand around waiting for each core to finish, and end up taking more time than if they'd stuck to a single core anyway. Maybe compilers are female then.... -
@JonB said in how to sort errors (issues panel) by file?:
Maybe compilers are female then....
Haha, made my day.
Just as example: completely compiling QtCreator on my personal notebook takes approx. 25 minutes with 6 to 8 cores. One more or less does not matter. However, with only 1 core it would take over two hours.
So when dealing with large C++ projectes, multicores are a must. Really.