Skip to content

__precompile__(false) in extensions is not applied correctly #56213

Open
@topolarity

Description

@topolarity

It looks like we're not properly modeling for __precompile__(false) in extensions:

Although, in some scenarios it leads to

│  ┌ Error: Error during loading of extension FlexiMapsDictionariesExt of UnionCollections, use `Base.retry_load_extensions()` to retry.
│  │   exception =
│  │    1-element ExceptionStack:
│  │    Error when precompiling module, potentially caused by a __precompile__(false) declaration in the module.

...

Originally posted by @aplavin in #56204

We should either:

  1. ban __precompile__(false) in extensions
  2. handle __precompile__(false) specially in extensions so that it is non-viral (which means updating loading to avoid loading this extension during pre-compilation)
  3. handle __precompile__(false) the same way we always do - make it viral and exclude all loading packages from pre-compilation

My vote is (1) or (2), because (3) seems very surprising and goes against the grain of "optional functionality" that extensions generally provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorpackage extensionspackagesPackage management and loading

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions