Skip to content
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

WIP: Try adding support for TimeSpan.ToString() #1436

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MangelMaxime
Copy link
Contributor

Hello @Jand42,

I was trying to add support for TimeSpan.ToString() but I am facing an issue.

When trying to build the Tests/Web project I am getting this error:

WEBSHARPERTASK : WebSharper error WS9001: Error running WIG assembly: System.Exception: No ExtensionAttribute set on the input assembly   at WebSharper.Compiler.CommandTools.LoadInterfaceGeneratorAssembly(Stri  
ng file, LoggerBase logger) in C:\Users\mmangel\Workspaces\Github\dotnet-websharper\core\feat-add-timespan-to-string\src\compiler\WebSharper.Compiler\CommandTools.fs:line 437   at WebSharper.Compiler.CommandTo  
ols.RunInterfaceGenerator(AssemblyResolver aR, FSharpOption`1 snk, WsConfig config, LoggerBase logger) in C:\Users\mmangel\Workspaces\Github\dotnet-websharper\core\feat-add-timespan-to-string\src\compiler\WebSh 
arper.Compiler\CommandTools.fs:line 440   at WebSharper.Compiler.FSharp.Compile.Compile@148-5.Invoke(Unit unitVar0) in C:\Users\mmangel\Workspaces\Github\dotnet-websharper\core\feat-add-timespan-to-string\src\  
compiler\WebSharper.Compiler.FSharp\Compile.fs:line 150 [C:\Users\mmangel\Workspaces\Github\dotnet-websharper\core\feat-add-timespan-to-string\src\stdlib\WebSharper.JavaScript\WebSharper.JavaScript.fsproj]      
    4 Warning(s)
    1 Error(s)

I took inspiration from how DateTime.ToString() was adding in f5f2784

Could you please hint me in the right direction?

I also want to add support for TimeSpan.TryParse.

@Jand42
Copy link
Member

Jand42 commented Feb 25, 2025

@MangelMaxime Sorry, I was busy on the backports and releases, I will take a look tomorrow!

@MangelMaxime
Copy link
Contributor Author

@Jand42 No problem, thanks for all the work on the different issues (sorry for the spam of them) and back porting them to WS 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants