Skip to content

pub get and unsound null safety #2541

Closed
@mit-mit

Description

@mit-mit

Running pub get in a project with null safety enabled (via with lower SDK constraint), should fail if any of the resolved packages do not support null safety. It should print something like:

Because <name of current package> requires Dart 2.10 with null safety, 
and one or more dependencies do not support that, version solving failed.

<list of deps that don't support null safety>

It should be allowed to succeed if a --no-sound-null-safety flag is passed, but then should print a warning:

Warning: getting packages with unsound null safety! Consider upgrading all code to enable sound null safety.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions