Rebuid only modules that contains warnings - qt

For now i'm working on complicated Qt project and trying to eliminate many of warnings which appears when i'm trying to build project with using of different compilers (gcc,clang,msvc). Full rebuild of project takes up a long time.
Is there a some tool or maybe a artful approach to rebuild only modules that has warnings on previous build?
I think it might be reached by deleting (or outdating) those modules. Thus Make utility can rebuild them for me.

As the earlier comment say, only do a normal build. Anything that didn't compile last time will now compile. This of cause requires that you set a compiler flag to treat warnings as error or the compiler will create object files even though there are warnings. And the above strategy will fail.

Related

What are the .NetCore Analyzers

I'm working on a .NetCore 2.2 project, my question is about the folder Analyzers in the Dependencies, What are these,
And in some cases, they have a warning, which makes all dependencies folder has a warning.
Okay, it has no effect on the build on Runtime.
What are the analyzers?
Why they have warnings in some cases?
Those are roslyn analysers. They help you maintain high code quality.
Library authors for instance can use analyzers to raise errors/warnings/suggestions when users write less-than-ideal or plain low quality code.
If you have the warning sign, your project most likely also has warnings on build. You may expand the node in the question's screenshot to see a list of warnings and start addressing them.
The Visual Studio integration is documented here.
Once you're done clearing the warnings you may also consider using the FxCop analyzers.

The tag 'ChromiumWebBrowser' does not exist in XML namespace 'clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf'

I am attempting to add a CefSharp control to an AnyCPU project. I have followed the instructions here: https://github.com/cefsharp/CefSharp/issues/1714 and I thought I had everything working correctly. I pushed my changes to to SVN and then checked out a clean copy.
The first time I attempted to build using that clean copy, I received this error:
error MC3074: The tag 'ChromiumWebBrowser' does not exist in XML namespace 'clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf'. Line 18 Position 14.
as a result of this error, several other libraries fail to compile. If I attempt to build again, everything compiles fine.
I ran a diagnostic build, and, it appears that the CefSharp packages are in fact being installed from NuGet prior to this error and, the error occurs during MarkupCompilePass1.
This seems very, very similar to this issue: https://github.com/dotnet/project-system/issues/4158, however, in that case, it sounds as if the problem was resolved by switching from package.config to PackageReference, but, that approach did not seem to fix my error.
I have read https://www.xavierdecoster.com/post/2014/03/06/migrate-away-from-msbuild-based-nuget-package-restore.html as amaintland suggested in the issue I mentioned above, and, unless I'm misunderstanding, it's not a solution that I can use. For the time being, out continuous integration runs on CruiseControl (which isn't mentioned as a tool that supports automatic package restore out of the box), and we're stuck on VS 2013.
Right now the only option that I can find that seems like it might work is checking the NuGet packages into SVN. This is a last resort solution for me, but, lacking a better option, I don't know what to do.
If anyone has any insights or suggested steps, I would really appreciate the advice.

FlexBuilder/MXMLC: Profiling the build process?

I've noticed that, recently, builds in FlexBuilder have been taking much, much longer than they used to (30 or 40 seconds, as opposed to 3 or 4). What is the simplest way of profiling these builds to figure out what is taking so much time?
Did you try cleaning your project? ( Project--> Clean )
From the Adobe Live Docs: Performing a clean build
After a project has been built, subsequent builds affect only the resources that have been added
or modified. To force the Flex Builder compiler to rebuild all resources in a project, you can
perform a clean build. You might perform a clean build if, for example, you want to eliminate all
potential sources of a problem you encountered when testing your application.
1. Select Project > Clean from the main menu.
2. Select the project (or projects) whose build files you want to discard and rebuild from scratch.
3. Click OK.
I have found that when Flex Builder reaches a java heap space of, say 500M, the builds slows way down, try restarting Flex Builder whenever that happens. Also, add the heap monitor to the status bar by going to Window->Preferences, type "heap space" in the filter and check the box that says "Show heap status".
I've also found that embeds slows the builds down very much, so does having a lot of stuff in your html-template folder. I suggest moving all embeds to a separate module, like described here.
Evenrything in your html-template folder will get copied to bin-debug during build, so that will be slow too. How to solve this depends on your project, but removing any .svn or .cvs folders from html-template is a start.
FlashBuilder is just an eclipse and eclipse is Java. You can profile eclipse itself with JProfiler. so much for the first question.
To trakc down, waht actually makes the build process so slow is much harder and profiling may not be what you want. Additionally to the adives above, there is also the
-incremental=true
compiler argument.
Make sure your "-Xms" entry equals your "-Xmx" entry.
And there's more than heap. You can also set the -XX:PermSize= and -XXMaxPermSize= parameters wisely. But that would need some understanding of the GC process, as the ratio between heap and permspace is crucial here.
And if you play with these variables, always make sure they are actually used. It happens more than easy to put them somewhere (batch file, exlipse.ini) with them having any effect.

Show all compile errors in FlexBuilder?

Is it possible to make FlexBuilder show all compile errors in all files? FlexBuilder does not show errors in Action Script files, that are not referenced. Also very often I fix a problem just to see new problems pop up after compiling the whole project although these errors existed long before.
IntelliJ is showing all compile errors it can find and I would like to have FlexBuilder behaving the same way since IntelliJ is not mature enough to handle our complex set up. Is there a compiler switch to enable this?
The compiler can (and will) show errors only in code that you tell it to compile, and like you said, whatever is not referenced in the code you compile, will not be compiled, and thus, checked by the compiler.
So if you want to have the compiler check some part of your code, you need to tell it to compile it. I'm not sure how your projects are set up, but I'm assuming that you're compiling a bunch of smaller projects that are all using different parts of a shared codebase (or something similar.) In this case, you could either:
set up some sort of "master" project that references all of your code, compiling which would then check for errors everywhere (maybe you have this already, in which case the solution is simply to compile this regularly)
set up a job/target for compiling the AsDoc documentation for all of your code -- you could then run this regularly and at the same time you'd be keeping your API docs up to date
The following MXMLC compiler arguments might be useful:
-includes className [...]
Links one or more classes into the output SWF, regardless of whether they are required at compile time.
-include-libraries swcPath [...]
Links the entire contents of one or more SWC libraries into the output SWF, regardless of whether its classes are required at compile time.

How to get doxygen to run faster?

Doxygen is a bit slow - it takes about a couple of minutes to process my whole project, so for small incremental changes this is longer than actually building the rest of my code. There are thousands of files without any documentation so I guess it is spending most of its time processing them. Is there any way to get it to skip files without any documentation?
What about getting it to only process changed files?
From Doxygen documentation:
How can I exclude all test directories
from my directory tree?
Simply put an exclude pattern like
this in the configuration file:
EXCLUDE_PATTERNS = /test/
So, you should be using patterns to exclude files. It's been a long time since I've used Doxygen, but i don't remember any option to process only changed files.
I found that turning off the option SEARCH_INCLUDES made a big difference. It was looking through the whole platform SDK and include paths for the compiler which were not documented anyway and would not appear in the generated documentation.
There is a DOT_NUM_THREADS options which may increase the performance on multicore machines. Unfortunately doxygen itself is just single threaded.
Another approach would be to organize your code into modules run for each module a separate doxygen instance and link the resulting tags together: http://www.doxygen.nl/manual/external.html
Doxygen is good at finding connections between files, either changed or not. But Doxygen does not remember informations about unchanged files, so it must process the whole codebase each time.
May be a solution would be to organize the project such that never changed files belong to one module which is excluded from Doxygen scope and whose documentation is already available. Then it would be possible to tell Doxygen to link newly built documentation to this existing module documentation.
Going further, it would also be possible to make Doxygen running module by module, processing only changed modules and a top level documentation which links to all module documentations.
I don't think having Doxygen run on a normal dev cycle is a good idea. Our Doxygen build runs as part of our Continuous Integration server's responsibilities.
That said, there are some benefits of running doxygen every build to catch missing docs.
So I would trim the doxygen config for dev builds removing diagrams, and even stop apple importing it into xcode.

Resources