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

List targets quietly #1953

Merged
merged 4 commits into from
May 21, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/Fake.BuildServer.Travis/Travis.fs
Original file line number Diff line number Diff line change
@@ -37,9 +37,11 @@ module Travis =
write false color true (sprintf "Build Number: %s" number)
| TraceData.TestStatus (test, status) ->
write false color true (sprintf "Test '%s' status: %A" test status)
| TraceData.BuildState state ->
write false color true (sprintf "Build State: %A" state)

let defaultTraceListener =
TravisTraceListener() :> ITraceListener
TravisTraceListener() :> ITraceListener
let detect () =
BuildServer.buildServer = BuildServer.Travis
let install(force:bool) =
4 changes: 2 additions & 2 deletions src/app/Fake.Core.SemVer/SemVer.fs
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ type PreRelease =
| _::AlphaNumeric(a)::_ -> a // fallback to 2nd
| _ -> ""

let parse segment =
let parse (segment: string) =
match bigint.TryParse segment with
| true, number when number >= 0I -> Numeric number
| _ -> AlphaNumeric segment
@@ -245,7 +245,7 @@ module SemVer =
| _ -> None

/// Matches if str is convertible to big int and not less than zero, and returns the bigint value.
let inline private (|Big|_|) str =
let inline private (|Big|_|) (str: string) =
match BigInteger.TryParse (str, NumberStyles.Integer, null) with
| true, big when big > -1I -> Some big
| _ -> None
8 changes: 5 additions & 3 deletions src/app/Fake.Runtime/FakeRuntime.fs
Original file line number Diff line number Diff line change
@@ -611,7 +611,8 @@ let prepareAndRunScript (config:FakeConfig) : RunResult =
let retrieveHints (config:FakeConfig) (runResult:Runners.RunResult) =
match runResult with
| Runners.RunResult.SuccessRun _ -> []
| Runners.RunResult.CompilationError err -> [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually that syntax will no longer yield a warning with next F# version ;)

| Runners.RunResult.CompilationError err ->
[
// Add some hints about the error, for example
// detect https://github.com/fsharp/FAKE/issues/1783
let containsNotDefined = err.Errors |> Seq.exists (fun er -> er.ErrorNumber = 39)
@@ -621,9 +622,10 @@ let retrieveHints (config:FakeConfig) (runResult:Runners.RunResult) =
if containsNotSupportOperator then
yield "Operators now need to be opened manually, try to add 'open Fake.IO.FileSystemOperators' and 'open Fake.IO.Globbing.Operators' to your script to import the most common operators"
]
| Runners.RunResult.RuntimeError _ -> [
| Runners.RunResult.RuntimeError _ ->
[
if config.VerboseLevel.PrintVerbose && Environment.GetEnvironmentVariable "FAKE_DETAILED_ERRORS" <> "true" then
yield "To further diagnose the problem you can set the 'FAKE_DETAILED_ERRORS' environment variable to 'true'"
if not config.VerboseLevel.PrintVerbose && Environment.GetEnvironmentVariable "FAKE_DETAILED_ERRORS" <> "true" then
yield "To further diagnose the problem you can run fake in verbose mode `fake -v run ...` or set the 'FAKE_DETAILED_ERRORS' environment variable to 'true'"
]
]
3 changes: 2 additions & 1 deletion src/app/Fake.Tracing.NAntXml/NAntXmlTraceListener.fs
Original file line number Diff line number Diff line change
@@ -54,7 +54,8 @@ type NAntXmlTraceListener(encoding : Encoding, xmlOutputFile) =
| TraceData.TestOutput _
| TraceData.TestStatus _
| TraceData.ImportData _
| TraceData.BuildNumber _ -> ""
| TraceData.BuildNumber _
| TraceData.BuildState _ -> ""

interface System.IDisposable with
member __.Dispose () =