dotnet-websharper / core

WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#
https://websharper.com
Apache License 2.0
593 stars 52 forks source link

Printing compiler statistics #1341

Closed granicz closed 1 year ago

granicz commented 1 year ago

Building with WebSharper CLI, builds print out some statistics about the various compiler phases:

C:\testing\7.0.0.310-beta2\MyApp02>dotnet ws build
...
F# compilation: 00:00:00.6163612
Checking project: 00:00:00.2050914
Waiting on merged metadata: 00:00:00.0008207
Parsing with FCS: 00:00:00.0205200
Analyzing function arguments: 00:00:00.0021028
Resolving names: 00:00:00.0010118
WebSharper translation: 00:00:00.0354088
Source position transformations: 00:00:00.0023212
Packaging assembly: 00:00:00.0011068
Writing .js: 00:00:00.0090154
Writing .js: 00:00:00.0021704
Writing .js: 00:00:00.0014832
Writing .js files: 00:00:00.0004587
Writing .d.ts files: 00:00:00.0085116
Hashing resources: 00:00:00.0016625
Serializing metadata: 00:00:00.0696385
Writing resources into assembly: 00:00:00.0055670
Unpacking into C:\testing\7.0.0.310-beta2\MyApp02\wwwroot
Unpacking: 00:00:00.1977022 

This output is missing from a regular dotnet build, regardless of the verbosity level. Make the above a standard compiler output in all cases.

granicz commented 1 year ago

While on this, let's also investigate how we could print tool output (info, errors, standard) in different colors.