-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack fails with 'Original message: Invalid value' #2251
Comments
No worries @absolutejam! Actually I check GH issues much more often than chat channels (although other Fable users can sometimes help in the Gitter channel). Unfortunately, that error message seems to come from the F# compiler and not Fable itself (Fable calls F# compiler first to parse and type check the source code), so I'm not sure what could be the reason 🤔 Also, because we're a small item, we are currently focused on deliver Fable 3 so it's difficult to investigate an issue like this in Fable 2. Would it be possible to upgrade and check if the error is still happening in Fable 3? You can see an example of how to upgrade a Fable 2 app using Webpack here: MangelMaxime/fulma-demo#43 |
Thanks for getting back to me @alfonsogarciacaro. Ah I see; I didn't realise that was coming from the compiler. Was hoping to jump to Fable 3 after watching F# eXchange, but didn't want to add something else into the mix. I have done that now, but sadly I've gotten the same issue, but Is there some kind of mis-match between {
"sdk": {
"version": "3.1.300"
}
} Console output
|
In principle, latest Fable version contains the latest FCS (F# compiler services) code so it's equivalent to the F# 5 compiler, but it's still a netcoreapp3.1 should fine to run it with dotnet sdk 3.1.300. Things you can try:
If nothing of these works I would have to debug to spot where the error is happening, so it'd be nice to have access to the repo. |
I tried the above, but no progress. So I moved the So, I then tried transpiling module RealmWeaver.Core.Infrastructure.EventCodec
open FsCodec
/// Uses the supplied codec to decode the supplied event record `x`
let tryDecode
(codec: IEventCodec<_, _, _>)
(streamName: StreamName)
(event: ITimelineEvent<byte[]>) =
match codec.TryDecode event with
| None -> None
| x -> x Which has the type: val tryDecode:
codec : IEventCodec<'a,byte array,'b> ->
streamName: StreamName ->
event : ITimelineEvent<byte array>
-> option<'a> This actually compiles okay if I change it to: let tryDecode<'a, 'b>
(codec: IEventCodec<'a, byte array, 'b>)
(streamName: StreamName)
(event: ITimelineEvent<byte[]>) = but ultimately, I don't even need this in my Moreover, I've noticed a load of errors regarding functions that cannot be resolved or functions that need to be inlined. If these are not going to be used in my frontend/don't need to be transpiled, is there a directive or something I can use to exclude them? The problem is, this project ( ...Or am I just sidestepping the issue by conditionally compiling/ignoring parts? |
Thanks a lot for investigating so much @absolutejam! We have identified a problem in #2252 that may be related, can you please try updating to 3.0.0-nagareyama-rc-002? Running this should work:
|
So ultimately, I went through some part of the referenced However, I've now bumped into the issue that Fable can't process the Is there a way to skip this with Fable, since it's not actually referenced directly in my |
Hmm, we could add System.Linq to the .NET references allowed by Fable, but we're trying to limit the number to reduce memory usage. If there are not so many files in the Core project used by Client, would it be possible to just include links to those files directly instead of the Core project reference? That way you can control the dependencies from the client project. I did try to run FSharp.Control.AsyncSeq tests with Fable 3 and it worked: fsprojects/FSharp.Control.AsyncSeq#121 |
Totally understand; I was thinking more of how I can best sort this issue out at my end. I've instead split out my Thanks for you help and continued work on this amazing project! |
Awesome @absolutejam, great to hear you made it work! Thanks to you for your collaboration and your patience, please don't hesitate to reopen if you've any other question 👍 |
Description
(Apologies for creating this as an issue, but I've tried the web channel in the F# Slack to no avail and didn't know what other avenues might be appropriate for a debugging-focussed discussion)
So, I have a project that I was working on but I'd taken a break (half-way through a big spike), and when I've come back to it, I can no longer build the frontend.
I have tried stripping chunks out (where possible) and rolling back to a previous commit, but at the moment I'm not sure where the issue is even originating.
A simple
dotnet build src/Client/Client.fsproj
works and VSCode presents no actual errors that would stop compilation, but when I try to run my Fake build script which callsyarn webpack-dev-server --verbose
, I get the following error:I've tried the usual suspects of clearing
bin
,obj
&node_modules
. Honestly, I'm kinda stumped to the actual flow of debugging something that's happening at the point.Repro code
Erm, I can provide this but it's an entire (messy & WIP) codebase, so I was more hoping for hints on how to debug something this cryptic to begin with and maybe I can narrow it down to something that might be causing the issue.
Expected and actual results
Please provide the expected and actual results.
Related information
2.13.0
2.1.9
5.0.100-rc.1.20452.10
The text was updated successfully, but these errors were encountered: