Re: bug: --debug=explain gives wrong message
Bill Deegan <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CHg-=GAR=o7AfiwLoqZZyfd25cqg67cN5yNa5Ngv8akXA@mail.gmail.com> |
Gary, If any of those bugs matches this exact case, can you add your repro to it? If not, please file another. -Bill On Fri, Oct 15, 2021 at 10:39 AM Gary Oberbrunner <[email protected]> wrote: > You might look at #3684, #2997, #2996 and #2932 and see if they cover >> any of what you're seeing. > > > Yes, most of those are relevant to my issue. Thanks for the info! I won't > file a new bug; those cover it. Would love to see your better explain code > in SCons! > > -- Gary > > On Fri, Oct 15, 2021 at 1:32 PM Mats Wichmann <[email protected]> wrote: > >> >> On 10/15/21 10:04, Gary Oberbrunner wrote: >> > In some cases, --debug=explain gives the wrong message about why a >> > target is being rebuilt. >> > Try this: >> > >> > === SConstruct: >> > SConscript('src/SConscript-lictool', variant_dir='Build', duplicate=0) >> > >> > === src/SConscript: >> > import os >> > tgt=Command('tgt', ['src.txt'], f'echo hi {os.getpid()} > $TARGET') >> > >> > === src/src.txt: empty file >> > >> > Run "scons --debug=explain" twice. The first time it rebuilds because >> > tgt doesn't exist, that's correct. The second time, the actual reason >> it >> > rebuilds is because the build action changed (it's set up to change >> > every time you run it), but the message says that "src.txt is a new >> > dependency" which (a) isn't correct, and (b) isn't the actual reason >> for >> > the rebuild. >> > >> > The reason appears to be that `explain` in scons/node/__init__.py >> checks >> > the Nodes for the old & new dependencies, and somehow the old dep Node >> > is `src/src.txt` while the new one is `Build/src.txt`. So it spuriously >> > says that the deps have changed. And a second issue is that in >> `explain` >> > once it has printed one kind of reason, it stops looking for other >> > reasons, so it doesn't print that the build action has also changed. >> > That's as far as I've tracked it so far. >> >> There are several issues on explain, which has the unfortunate >> characteristic that it does its own computation, rather than using the >> determination made by the decider. I had some work in progress on >> improving the explain logic, but it ended up with some work Bill did and >> there didn't seem to be an appetite at the time to pursue the approach I >> had. >> >> You might look at #3684, #2997, #2996 and #2932 and see if they cover >> any of what you're seeing. >> _______________________________________________ >> Scons-users mailing list >> [email protected] >> https://pairlist4.pair.net/mailman/listinfo/scons-users >> > > > -- > Gary > _______________________________________________ > Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users