Skip to content

Commit 2b30e69

Browse files
script to get next rfc id (fsharp#535)
1 parent 77b2c82 commit 2b30e69

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,17 @@ All tooling RFCs (typically for cross-cutting, cross-editor tooling) live under
1717
2. Ideas which get "approved in principle" get an [RFC entry](https://github.com/fsharp/fslang-design/tree/master/RFCs) based on the [template](https://github.com/fsharp/fslang-design/blob/master/RFC_template.md), and a corresponding [RFC discussion thread](https://github.com/fsharp/fslang-design/issues)
1818

1919
There is currently a backlog of approved ideas. If an idea has been approved and you'd
20-
like to accelerate the creation of an RFC, send a PR creating the RFC document for any approved-in-principle issue.
20+
like to accelerate the creation of an RFC, send a PR creating the RFC document for any approved-in-principle issue.
2121
First in first served. To "grab the token" send a PR doing nothing but creating or naming the RFC file, and
2222
then fill in the further details with additional commits to the PR.
2323

24-
3. Implementations and testing are submitted to the [dotnet/fsharp repository](https://github.com/Microsoft/visualfsharp).
24+
* to pick the RFC numbered identifier, you can run `dotnet fsi find.next.id.fsx`
25+
* to name the file, tooling RFCs are prefixed with `FST-`, language RFC are prefixed with `FS-`, use `-` and lower casing (relaxed for code identifiers), giving descriptive name
26+
* the file location is always under RFCs and get moved by owners of the repository when it ships in a preview or a release.
27+
28+
29+
30+
3. Implementations and testing are submitted to the [dotnet/fsharp repository](https://github.com/dotnet/fsharp).
2531

2632
When RFCs are implemented and a version of F# is revved, the RFCs which correspond to the F# version they were implemented in are archived under the appropriate folder.
2733

RFC_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ The design suggestion [FILL ME IN](https://github.com/fsharp/fslang-suggestions/
55
This RFC covers the detailed proposal for this suggestion.
66

77
- [x] Approved in principle
8-
- [ ] [Suggestion](https://github.com/fsharp/fslang-suggestions/issues/fill-me-in)
8+
- [ ] [Suggestion](https://github.com/fsharp/fslang-suggestions/issues/FILL-ME-IN)
99
- [ ] [Implementation](https://github.com/dotnet/fsharp/pull/FILL-ME-IN)
1010
- [ ] Design Review Meeting(s) with @dsyme and others invitees
11-
- [Discussion](https://github.com/fsharp/fslang-design/issues/PLEASE-ADD-A-DISCUSSION-ISSUE-AND-LINK-HERE)
11+
- [Discussion](https://github.com/fsharp/fslang-design/discussions/FILL-ME-IN)
1212

1313
# Summary
1414

find.next.id.fsx

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
open System.IO
2+
open System
3+
4+
let nextId =
5+
DirectoryInfo(__SOURCE_DIRECTORY__).GetFiles("*.md", SearchOption.AllDirectories)
6+
|> Seq.map (fun f -> f.Name.ToLowerInvariant().Split([|"fst-";"fs-"; "-"|], StringSplitOptions.RemoveEmptyEntries))
7+
|> Seq.choose (function
8+
| [||]
9+
| [|_|] -> None
10+
| items ->
11+
items
12+
|> Array.map (fun v -> Int32.TryParse(v))
13+
|> Array.filter fst
14+
|> Array.map snd
15+
|> Array.tryHead
16+
)
17+
|> Seq.max
18+
|> ((+) 1)
19+
20+
printfn $"next RFC ID: %04i{nextId}"

0 commit comments

Comments
 (0)