Skip to content

incremental precompile warning turned into error: breaking? #52213

@aplavin

Description

@aplavin

Tried out 1.10rc for a bit recently, and got this error a few times:
ERROR: LoadError: Method overwriting is not permitted during Module precompile.
As I understand, this error was added deliberately, which really surprised me: it's basically the definition of a breaking change, explicitly making code that worked fine before to error now.

In previous versions, this was a warning that only appeared during precompilation (so users rarely even saw it), and it didn't really indicate that the code uses some internals and could break after updating Julia:

│  WARNING: Method definition <...> overwritten in module <...>.
│    ** incremental compilation may be fatally broken for this module **

I even found a discourse thread (https://discourse.julialang.org/t/what-is-incremental-compilation-and-what-does-it-mean-for-it-to-be-broken/100956) where Tim Holy directly states that everything is supposed to work with this warning, just with slower compilation/loading/invalidations.

So, should this breaking change be reverted?
And, probably, the warning text made cleaner: I saw it several times, but never had an idea what "incremental compilation" means and why would I be worried about it. Looking at discussions, I'm not alone in this.

See a recent slack thread https://julialang.slack.com/archives/C67910KEH/p1699434379137429 for more discussion and examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs newsA NEWS entry is required for this change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions