Closed rommsen closed 6 years ago
As a followup: when I do not reference the Server
project anymore but only reference single files (like here in current master) everything seems to work.
To sum up
it breaks when: Client references Server and Domain Server references Domain
it does not break when: Client references Domain and single files from Server Server references Domain
Not sure if it's exactly the same issue, but it's true Fable can get confused if the same daemon is compiling two or more projects in parallel by using a Webpack file with multiple configurations. To avoid this, you can pass the extra.projectFile
option to fable-loader to help the daemon locate files belonging to different projects.
If this doesn't work, the best option is to use something like concurrently and the --port free
Fable option to start two daemons in parallel for the compilation.
Hey @alfonsogarciacaro, thanks for answering.
Maybe I am not understanding correctly but I dont think that this is the problem. I am compiling only one Fable project. This project has references to other dotnetcore (not Fable) projects (here Domain
and Server
. Server
itself has a reference to Domain
). I get the error only when I start Client
(the Fable project) and Server
in parallel.
Maybe I just dont see it but i think that this is a different case than given in the links above.
Ah, sorry, I misread the description 😅 Yes, this seems to be a different issue, but I don't know what the problem is 😕 I would need more Fable-specific info (for example, what the error message is). Please also be sure there are no port conflicts. By default Fable uses 61225 but you can specify another one with the --port
parameter.
This seems to be solved with current dotnetcore. Thanks @enricosada 😄
A Fable project fails to compile when started in parallel with a project that it shares references with.
Example from this repo: (branch is
ParallelBuildProblems
):Fable Project: https://github.com/rommsen/ConfPlanner/blob/d4176d81035c9c7d87954783b1e046cf74db2464/src/Client/Client.fsproj#L6
Dotnetcore project: https://github.com/rommsen/ConfPlanner/blob/d4176d81035c9c7d87954783b1e046cf74db2464/src/Server/Server.fsproj#L8
Before I referenced single files from my
Domain
project in myClient
project, Now I am referencing the whole project in bothServer
andClient
The directory structure isapp/src/Client
andapp/src/Domain
. When I calldotnet fable yarn-start
fromapp/src/Client
everything works as expected but when I runClient
andServer
in parallel via FAKE I get all kind of errors:The FAKE script (
build run
) looks like this:It works when I change the line
Async.Parallel [| fablewatch; suave |]
toAsync.Parallel [| fablewatch|]
i.e. it works when fable and suave are not started in parallel. It only breaks when suave and fable are started in parallel.When I start them in different consoles everything works fine.
I am completely out of ideas.
Pinging @enricosada as discussed and @alfonsogarciacaro for completeness