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

WebSharper 4 -- obscure error if WebSharper output is not specified #934

Closed
nightroman opened this Issue Mar 30, 2018 · 1 comment

Comments

Projects
2 participants
@nightroman

nightroman commented Mar 30, 2018

Given WebProjectOutputDir is missing in the project file and outputDir is
missing in wsconfig.json, dotnet build fails with a very obscure error:

FSC : WebSharper error FS9001: Global error 'The option value was
None↔Parameter name: option' at    at
Microsoft.FSharp.Core.OptionModule.GetValue[T](FSharpOption` 1 option)↔   at
WebSharper.Compiler.CommandTools.ExecuteCommands.Unpack(WsConfig settings)↔
at WebSharper.FSharp.Program.Compile$cont@191-2(WsConfig config, Boole an
isBundleOnly, Loader loader, FSharpList`1 refs, Task`1 wsRefsMeta, Compilation
comp, Unit unitVar)↔   at WebSharper.FSharp.Program.Compile$cont@61(WsConfig
confi g, WarnSettings warnSettings, String thisName, Unit unitVar)↔   at
WebSharper.FSharp.Program.compileMain$cont@271(String[] argv, Unit unitVar)↔
at WebSharper.FSha rp.Program.main(String[] argv)
[C:\Users\...]

It is a user error indeed that the output is not specified. But it is not impossible.
It happened to me on converting a WebSharper v3 project to v4.
Due to the obscure error, it took a long time to find my mistake.

@nightroman nightroman changed the title from WebSharper 4 -- not useful error if WebSharper output directory is missing to WebSharper 4 -- obscure error if WebSharper output is not specified Mar 30, 2018

@Jand42

This comment has been minimized.

Member

Jand42 commented Apr 3, 2018

Thanks for the report! Error reporting around unpacking will need to be revised and improved for #664 anyways, so this will definitely will be improved in version 4.3. In the meantime, a descriptive error will be given in the next bugfix release.

@Jand42 Jand42 added this to 4.2.VNext in Releases Apr 17, 2018

@Jand42 Jand42 closed this in 4891566 Apr 17, 2018

@Jand42 Jand42 added the 4.2.9.256 label Apr 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment