Can a new file change existing code paths?

We’re in the process of making our CI system at work more efficient – making it smarter about what changes have happened, and paring down the build to only run CI processes that are relevant. One of the proposals struck me as interesting: if the only changes are newly-created files, then that calls for a build but not a redeploy, because a new file that is not referenced by changes in the existing ones can’t change the system behavior.

Is this true? My gut instinct is to say not, but I’m really not sure. Scope is a subtle topic, and I suspect there are ways in which a new file (especially a package object) could wind up changing the behavior of existing code. OTOH, I’m having trouble coming up with examples that I’m confident in.

I’d be curious to get thoughts on this, especially from folks who know the innards better than I do…

Yes, even without package objects you need to take into account package-wide wildcard imports which can even break incremental compilation: Zinc doesn't support wildcard-imported 'name' and 'implicit' shadowing · Issue #226 · sbt/zinc · GitHub

Mmm – good point. Thanks!