@@ -1568,8 +1568,8 @@ static void method_overwrite(jl_typemap_entry_t *newentry, jl_method_t *oldvalue
1568
1568
jl_printf (s , ".\n" );
1569
1569
jl_uv_flush (s );
1570
1570
}
1571
- if (jl_options . incremental && jl_generating_output ())
1572
- jl_printf ( JL_STDERR , " ** incremental compilation may be fatally broken for this module **\n\n " );
1571
+ if (jl_generating_output ())
1572
+ jl_error ( "Method overwriting is not permitted during Module precompile. " );
1573
1573
}
1574
1574
1575
1575
static void update_max_args (jl_methtable_t * mt , jl_value_t * type )
@@ -1860,6 +1860,8 @@ static jl_typemap_entry_t *do_typemap_search(jl_methtable_t *mt JL_PROPAGATES_RO
1860
1860
1861
1861
static void jl_method_table_invalidate (jl_methtable_t * mt , jl_typemap_entry_t * methodentry , size_t max_world )
1862
1862
{
1863
+ if (jl_options .incremental && jl_generating_output ())
1864
+ jl_error ("Method deletion is not possible during Module precompile." );
1863
1865
jl_method_t * method = methodentry -> func .method ;
1864
1866
assert (!method -> is_for_opaque_closure );
1865
1867
method -> deleted_world = methodentry -> max_world = max_world ;
@@ -1911,9 +1913,6 @@ static void jl_method_table_invalidate(jl_methtable_t *mt, jl_typemap_entry_t *m
1911
1913
1912
1914
JL_DLLEXPORT void jl_method_table_disable (jl_methtable_t * mt , jl_method_t * method )
1913
1915
{
1914
- if (jl_options .incremental && jl_generating_output ())
1915
- jl_printf (JL_STDERR , "WARNING: method deletion during Module precompile may lead to undefined behavior"
1916
- "\n ** incremental compilation may be fatally broken for this module **\n\n" );
1917
1916
jl_typemap_entry_t * methodentry = do_typemap_search (mt , method );
1918
1917
JL_LOCK (& mt -> writelock );
1919
1918
// Narrow the world age on the method to make it uncallable
0 commit comments