QT doesn't display previous build warnings unless the entire project is rebuilt - qt

I'm not sure if this is standard behavior for IDEs, but I personally find it irritating. If a file produces warnings when built (unused variables, mismatched ints/longs/etc.), those warnings will cease to be displayed if another file is modified and the "Build project" button is clicked. Doesn't it make more sense for warnings pertaining to unmodified code to continue to be displayed? Is there a way to force this behavior?

The warnings are displayed when the compiler emits them -- unfortunately, that's the design decision taken by both VS team (up to 2008 at least) and by Qt Creator team.
It seems to be standard behavior, and I don't know of any options to override it. It should be easy to fix in Qt Creator, but may be hard to fix in Visual Studio unless relevant APIs are present. For VS you'd need to write an add-in and there would need to be an API available that gives you read-write access to the error list and to the build process. If such APIs exist, then it'd be a simple thing to do as well.

This is "standard behavior", and more specifically, behavior is an attribute of how build systems on Earth "are-designed-to-behave".
As #Kuba notes, the warnings are emitted by the compiler. They aren't stored (except in the "log-of-all-errors/warnings" for the build operation, which the IDE typically never reads-back-and-excerpts-from-for-future-build-operations, which would get their own log of their new warnings/errors). Thus, you won't see the warning again unless the compiler actually compiles the file again, and that's because they would be new warnings that are generated again by the new build operation.
To get what you want (a clever thought, IMHO), the build system would need to:
store warnings from each file-compile (probably on a "per-file-basis")
recall/display those warnings each time that file-output-product was "used"
Very clever. I'm not aware of any system that does that. It would require fairly significant IDE or build-tool-level management of build products, which IMHO, none of them do well (but some are better than others).
This is the year 2012, and not only are we missing our flying cars, but we're missing build systems that merely/quickly build-only-what's-required-using-all-cores while easily handling different configurations. Both were expected by now.
Then, sometime after that, you could probably get your feature. That would be a bonus, because then you could use it in your flying car.

Related

Automake/autotools and using "--dry-run" and "--always-make" for make

I stumbled upon an issue when I recently switched to VSCode as editor.
I have several projects that have a full (medium-complex+) autotool
setup and they all work fine. However I discovered that the makefile plugin for VSCode in order to initialize itself (and finding all dependencies and targets) starts by running
make --dry-run --always-make
as first time initialization. This throws the makefile (or actually the
re-config) into an endless loop re-running "configure" (since the targets are never resolved to disk).
I have also confirmed this behavior with the smallest possible autoconf/automake
setup. I can also kind-of understand why this happens (and it seems make
have an internal way to discover this exact situation with the special
variable MAKE_RESTARTS that could possible be used to detect a cyclic
behavior)
Is there a known best-practice workaround ? or is it even a reasonable expectations that these two options in combination should work? (Good to have a second opinion before I go down the rabbit-hole of reminding myself of all the details I forgot about the magical land of autotools)?

Website doesn't build, but works correctly in browser ASP.net

When I build my website project using visual studio 2016 (or any visual studio for that matter), the compiler gives me an error:
However if I go to the code file ResetPassword.aspx the edtEmployeeSurname control is present and it has a runat="server" attribute.
There is also no errors given to me if I open the ResetPassword.aspx.vb code file. (So no red lines under any variable names / Control ID's).
What is really interesting is that the website (Even ResetPassword.aspx) loads correctly from the browser without any issues and I can submit the form.
If I comment out all the code in ResetPassword.aspx.vb then it just finds another control that "Doesn't Exist" and so it carries on with a lot of pages.
All I want to know is:
What causes these issues
How to fix these issues OR how to determine what the issue is.
If this is a common mistake that some developers make then please help me to formulate a search string to use in google, because most of my search results were obscure or off topic.
I've run into this sort of thing before and I believe the errors you are seeing are red herrings. They lead me to believe that one of your lower projects where your user controls are defined, or possibly even lower than that, has a possibly unrelated error in it which is causing it to not be built by visual studio, which in turn makes visual studio think your user controls aren't defined.
What I normally do is build the solution and watch the output window. It will build all of your projects individually, the first error you see pop up in the output window is the source of your problem. Everything else you are seeing is a symptom of that original issue. If you fix the first error that shows up in your output then it will either build correctly or you will have to repeat the process with the next error that pops up.
Visual Studio used to order the errors in the error list in the order that they came up during the build but that has changed, I, personally, really preferred the old sorting(I think there is a setting that you can use to get back to the old sorting but I can't think of it off the top of my head).
From screenshots, it shows you have 50 errors in your project. There is no way an application will run successfully if you have not set to do so.
You could make application run, even if errors.
Check SO post :
Debugging runs even with compiler's errors in Visual Studio
Note:
If you have already cleaned and rebuilt solution,
Try running application in other browser or another computer, may be you have data shown from previous successful result.
Based on the wording of the error, I believe it's possible you are referring to some of these controls outside the code behind of ResetPassword.aspx. The latter part of the message says It may be inaccessible due to its protection level. By default, the backing variable for a control you place on a form is Protected and therefore cannot be seen outside the scope of that control or its inheritance chain.

What happened to CFFI-UNIX?

My ultimate goal here is to get the system FLEXI-TRIVIAL-DIRED (http://common-lisp.net/project/ftd/) to compile, which I'm having trouble with because I can't find one of the required packages, CFFI-UNIX anywhere.
Does anyone know what happened to it, why it originally existed, if it was merged into another project, why this was, etc.
The system used to "provide a portable interface to Unix functionality, with a focus on networking". Looking at the source of FTD, you can see it calling cffi-unix::getgrgid. This functionallity is now provided (superseded) by osicat.

How can I find syntax errors in QML files?

I'm doing development for Blackberry 10 using Cascades, which includes QT and QML. I find that I sometimes make mistakes in my QML file, but they don't get picked up at compilation time. How can I check whether I've made a syntax error, or mis-named a function call, or other typical errors?
QML is a dynamic language that is evaluated at Runtime. There is no compilation step and due to the nature of javascript and the dynamic nature of the global context there is no way for it to tell if what you are writing is correct/incorrect until it is evaluated. QtCreator can help with some of the QML errors you will find, but there is unfortunately no good way to get syntax errors about your javascript until it is evaluated and it explodes.
Personally, I have found good usage of the debugger to be the key to making these sort of fixes easy.
tldr; Keep your javascript clean and to a minimum there is no compile time checking.
open terminal in IDE connect your device or emulator using blackberry-SSH after connecting enter slog2info it show syntax and all typical error JavaScript with description and line NO.
If there are any mistakes it will show those lines in RED marks. It is dynamically checks there is no need to worry about compile.
If you done wrong you will not see the DESIGN CONSOLE correctly.

Eclipse is telling me a cycle was detected in the building path, but that's not true!

Eclipse is telling me:
a cycle was detected in the build path of -project name-
, although the structure of the project (created by others in the team) does not have cycles.
The same project is deployed on other machines (the same!) and it doesn't give the error.
I need to work from my machine so I need to solve this.
It is giving me the error in 8 different projects.
It was giving me the error in more (10 projects) but with cleaning and building 10 times just changed to 8! (without any changes in the code).
I really need to get this working and cleaning and building over and over is not doing anything. Any tips?
(note: this is not java, this is flex so i can't change the error to warning :))
Thanks a lot!
If it works on other machines but not your own, it must be a "local cache" effect.
You must have an existing library taken into account from a long time, which causes locally the error, while that same file is not present on the other workstations.
Could try and recreate the projects from scratch, on a new empty directory, and see if the problem persist?
If it does (and only then), the exact version of Eclipse and Flex plugin could help.
Try creating a new workspace then import the projects into that.
The problem most often arises after migrating your code. You have always been working on one project at a time, and all the time one of the projects was in a compiled state, so the builder didn’t complain. There is no law of nature that says that code shouldn’t be mutually dependent (it happens within projects all the time), but many builders, also in Eclipse, have problems with this chicken-egg problem and start complaining if both project’s are not compiled: “cycle detected in buildpath”.
Often you’ll get the advise to adjust the severity level of circular dependencies to give only warnings (in Eclipse: Window > Preferences > Java > Compiler > Building > Build path Problems > Circular dependencies), but that’s no real solution.
Make a component-diagram of your projects and their dependencies (I advise to use BOUML, freeware UML-editor, or Rational Rose), and imagine the builder working from right to left starting with nothing. If necessary, make a new project on the right and remove circularities between projects by moving definitions/interfaces that more projects should know of in there. (You could call this a leaf-project, needing nothing else, but the result is not necessarily a tree, it’s a net that you can traverse right to left).
Sorry for reposting. I saw that the text of my earlier answer was scrambled.
The problem most often arises after migrating your code. You have always been working on one project at a time, and all the time the other projects were in a compiled state, so the builder didn't complain. There is no law of nature that says that code shouldn't be mutually dependent (it happens within projects all the time), but many builders, also in Eclipse, have problems with this chicken-egg problem and start complaining if both projects are not compiled: "cycle detected in buildpath". Often you'll get the advise to adjust the severity level of circular dependencies to give only warnings (in Eclipse: Window > Preferences > Java > Compiler > Building > Build path Problems > Circular dependencies), but that's no real solution.Make a component-diagram of your projects and their dependencies (I advise to use BOUML, freeware UML-editor, or Rational Rose), and imagine the builder working from right to left starting with nothing. If necessary, make a new project on the right and remove circularities between projects by moving definitions/interfaces that more projects should know of in there. (You could call this a leaf-project, needing nothing else, but the result is not necessarily a tree, it's a net that you can traverse right to left).

Resources