-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resources rebuilt unncessarily during install or on subsequent builds. #95
Comments
Does my recent commit fix this? |
Joseph, unfortunately, no. Building of build/resources.os is still performed in install target, so the default targets get rebuilt. |
Joseph. |
I'm not sure why |
Joseph, |
Joseph, I have the hypotesy. Then, the next thing (just after the default target build):
this explains everything, but the fact that you do not observe the similar behavior. Unfortunately, I am not capable to fix this properly in a reasonable time: despite of my thirty five years experience in sw engineering, the functional languages are above my procedural way of thinking... Regards, Edit: |
Yeah
Did you remove the license files from |
Ah, yes, I forgot to mention that any third-party code is removed in the %prep phase, so there is only two subdirectories under src/: cbang and resources. also, all licenses from /resources/licensed removed except cbang.txt. This is to ensure that no third-party code is used in build |
Yes, I think that if lib source is disabled by disable_local, then appropriate license should not be included as well. The reason to include license texts at all is obvious. |
Two more things to start the install target build using commands I posted above:
|
Joseph, #99 does not fix the issue with wrong deps list yet: Regards, |
Joseph, The problem's source is identified.
One more confirmation (from
Regards, |
Joseph, it looks like the list of dependencies includes whatever is in the supplied source directory as you use simple directory scanner in defining resources builder. I understand that this does not influences outcome, the worst it could do is just trigger unnecessary re-builds when something get touched in the source directory, that is not my case anyway. Regards, |
This seems to be the exact same problem: https://jira.mongodb.org/browse/SERVER-33111 It looks like they fixed it by patching scons but the fix was apparently not applied upstream. Edit1: Actually, it was applied upstream: SCons/scons#2811 I'm still having what appears to be the same problem with scons v4.0.1 |
I've created a simplified test case which exhibits the bug. scons-v4.0.1-generated-file-rebuild-on-install-bug-20220926.zip Running
Then run
It rebuilds every time I switch from It appears that running |
Joseph
No, not only in this situation. Try this:
On first invocation of scons it rebuilds resources as there are no cpp files By the way, I completed the #99. Now it does not include unnecessary licenses and also builds proper dependencies lists, so the mod time check inside resources_build no longer needed. Regards, |
It will rebuild on each invocation like this too:
|
Yes, I did not check all possible combinations :) |
My scons also has that "fix" applied. It seems that scons has more problems with tracking dependencies correctly when a builder adds additional targets. Thanks for helping track this down. It would be great if we could find a solution that does not require modifying scons but you work around is ok for your situation and the extra rebuilding does not bother me too much so it's probably not a high priority issue. |
I've reopened this issue to track the bug even though the true bug is upstream in scons. |
Dear Joseph,
for some reason, the install target triggers rebuild of build/resources.os, which in turn makes the default target out of date.
Could you please change this behavior, so when there is no actual need to rebuild the default target (it was just successfully built), it is not linked again by 'scons install' invocation.
The text was updated successfully, but these errors were encountered: