-
Notifications
You must be signed in to change notification settings - Fork 830
Deduplicate and sort error codes #15876
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
1dc6018
Deduplicate and sort error codes
Happypig375 11c9fa5
Update test
Happypig375 5c4f924
3570 -> 3573
Happypig375 b7b29ec
1503 -> 1003
Happypig375 b111c7c
3570 -> 3573
Happypig375 447e14c
3217 -> 999
Happypig375 00faa3b
Update output.1000.stderr.bsl
Happypig375 a22e2f3
Update output.200.stderr.bsl
Happypig375 5b86d77
Update output.47.stderr.bsl
Happypig375 32f356c
Update output.multiemit.stderr.bsl
Happypig375 f791369
Update output.off.stderr.bsl
Happypig375 e6716d5
Update output.quiet.stderr.bsl
Happypig375 0990216
Update output.stderr.bsl
Happypig375 d1ca738
Update output.stderr.bsl
Happypig375 9678094
Update output.off.stderr.bsl
Happypig375 a001a7d
Update output.multiemit.stderr.bsl
Happypig375 1aae03f
Update output.47.stderr.bsl
Happypig375 a665ae3
Update output.200.stderr.bsl
Happypig375 5d007eb
Update output.1000.stderr.bsl
Happypig375 9368513
Update FSComp.txt
Happypig375 1ec0750
Update FSComp.txt
Happypig375 1d522b1
Update pdb04.fs
Happypig375 6410500
Update output.quiet.stderr.bsl
Happypig375 585a0c0
Merge branch 'main' into patch-18
Happypig375 fede209
Add a error code sorting check
Happypig375 ee5281e
Fix wording
Happypig375 e0bef8f
Update the script
Happypig375 07220fd
Merge branch 'main' into patch-18
Happypig375 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| let digits = set { '0' .. '9' } | ||
|
|
||
| let rec intStringEndIndex i s = | ||
| if i >= String.length s then | ||
| String.length s - 1 | ||
| elif Set.contains s[i] digits then | ||
| intStringEndIndex (i + 1) s | ||
| else | ||
| i - 1 | ||
|
|
||
| __SOURCE_DIRECTORY__ + "/FSComp.txt" | ||
| |> System.IO.File.ReadAllLines | ||
| |> Seq.fold | ||
| (fun counters line -> | ||
| let line = line.TrimStart [| ' '; '#' |] | ||
| let intStringEndIndex = intStringEndIndex 0 line | ||
|
|
||
| if intStringEndIndex >= 0 then // Line starts with an integer (error code) | ||
| let errorCode = line[..intStringEndIndex] |> int | ||
|
|
||
| match counters with | ||
| | [] -> [ errorCode ] // Initialise a counter | ||
| | head :: tail when errorCode >= head -> errorCode :: tail // Increment current counter | ||
psfinaki marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| | _ -> errorCode :: counters // Start a new counter | ||
| else | ||
| counters) | ||
| [] | ||
| |> function | ||
| | [] -> failwith "FSComp.txt contained no error codes but expected at least one" | ||
| | [ _finalErrorCode ] -> () // Expected: One counter counted to the end | ||
| | _finalErrorCode :: counters -> | ||
| failwith $"Error codes not sorted in FSComp.txt, break(s) happened after {List.rev counters}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| // #Regression #NoMT #CompilerOptions #NoMono | ||
| // Regression test for FSharp1.0:3204 - Compiler throws exception when trying to use option "-g --pdb" on a locked file (or any non-accessible file) | ||
| //<Expects id="FS1503" status="error">The pdb output file name cannot match the build output filename use --pdb:filename.pdb</Expects> | ||
| //<Expects id="FS1001" status="error">The pdb output file name cannot match the build output filename use --pdb:filename.pdb</Expects> | ||
| exit 1 |
4 changes: 2 additions & 2 deletions
4
tests/fsharpqa/Source/InteractiveSession/Misc/UnknownDependencyManager/script1.fsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.