Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. "dirty fiile " option ?
QtWS25 Last Chance

"dirty fiile " option ?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
30 Posts 7 Posters 3.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by Anonymous_Banned275
    #1

    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.

    1 Reply Last reply
    0
    • andrA Offline
      andrA Offline
      andr
      wrote on last edited by
      #2

      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.

      A 1 Reply Last reply
      0
      • andrA andr

        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.

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #3

        @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

        JonBJ 1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • A Anonymous_Banned275

            @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

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @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.

            A 1 Reply Last reply
            0
            • JonBJ JonB

              @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.

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #6

              @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...

              JonBJ 1 Reply Last reply
              0
              • A Anonymous_Banned275

                @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...

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @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.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Anonymous_Banned275
                  wrote on last edited by
                  #8

                  BUMP FYI

                  This is how normal , no need to re-compile , "compile output" , looks when banana is working correctly....

                  0a70370b-f348-4ba5-924e-6585991256c9-image.png

                  1 Reply Last reply
                  0
                  • kkoehneK Offline
                    kkoehneK Offline
                    kkoehne
                    Moderators
                    wrote on last edited by
                    #9

                    @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)

                    Director R&D, The Qt Company

                    A 1 Reply Last reply
                    1
                    • kkoehneK kkoehne

                      @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)

                      A Offline
                      A Offline
                      Anonymous_Banned275
                      wrote on last edited by
                      #10

                      @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 immaterial

                      If 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.

                      JonBJ J.HilkJ 2 Replies Last reply
                      0
                      • A Anonymous_Banned275

                        @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 immaterial

                        If 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.

                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by JonB
                        #11

                        @AnneRanch
                        Qt doesn't decide what to (re)compile, it's the make it calls which does. As per the screenshot you showed. The question is why does that make seem to recompile before Run when the make 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.

                        1 Reply Last reply
                        0
                        • A Anonymous_Banned275

                          @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 immaterial

                          If 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.

                          J.HilkJ Offline
                          J.HilkJ Offline
                          J.Hilk
                          Moderators
                          wrote on last edited by
                          #12

                          @AnneRanch change this setting on your own risk:

                          45ef14ee-61c9-478e-a556-332c3660707d-image.png

                          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"


                          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                          Q: What's that?
                          A: It's blue light.
                          Q: What does it do?
                          A: It turns blue.

                          1 Reply Last reply
                          1
                          • A Offline
                            A Offline
                            Anonymous_Banned275
                            wrote on last edited by
                            #13

                            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.

                            9a57c9bf-70a5-4185-b47d-09968b801b12-image.png

                            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 saying

                            BEFORE "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"....

                            5d9b25bd-3459-440c-be7e-3cdb8b1dce99-image.png

                            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....

                            JonBJ 1 Reply Last reply
                            0
                            • A Anonymous_Banned275

                              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.

                              9a57c9bf-70a5-4185-b47d-09968b801b12-image.png

                              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 saying

                              BEFORE "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"....

                              5d9b25bd-3459-440c-be7e-3cdb8b1dce99-image.png

                              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....

                              JonBJ Offline
                              JonBJ Offline
                              JonB
                              wrote on last edited by JonB
                              #14

                              @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?

                              A 1 Reply Last reply
                              0
                              • JonBJ JonB

                                @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?

                                A Offline
                                A Offline
                                Anonymous_Banned275
                                wrote on last edited by
                                #15

                                ...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" ???????

                                1 Reply Last reply
                                0
                                • Christian EhrlicherC Offline
                                  Christian EhrlicherC Offline
                                  Christian Ehrlicher
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  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 and make needed to recompile your object files due to this.
                                  This can happen when you e.g. modify your local time on the PC.

                                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                  Visit the Qt Academy at https://academy.qt.io/catalog

                                  A 1 Reply Last reply
                                  1
                                  • Christian EhrlicherC Christian Ehrlicher

                                    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 and make needed to recompile your object files due to this.
                                    This can happen when you e.g. modify your local time on the PC.

                                    A Offline
                                    A Offline
                                    Anonymous_Banned275
                                    wrote on last edited by
                                    #17

                                    @Christian-Ehrlicher You are trying to dilute the issue by making ridiculous assumptions.
                                    So for your enjoyment

                                    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, 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 EhrlicherC JKSHJ 2 Replies Last reply
                                    0
                                    • A Anonymous_Banned275

                                      @Christian-Ehrlicher You are trying to dilute the issue by making ridiculous assumptions.
                                      So for your enjoyment

                                      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, 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 EhrlicherC Offline
                                      Christian EhrlicherC Offline
                                      Christian Ehrlicher
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      @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...

                                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                      Visit the Qt Academy at https://academy.qt.io/catalog

                                      1 Reply Last reply
                                      1
                                      • A Offline
                                        A Offline
                                        Anonymous_Banned275
                                        wrote on last edited by
                                        #19

                                        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 options

                                        or just call this an unpleasant experience and move on ...

                                        J.HilkJ 1 Reply Last reply
                                        0
                                        • A Anonymous_Banned275

                                          @Christian-Ehrlicher You are trying to dilute the issue by making ridiculous assumptions.
                                          So for your enjoyment

                                          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, 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 ?

                                          JKSHJ Offline
                                          JKSHJ Offline
                                          JKSH
                                          Moderators
                                          wrote on last edited by
                                          #20

                                          @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".

                                          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved