fable-compiler / Fable

F# to JavaScript, TypeScript, Python, Rust and Dart Compiler
http://fable.io/
MIT License
2.93k stars 301 forks source link

4.22.0 release fails to build project with Fulma dependency #3925

Open skir opened 1 month ago

skir commented 1 month ago

Description

Hello, I have a project that uses Fable and depends on Fulma for UI rendering. After I upgraded my Fable version to 4.22.0, my builds started to fail with this error:

.\src\fable_modules\Fulma.3.0.0\Elements\Button.fs(1,1): (1,1) error FSHARP: The module/namespace 'System' from compilation unit 'netstandard' did not contain the namespace, module or type 'ReadOnlySpan`1' (code 193)
.\src\fable_modules\Fulma.3.0.0\Elements\Tag.fs(1,1): (1,1) error FSHARP: The module/namespace 'System' from compilation unit 'netstandard' did not contain the namespace, module or type 'ReadOnlySpan`1' (code 193)

Previously I used 4.19.3 release with no issues. I also tried to build with 4.20.0 and 4.21.0 and got no errors.

Related information

ncave commented 1 month ago

@skir Yes, that seems to be the case when targeting netstandard2.0, not sure why. As a workaround, you can try targeting net8.0 (or some other TFM), seems to help.