SITUATION: 1. Sometimes, because full rebuild takes quite a long time, I resume compilation at another day. 2. Or: After a long pause I resume work on a KDE project. From time to time I wonder if I got the needed environment variables right (or forget to set them) in bash. Then, the building of modules is running long time after which I find out I did something wrong in the beginning and I have to start over again. WISH: Could kdesrc-build print a warning if the current relevant environment variables differ from the previous/desired ones and ask me if I really want to continue?
It *could* do this, the infrastructure I would use to implement this (hashing of option values and persistent data storage) already exist. The question would be which env vars to monitor. *But*, you may want to consider the set-env global option in your kdesrc-buildrc to ensure that critical environment variables are set by kdesrc-build itself. See https://docs.kde.org/trunk5/en/extragear-utils/kdesrc-build/conf-options-table.html#conf-set-env
Yes, this can be controlled by set-env for those variables you need. But it already set the needed one. Those the extra - that is your responsibility, not tool's.