"dirty fiile " option ?
-
BUMP
This has been asked few years back and the "answer" was to add -j option to make.....
https://stackoverflow.com/questions/12912550/qt-creator-how-to-compile-changes-only
That was not what the orignal poster asked....
I can run and complete "build"...
When I make no changes and immediately run "build" again it runs full "build" again ...Am I missing an option NOT to perform a task when there are NO changes ?
In old days OS would skip running the task and just complete when there were no changes made .
files were checked for matching state...QT sometime post a message to the same effect - since there are no changes there is nothing to do.
-
whatever you get here as "full rebuild" is very likely due to your build system, not Qt Creator. You can run (e.g.) 'ninja -d explain' to find out why it wants to rebuild a certain file.
I say "very likely" as there are of course ways to make Creator take a role in such behaviour, e.g. by adding some custom build steps that throws away build artifact or do similar unhelpful things. But that never happens by itself, this requires the user explicitly setting up such a step.
-
whatever you get here as "full rebuild" is very likely due to your build system, not Qt Creator. You can run (e.g.) 'ninja -d explain' to find out why it wants to rebuild a certain file.
I say "very likely" as there are of course ways to make Creator take a role in such behaviour, e.g. by adding some custom build steps that throws away build artifact or do similar unhelpful things. But that never happens by itself, this requires the user explicitly setting up such a step.
@andr Hold on - there are "standard" option in "Build" menu - the original post ( I made reference to ) basically asked how old fashioned " detect dirty file " works in QT.
It appears that OS and QT get mixed up - it really does not matter to me who is at fault , BUT
under "stable conditions" I have to run "Build" and then "Run" for changes to take place.
The original post asked how to setup QT so "Run" will execute "Build" if necessary - sort of making the coder life easier.
That is what I am asking.
It seems that "Debug" will work that way - run "Build" first...if necessary
-
@AnneRanch said in "dirty fiile " option ?:
basically asked how old fashioned " detect dirty file " works in QT.
Qt does not do anything here - it's a C++ library, not a build system (and neither QtCreator can do anything against this) - it's a problem of your filesystem which somehow screws up the file modification times and therefore the build tool (which is 'make' in your case, no qmake nor QtCreator) thinks the files are outdated and therefore they need to get recompiled.
-
@andr Hold on - there are "standard" option in "Build" menu - the original post ( I made reference to ) basically asked how old fashioned " detect dirty file " works in QT.
It appears that OS and QT get mixed up - it really does not matter to me who is at fault , BUT
under "stable conditions" I have to run "Build" and then "Run" for changes to take place.
The original post asked how to setup QT so "Run" will execute "Build" if necessary - sort of making the coder life easier.
That is what I am asking.
It seems that "Debug" will work that way - run "Build" first...if necessary
-
@AnneRanch
"Run" should run any necessary "Build" if required, just as "Debug" button/menu item does. There should be no difference between them in this area, and I have always found they behave the same wrt rebuilding.@JonB give me some credit - would I ask the question if it worked as you said?
it does not - I repeat - I have to run "build" and then it will "run" with added changes... -
@JonB give me some credit - would I ask the question if it worked as you said?
it does not - I repeat - I have to run "build" and then it will "run" with added changes...@AnneRanch said in "dirty fiile " option ?:
give me some credit
I constantly "give you credit". I was advising that it should not differ between the two.
-
BUMP FYI
This is how normal , no need to re-compile , "compile output" , looks when banana is working correctly....
-
@AnneRanch, I'm sorry, but it's now completely unclear to me (and probably others) what you're actually asking for.
Can you try to formulate explicitly
a) what exact steps you are doing
b) what you expect to happen
c) what happens instead (including output from Build Console) -
@AnneRanch, I'm sorry, but it's now completely unclear to me (and probably others) what you're actually asking for.
Can you try to formulate explicitly
a) what exact steps you are doing
b) what you expect to happen
c) what happens instead (including output from Build Console)@kkoehne said in "dirty fiile " option ?:
@AnneRanch, I'm sorry, but it's now completely unclear to me (and probably others) what you're actually asking for.
Can you try to formulate explicitly
a) what exact steps you are doing**"When I run " build: QT compiles as expected **
b) what you expect to happen
r**Then when I run "Run " QT complies again - it should just " Run"
as shown in my previous post.I am expecting QT to :"Run " without further delay / compiling**
c) what happens instead (including output from Build Console)
I already posted successful "Run " output
when it fails - and QT complies again instead of running the output is valid but way it is too big
to post and immaterialIf my verbal explanation is too confusing , I do not know what else to say...
IMHO there must be a setting / option to STOOP QT to keep compiling when
there are no source changes. -
@kkoehne said in "dirty fiile " option ?:
@AnneRanch, I'm sorry, but it's now completely unclear to me (and probably others) what you're actually asking for.
Can you try to formulate explicitly
a) what exact steps you are doing**"When I run " build: QT compiles as expected **
b) what you expect to happen
r**Then when I run "Run " QT complies again - it should just " Run"
as shown in my previous post.I am expecting QT to :"Run " without further delay / compiling**
c) what happens instead (including output from Build Console)
I already posted successful "Run " output
when it fails - and QT complies again instead of running the output is valid but way it is too big
to post and immaterialIf my verbal explanation is too confusing , I do not know what else to say...
IMHO there must be a setting / option to STOOP QT to keep compiling when
there are no source changes.@AnneRanch
Qt doesn't decide what to (re)compile, it's themake
it calls which does. As per the screenshot you showed. The question is why does thatmake
seem to recompile before Run when themake
from the Build has done.when it fails - and QT complies again instead of running the output is valid but way it is too big
to post and immaterial
It is not immaterial. The issue is why/what it does. Right at the beginning of the output we probably need to know why it ever starts to compile anything, given that all should be already up to date.
-
@kkoehne said in "dirty fiile " option ?:
@AnneRanch, I'm sorry, but it's now completely unclear to me (and probably others) what you're actually asking for.
Can you try to formulate explicitly
a) what exact steps you are doing**"When I run " build: QT compiles as expected **
b) what you expect to happen
r**Then when I run "Run " QT complies again - it should just " Run"
as shown in my previous post.I am expecting QT to :"Run " without further delay / compiling**
c) what happens instead (including output from Build Console)
I already posted successful "Run " output
when it fails - and QT complies again instead of running the output is valid but way it is too big
to post and immaterialIf my verbal explanation is too confusing , I do not know what else to say...
IMHO there must be a setting / option to STOOP QT to keep compiling when
there are no source changes.@AnneRanch change this setting on your own risk:
change the combobox "Build before deploying" from "Build the Whole Project" to "Do Not Build Anything"
and/or
uncheck "Always deploy project before running it" -
I have written this before JonB post.
So skip to the end for the latest .
I have changed my mind
after fighting with banana doing unexpected here is the real PROBLEM
(the way I see it )WHEN SOURCE CODE HAS CHANGED / EDITED
and "Run" is executed this message is WRONG"configuration " or whatever QT calls it HAS changed
the source files are "dirty"
banana QT is optioned to save updated / "dirty" files before "Run " and that is NOT happening.
ADDENDUM
IMHO we all need too take a look at the documentation ( RTFM ) and quit guessing what the banana coders are actually saying with various options.In my opinion - the options should be in some order of precedence , hence
FIRST option is sayingBEFORE "build" OR "run" save files IF NEEDED
that again , in my opinion, should be before any other options
for example - it makes no sense to "deploy " if the above is not done,
nor run "debug"....As far as who / which application is actually executing anything is immaterial - the result is wrong and I as a user
can only look for options. Especially when they are working at random, as far as I can tell.I cannot change make , gcc, banana, QT ,,,,,
PS
At one point "debug" would come up with " source code in newer then ,,," so logically - the banana KNOWS it is working with outdated source - but runs anyway.... -
I have written this before JonB post.
So skip to the end for the latest .
I have changed my mind
after fighting with banana doing unexpected here is the real PROBLEM
(the way I see it )WHEN SOURCE CODE HAS CHANGED / EDITED
and "Run" is executed this message is WRONG"configuration " or whatever QT calls it HAS changed
the source files are "dirty"
banana QT is optioned to save updated / "dirty" files before "Run " and that is NOT happening.
ADDENDUM
IMHO we all need too take a look at the documentation ( RTFM ) and quit guessing what the banana coders are actually saying with various options.In my opinion - the options should be in some order of precedence , hence
FIRST option is sayingBEFORE "build" OR "run" save files IF NEEDED
that again , in my opinion, should be before any other options
for example - it makes no sense to "deploy " if the above is not done,
nor run "debug"....As far as who / which application is actually executing anything is immaterial - the result is wrong and I as a user
can only look for options. Especially when they are working at random, as far as I can tell.I cannot change make , gcc, banana, QT ,,,,,
PS
At one point "debug" would come up with " source code in newer then ,,," so logically - the banana KNOWS it is working with outdated source - but runs anyway.... -
@AnneRanch
I think what @J-Hilk suggests is: uncheck that Always deploy project before running it. Does that make the Run button then not do an extra build before launching your application?...there got to be a pony in here somewhere....
Please - somebody take this seriously
Yesterday I did "build" and then "run" - the "run" took off IMMEDIATELY, no build / rebuild /etc
It just run.Today - same project - keeps rebuilding after each "build" and also rebuilds again when "run" is selected.
This is not right.
Please do not sidetrack by blaming on version etc. - I have not changed verison for weeks,
As I pointed out - this has been a standard procedure since DOS 1,1- only files with changes shlud be rebuild,
REPLAY
DONE - removed "deploy" .option same s...t as before
Yesterday all was as expected , today "build" does build and "run" REPEATS the build....
I sure like to resolve this mess.
Can anybody come up with real , documented definitions of terms
options of "project" sub-menu>? ?Then we can figure out what options controls it.
" run" builds project if necessary and runs the project (with green arrow (why?) ??)
"build" builds ONLY changed source...
"rebuild" rebuilds the entire project
"clean" deletes all executable project files
'deploy" ??????? -
As I already said - your modification times of your files were mixed up. Your generated object files had a newer timestamp than your source files and therefore
make
thought there is nothing new and nothing needs to compile. Maybe the files only had an offset of some hours so today the object files were older than your sources andmake
needed to recompile your object files due to this.
This can happen when you e.g. modify your local time on the PC. -
As I already said - your modification times of your files were mixed up. Your generated object files had a newer timestamp than your source files and therefore
make
thought there is nothing new and nothing needs to compile. Maybe the files only had an offset of some hours so today the object files were older than your sources andmake
needed to recompile your object files due to this.
This can happen when you e.g. modify your local time on the PC.@Christian-Ehrlicher You are trying to dilute the issue by making ridiculous assumptions.
So for your enjoymentIn a nutshell
If I run "build" and IMMEDIATELY run "run"
I do not expect "build" to be processed again.THAT is a subject of a bug I have posted, hence no more speculations here are necessary.
In the meantime I am still looking for official documentation of options
run, build , rebuild, deploy
PS
As a bonus - can somebody identify the PURPOSE of green arrow next to "run" option ? -
@Christian-Ehrlicher You are trying to dilute the issue by making ridiculous assumptions.
So for your enjoymentIn a nutshell
If I run "build" and IMMEDIATELY run "run"
I do not expect "build" to be processed again.THAT is a subject of a bug I have posted, hence no more speculations here are necessary.
In the meantime I am still looking for official documentation of options
run, build , rebuild, deploy
PS
As a bonus - can somebody identify the PURPOSE of green arrow next to "run" option ?@AnneRanch said in "dirty fiile " option ?:
You are trying to dilute the issue by making ridiculous assumptions.
No, I just know what
make
is doing under the hood and how it knows when to rebuild a source or when not. No QtCreator problem at all... -
Here are some definitions.
https://doc.qt.io/qtcreator/creator-glossary.html
...and here it one of interest
Run configuration Starts the application in the location where it was copied by the deploy configuration. By default, when you run a project, Qt Creator builds it, deploys it to the device specified in the selected kit, and runs it there. However, if you have not made any changes to the project since you last built and deployed it, Qt Creator simply runs it again.
The source of problem is in option
always deploy before run
and in
...Qt Creator builds it, deploys it to the device specified...Qt Creator DOES NOT build when only "Run" is used .
I am not interested in verifying the "deploy" BUT apparently the "deploy" option does "build" which is NOT what the above definition of "Run" is saying - if its sequence means anything "...builds it, deploys it to the device specified in the selected kit, and runs.." then it MUST fail the way it does.
Mixing deploy / build / run the way this document does needs some serious explanation...
since the doc has no visible relations with actual settings of tool optionsor just call this an unpleasant experience and move on ...
-
@Christian-Ehrlicher You are trying to dilute the issue by making ridiculous assumptions.
So for your enjoymentIn a nutshell
If I run "build" and IMMEDIATELY run "run"
I do not expect "build" to be processed again.THAT is a subject of a bug I have posted, hence no more speculations here are necessary.
In the meantime I am still looking for official documentation of options
run, build , rebuild, deploy
PS
As a bonus - can somebody identify the PURPOSE of green arrow next to "run" option ?@AnneRanch said in "dirty fiile " option ?:
In a nutshell
If I run "build" and IMMEDIATELY run "run"
I do not expect "build" to be processed again.THAT is a subject of a bug I have posted
Set your computer's clock to 10 years into the future. That should stop "build" from being processed again if you run "build" and immediately run "run".