Support NRT (nullable reference types / nullness annotation)

Open
#112 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
react
Domain
frontend

Research direction

Reproduce a fresh SAFE stack build with enable and inspect the reported files under output/fable_modules, including Fable.Elmish.React/common.fs, Fable.Remoting.MsgPack/Write.fs, Fable.SimpleJson, and Feliz/React/React.fs. Compare the failures with the related Fable issue; done means the stack builds successfully with nullable reference types enabled.

Written by the indexing model from the issue text.

Description

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: https://github.com/fable-compiler/Fable/issues/3887

Dominant language
F#
Stars
112
Forks
20
Avg merge
19h 52m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from elmish/react

All issues in elmish/react

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.