diff --git a/Directory.Build.props b/Directory.Build.props index c79c26ae..28a57369 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 14.5.1 + 14.5.2 Ronald Schlenker Copyright 2024 Ronald Schlenker @@ -16,6 +16,22 @@ https://www.nuget.org/packages/FsHttp#release-body-tab + + ************************************************************** + + +---------+ + | | PXL-JAM 2024 + | PXL | - github.com/CuminAndPotato/PXL-JAM + | CLOCK | - WIN a PXL-Clock MK1 + | | - until 8th of January 2025 + +---------+ + + ************************************************************** + + + 14.5.2 + - Added PXK-Clock Promo Message on first FSI evaluation (when logs are enabled) + 14.5.1 - Fixed untracked bug: using config_useBaseUrl as http template won't crash when printing unfinished requests diff --git a/build.fsx b/build.fsx index bda65edc..daeef990 100644 --- a/build.fsx +++ b/build.fsx @@ -14,7 +14,7 @@ Trace.trace $"Starting script..." module Properties = let nugetServer = "https://api.nuget.org/v3/index.json" - let nugetPushEnvVarName = "nuget_push" + let nugetPushEnvVarName = "nuget_fshttp" [] module Helper = diff --git a/src/FsHttp/FsiInit.fs b/src/FsHttp/FsiInit.fs index 8907723b..9613a016 100644 --- a/src/FsHttp/FsiInit.fs +++ b/src/FsHttp/FsiInit.fs @@ -13,20 +13,39 @@ type InitResult = let mutable private state = Uninitialized +let private logPxlClockOnFirstSend = + let mutable firstSend = true + fun () -> + if firstSend then + firstSend <- false + let msg = @" + +************************************************************** + + +---------+ + | | PXL-JAM 2024 + | PXL | - github.com/CuminAndPotato/PXL-JAM + | CLOCK | - WIN a PXL-Clock MK1 + | | - until 8th of January 2025 + +---------+ + +************************************************************** + + " + printfn "%s" msg + // This seems like a HACK, but there shouldn't be the requirement of referencing FCS in FSI. let doInit () = if state <> Uninitialized then state else - let fsiAssemblyName = "FSI-ASSEMBLY" - let isInteractive = // This hack is indeed one (see https://fsharp.github.io/fsharp-compiler-docs/fsi-emit.html) AppDomain.CurrentDomain.GetAssemblies() - |> Array.exists (fun asm -> (*asm.IsDynamic &&*) - asm.GetName().Name.StartsWith(fsiAssemblyName, StringComparison.Ordinal) - ) + |> Array.map (fun asm -> asm.GetName().Name) + |> Array.exists (fun asmName -> (*asm.IsDynamic &&*) + asmName.StartsWith(fsiAssemblyName, StringComparison.Ordinal)) state <- try @@ -51,7 +70,9 @@ let doInit () = // see #121: It's important to not touch the logDebugMessages // value when it was already set before this init function was called. match Fsi.logDebugMessages with - | None -> Fsi.enableDebugLogs () + | None -> + do logPxlClockOnFirstSend () + Fsi.enableDebugLogs () | _ -> () let addPrinter (f: 'a -> string) = @@ -80,4 +101,5 @@ let doInit () = state -let init () = doInit () |> ignore +let init () = + doInit () |> ignore