-
Notifications
You must be signed in to change notification settings - Fork 50
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
The new VS 17.12.1 seems to have broken WS 4.x builds #1416
Comments
Are those projects correctly referenced and passed to the compiler? These errors come from before the WebSharper compilation. |
Yes I ran a detailed verbosity MSBuild and i can see the WsFsc.exe command line and it does include -r: args for each expected project reference assembly. If i comment out the |
It should be noted that other WS projects build okay (in same solution) but these particular WS projects don't reference any other project assemblies. So the issue appears to be purely related to referenced project assemblies not behaving as before. |
@Jand42 Any idea what's going on here? |
I have the .rsp file that gets passed into the WsFsc command line. Am trying to hack around with the .rsp file to see if there is some args to remove/add or otherwise tweak that might help... |
So the WsFsc produces a clear This means the references going in are valid. But when it performs the compilation, none of the types/namespaces etc in those referenced assemblies can be resolved. |
If you ilspy those assemblies, do they contain what you expect? |
Yeah I used a decompiler and they seem to be fine. They contain the types that wsfsc says are missing. |
If you replace the offending project references with direct file references, does it make a difference? |
Do you mean replace the SDK-style in the fsproj with the non-SDK style way of referencing projects? I tried reverting those to how they were some years ago before we refactored to SDK-style projects - and it appears to have made no difference to the errors coming out of wsfsc The |
Okay changing to:
This kind of approach seems to make a difference to wsfsc (!) I will change them all to this style and see how that goes. What could be the root cause of this though? This feels a bit odd to have happened? |
Unfortunately whilst this fix seems to want to work, it doesn't work reliably. I can't quite pin down why it works for a while, but then stops working. |
Using VS Build Tools LTSC 17.10.9 as the msbuild tool seems to make the build issues go away. So is a regression in MSBuild 17.12 ? Only issue is that VS 17.12.9 will frequently mess with the build output and require me to restore package via the older msbuild tool. |
If I replace all WebSharper error FS9001: Unhandled F# compiler generated constructor I am not sure whether this indicates the binary produced by the newer FSC is somehow incompatible with WSFSC - or whether this issue has arisen because of the changes to how projects are referenced. |
Okay it looks like these WS errors can be worked around by creating more proxy types and just spending time on going through the errors. I'm guessing the changes to the project references has broken some technique that WSFSC was using to resolve those projects to find the original types, at least those which didn't need explicit proxy impls. That's odd? Maybe there is a solution to reinstate that behaviour somehow. |
Thank you for the discord suggestion - an invite would be warmly received by myself (and not just for this issue). We are looking to update WS next year; there is a lot of work involved as you can probably imagine. This product is still on net48 and on an OWIN stack. From what I can see WS stopped supporting OWIN some years ago - so we need to migrate the entire OWIN hosting to AspNetCore first. Although, I think AspNetCore does have a OWIN-compat shim that might help us defer some of the porting costs until later - but I don't know if this compat shim has major cons or is even compatible with WS5/6/7/8 For us, right now, it would be best to resolve this build issue in the new MSBuild so that we have sufficient time to properly plan and execute the overall tech stack upgrade. |
I have created an issue on the MSBuild project as my current thought process is that if it works on MSBuild 17.10 but does not work on 17.12 then this is a behavioural regression that they will surely want to know about. |
@nbevans Here is the Discord invite - https://discord.gg/s4nDcXnP |
The WS compiler seems unable to "see" any referenced types in other project files. It is emitting hundreds of
typecheck error FS0039: The type 'MyType..' is not defined.
from all over the project.Has anyone else encountered this?
The text was updated successfully, but these errors were encountered: