Skip to content

Support NRT (nullable reference types / nullness annotation) #112

Description

@jwosty

Attempting to build a fresh SAFE stack template after upgrading everything to latest and turning on <Nullable>enable</Nullable> results in some compile errors from this library:

.\output\fable_modules\Fable.Elmish.React.5.0.1\common.fs(11,62): (11,67) error FSHARP: A type parameter is missing a constraint 'when 'P: not null' (code 1)
.\output\fable_modules\Fable.Elmish.React.5.0.1\common.fs(11,62): (11,67) error FSHARP: Type constraint mismatch. The type     ''P'    is not compatible with type    'obj' (code 193)
.\output\fable_modules\Fable.Remoting.MsgPack.1.25.0\Write.fs(792,21): (792,22) error FSHARP: A type parameter is missing a constraint 'when 'T: not null' (code 1)
.\output\fable_modules\Fable.SimpleJson.3.24.0\SimpleJson.fs(88,32): (88,36) error FSHARP: The constraints 'null' and 'not null' are inconsistent (code 43)
.\output\fable_modules\Feliz.3.1.1\React\React.fs(42,47): (42,51) error FSHARP: The constraints 'null' and 'not null' are inconsistent (code 43)
.\output\fable_modules\Feliz.3.1.1\React\React.fs(45,44): (45,48) error FSHARP: The constraints 'null' and 'not null' are inconsistent (code 43)
.\output\fable_modules\Feliz.3.1.1\React\React.fs(56,47): (56,51) error FSHARP: The constraints 'null' and 'not null' are inconsistent (code 43)
.\output\fable_modules\Feliz.3.1.1\React\React.fs(58,44): (58,48) error FSHARP: The constraints 'null' and 'not null' are inconsistent (code 43)
.\output\fable_modules\Feliz.3.1.1\React\React.fs(70,45): (70,49) error FSHARP: The constraints 'null' and 'not null' are inconsistent (code 43)
.\output\fable_modules\Feliz.3.1.1\React\React.fs(73,42): (73,46) error FSHARP: The constraints 'null' and 'not null' are inconsistent (code 43)
.\output\fable_modules\Feliz.3.1.1\React\React.fs(419,26): (419,36) error FSHARP: A type parameter is missing a constraint 'when 'props: not null'. See also C:/Code/AdBridge/src/AdBridge.Client/output/fable_modules/Feliz.3.1.1/React/React.fs(419,25)-(419,35). (code 43)
.\output\fable_modules\Fable.SimpleJson.3.24.0\Json.Converter.fs(682,41): (682,70) error FABLE: System.Uri.ToString is not supported by Fable

Project builds fine with NRT disabled, so I'm assuming it's just some annotation issues.

Related: fable-compiler/Fable#3887

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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