You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am testing with the Fable.LitRouter and LitState but it requires 1.4.2, I get compilation error if I get 1.4.2 but if I downgrade to 1.4.1 then there's no error. This is just showing in Jetbrain's Rider. If I compile with npm run start then there's no error.
Looking at the commit history/release notes there shouldn't be anything that should affect this in 1.4.2.
Looking at the release notes there shouldn't be any impact on the Elmish/Lit libs.
For reference this is the sample code that I tried and updating new variables to make it minimal
let initialState1() =
let monitorPageModel, monitorPageMsg = ListMonitorsPage.init()
let welcomePageModel, welcomePageMsg = WelcomePage.init()
let model = { CurrentPage = Anonymous AnonymousPage.Welcome; ServerMessage = []; MonitorModel = monitorPageModel; WelcomePageModel = welcomePageModel }
model, Cmd.none
let update1 msg model =
model, Cmd.none
let view1 model dispatch =
html $"""
<div>Hello world</div>
"""
Program.mkProgram initialState update view
|> Program.withLit "my-app"
|> Program.withBridgeConfig (Bridge.endpoint socketEndpoint |> Bridge.withMapping ServerMsg)
|> Program.run
Update:
Looks like something in these two packages are causing the compiler to get confused.
Hmm, not sure what's the problem here but unfortunately we've seen similar issues in the past. This sometimes happens because of type inference in F#, we may do an "innocent" change to a function without type annotations and this may subtly break the signature without us noticing. Because Fable compiles from sources, the type inference in that case works, but in the IDE on when using dotnet build the problem may surface.
I'll try to investigate but in the meantime your solution of adding the source of Fable.LitRouter directly to your project should work. Hopefully publishing a new version of Fable.LitRouter that depends on Fable.Lit 1.4.2 should work too. Sorry for the hassle!
I am testing with the Fable.LitRouter and LitState but it requires 1.4.2, I get compilation error if I get 1.4.2 but if I downgrade to 1.4.1 then there's no error. This is just showing in Jetbrain's Rider. If I compile with npm run start then there's no error.
Looking at the commit history/release notes there shouldn't be anything that should affect this in 1.4.2.
Looking at the release notes there shouldn't be any impact on the Elmish/Lit libs.
For reference this is the sample code that I tried and updating new variables to make it minimal
Update:
Looks like something in these two packages are causing the compiler to get confused.
If I remove that and just keep Lit to 1.4.2 it has no compile error
I've narrowed it down. It's the Fable.LitRouter that's causing an issue. Not sure where the source code for LitRouter is?
I extracted the library and I don't get any errors, so not sure why this is happening?
I removed the Fable.LitRouter and just created a separate fs file from https://nuget.info/packages/Fable.LitRouter/1.0.0-beta-005 Maybe @JordanMarr knows?
The text was updated successfully, but these errors were encountered: