Skip to content

Commit

Permalink
Merge pull request #5 from vbfox/core_bump_2021
Browse files Browse the repository at this point in the history
Core bump 2021
  • Loading branch information
vbfox authored Sep 5, 2024
2 parents 1844276 + de2f631 commit 0f76c10
Show file tree
Hide file tree
Showing 39 changed files with 5,541 additions and 2,642 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"paket": {
"version": "6.0.0-beta9",
"version": "8.0.3",
"commands": [
"paket"
]
Expand Down
6 changes: 1 addition & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ root = true
indent_style = space
indent_size = 4
insert_final_newline = true
end_of_line = crlf
end_of_line = lf

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
Expand All @@ -16,7 +16,3 @@ indent_size = 2

[*.{yml,yaml}]
indent_size = 2

[*.sh]
end_of_line = lf

14 changes: 12 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ jobs:
DOTNET_NOLOGO: 1
PAKET_SKIP_RESTORE_TARGETS: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
2
5
- name: Restore packages
run: ./paket.sh restore
- name: Compile build script
Expand All @@ -30,7 +35,12 @@ jobs:
DOTNET_NOLOGO: 1
PAKET_SKIP_RESTORE_TARGETS: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
2
5
- name: Restore packages
run: ./paket.cmd restore
- name: Compile build script
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,5 @@ paket-files/
launchSettings.json
.ionide/
.idea/

TestResults.xml
944 changes: 505 additions & 439 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

30 changes: 18 additions & 12 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
MasterOfFoo
===========
# MasterOfFoo

!["f" Logo](https://raw.githubusercontent.com/vbfox/MasterOfFoo/master/src/BlackFox.MasterOfFoo/Icon.png)

Expand All @@ -13,8 +12,7 @@ The code is essentially an extracted version of [`printf.fs`][printf_fs] where t
what to do with the final blocks that compose the string (printf put them on the console, sprintf in a buffer, ...)
but also what to do with the parameters passed for each format specifier.

Sample usage
------------
## Sample usage

```fsharp
module MyModule =
Expand All @@ -33,8 +31,7 @@ module MyModule =
MyModule.mysprintf "Hello %s." "World"
```

Mini-Doc
--------
## Mini-Doc

### PrintableElement

Expand Down Expand Up @@ -70,8 +67,7 @@ Members:
* `doPrintfFromEnv`: Take a format and a `PrintfEnv` to create a printf-like function
* `doPrintf`: Same as `doPrintfFromEnv` but allow to know the number of elements when the `PrintfEnv` is created.

FAQ
---
## FAQ

### What does it allow exactly that can't be done with the original set of functions ?

Expand Down Expand Up @@ -102,12 +98,22 @@ value.
val it : (int -> int -> float -> string) = <fun:it@1>
````

Projects using it
-----------------
### How are interpolated strings represented ?

The details of string interpolation internals are specified in [F# RFC FS-1001 - String Interpolation][fs-1001].

They appear as follow in this library:
* Type-checked "printf-style" fills behave exactly as they do in `sprintf` and friends.
* Unchecked ".NET-style" fills appear with a `Specifier.TypeChar` of 'P' and the .NET format string
in `Specifier.InteropHoleDotNetFormat`.

[fs-1001]: https://github.com/fsharp/fslang-design/blob/aca88da13cdb95f4f337d4f7d44cbf9d343704ae/FSharp-5.0/FS-1001-StringInterpolation.md#f-rfc-fs-1001---string-interpolation

## Projects using it

* [ColoredPrintf][colorprintf]: A small library that I created to add colored parts to printf strings.

*If you use it somewhere, ping me on twitter [@virtualblackfox][twitter] so I can add you.*
*If you use it somewhere, ping me on the fediverse [@vbfox@hachyderm.io][fedi] so I can add you.*

More fun ?
----------
Expand Down Expand Up @@ -142,5 +148,5 @@ ColorPrintf.colorprintf "%s est %t" "La vie" (fun _ -> "belle !")
```

[printf_fs]: https://github.com/fsharp/fsharp/blob/master/src/fsharp/FSharp.Core/printf.fs
[twitter]: https://twitter.com/virtualblackfox
[fedi]: https://hachyderm.io/@vbfox
[colorprintf]: https://github.com/vbfox/ColoredPrintf
7 changes: 7 additions & 0 deletions Release Notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### New in 2.0.0

* Include the readme in the NuGet package
* Build with 8.0.201 SDK
* The new set of supported platforms is .NET Framework 4.6.1, .NET Standard 2.0 and .NET 5.0
* Add support for interpolated strings

### New in 1.0.6

* Make dependency ranges less strict (For `FSharp.Core` 6.x)
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "5.0.201",
"version": "8.0.201",
"rollForward": "latestMajor"
}
}
3 changes: 2 additions & 1 deletion paket.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@dotnet tool restore
@dotnet tool restore --verbosity quiet

dotnet paket %*
6 changes: 3 additions & 3 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
source https://api.nuget.org/v3/index.json
framework: net5.0,netcoreapp2.0,netstandard1.6,netstandard2.0,net45
framework: net8.0,net5.0,netcoreapp2.0,netstandard2.0,net461
storage:none

nuget Expecto
nuget Expecto ~> 9
nuget FSharp.Core
nuget System.Data.SqlClient

// Build infrastructure
group build
source https://api.nuget.org/v3/index.json
storage: none
framework: net5.0
framework: net8.0

nuget FSharp.Core ~> 5
nuget BlackFox.Fake.BuildTask
Expand Down
Loading

0 comments on commit 0f76c10

Please sign in to comment.