Page MenuHomeFreeBSD

build: Switch CLEAN back off by default, again
ClosedPublic

Authored by kevans on Fri, Aug 15, 7:37 PM.
Tags
None
Referenced Files
F126670812: D51923.diff
Fri, Aug 22, 9:59 AM
Unknown Object (File)
Thu, Aug 21, 7:47 PM
Unknown Object (File)
Wed, Aug 20, 8:13 PM
Unknown Object (File)
Wed, Aug 20, 4:15 AM
Unknown Object (File)
Mon, Aug 18, 1:26 PM
Unknown Object (File)
Sat, Aug 16, 2:36 PM

Details

Summary

Now that we have the notion of a build epoch, we have sufficient tooling
to handle changes that might need a larger hammer to unbreak the build.

Future changes may extend our cleanup to avoid scenarios like with the
MITKRB5 knob where flipping it will still require a cleanup, but on the
whole most users aren't regularly flipping breaking knobs enough for
this to cause the same level of problems. Those users are advised to do
a CLEAN build when they flip it until we start recording build options
and doing another clean for important knob switches.

When knobs of that sort are newly introduced or switch defaults, we can
explicitly record an epoch for them in the interim until
option-switching is detected and handled properly.

This reverts commit 6dab48b9de6c1bff61b0ce78029c1e3cba20895a.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66272
Build 63155: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Fri, Aug 15, 7:41 PM
markj added inline comments.
UPDATING
35

I know it was like this before, but it really bugs me that the user has to somehow know about this footgun and deal with it manually. Builds should be reliable by default, so IMO we should still automatically clean the object tree if any src.conf options change.

tools/build/options/WITH_CLEAN
1

Should we mention the clean build epoch file here or in build.7 or both?

UPDATING
35

Right, that's still planned work, it's just noting it here explicitly until that's done

UPDATING
35

I'll try to have a prototype of that ready by Friday.

tools/build/options/WITH_CLEAN
1

bothisgood.gif

tools/build/options/WITH_CLEAN
1

I have this change staged locally that I intend to push with this one:

diff --git a/tools/build/options/WITH_CLEAN b/tools/build/options/WITH_CLEAN
index d5962258bcc0..0bb05e33371b 100644
--- a/tools/build/options/WITH_CLEAN
+++ b/tools/build/options/WITH_CLEAN
@@ -1 +1,4 @@
 Clean before building world and/or kernel.
+Note that recording a new epoch in
+.Pa .clean_build_epoch
+in the root of the source tree will also force a clean world build.

I'm going to update build(7) separately because it hasn't yet made it past the NO_CLEAN -> WITHOUT_CLEAN switch.

tools/build/options/WITH_CLEAN
1

s/source tree/object tree/

Seems ok to me otherwise.

tools/build/options/WITH_CLEAN
1

I think that suggests we might want a different wording entirely. I was trying to capture the thing that a developer would need to do to force a clean build (alter the file in their source tree), but I think your point is more about giving them the tools to understand if the next build will be clean or not?

tools/build/options/WITH_CLEAN
1

My comment is just wrong, sorry. I was reading depend-cleanup.sh and confused the purpose of .clean_build_epoch in the source and object trees. I think your proposal is ok: this documentation is for developers who just want to build the tree, not to understand how it works.