-
Notifications
You must be signed in to change notification settings - Fork 858
Teach fsc/fsi how to use responsefile #831
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
KevinRansom
merged 9 commits into
dotnet:master
from
enricosada:teach_fsc_how_to_use_responsefile
Jan 20, 2016
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
596621f
add build_only argument at appveyor-build.cmd to skip tests ( others …
enricosada f4e2cfc
teach fsc/fsi how to use response files
enricosada 6127e6a
add tests
enricosada dd75644
add help about @response files
enricosada 2f30b90
add test compile error expected if response file does not exist
enricosada 9bed9be
rename resources
enricosada d43f1a9
document how to add new resources and error numbers
enricosada 015001d
use detectEncodingFromByteOrderMarks
enricosada 20f0552
add error if response file name is empty or invalid
enricosada 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.
3 changes: 3 additions & 0 deletions
3
tests/fsharpqa/Source/CompilerOptions/fsc/responsefile/E_responsefile_not_found.fs
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,3 @@ | ||
| // #NoMT #CompilerOptions | ||
| //<Expects id="FS3192" status="error"></Expects> | ||
| exit 1 |
3 changes: 3 additions & 0 deletions
3
tests/fsharpqa/Source/CompilerOptions/fsc/responsefile/E_responsefile_path_invalid.fs
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,3 @@ | ||
| // #NoMT #CompilerOptions | ||
| //<Expects id="FS3193" status="error"></Expects> | ||
| exit 1 |
Empty file.
8 changes: 8 additions & 0 deletions
8
tests/fsharpqa/Source/CompilerOptions/fsc/responsefile/env.lst
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,8 @@ | ||
| SOURCE="responsefile01.fs" SCFLAGS="--define:FROM_RESPONSE_FILE_1" # responsefile01.fs define | ||
| SOURCE="responsefile01.fs" SCFLAGS="\@rs1.rsp" # responsefile01.fs define inside response file | ||
| SOURCE="responsefile01.fs" SCFLAGS="\@rs1_multiline_and_comments.rsp" # responsefile01.fs comments/newline inside response file | ||
| SOURCE="responsefile01.fs \@rs2.rsp" # responsefile01.fs nested response file, different position | ||
| SOURCE="responsefile01.fs \@empty_rs.rsp \@rs2.rsp \@empty_rs.rsp " # responsefile01.fs nested response file | ||
| SOURCE="responsefile02.fs" SCFLAGS="\@rs1_multiline_and_comments.rsp" # responsefile02.fs response file multiline | ||
| SOURCE="E_responsefile_not_found.fs" COMPILE_ONLY=1 SCFLAGS="\@not_exists" # E_responsefile_not_found.fs error if response file does not exists | ||
| SOURCE="E_responsefile_path_invalid.fs" COMPILE_ONLY=1 SCFLAGS="\@" # E_responsefile_path_invalid.fs error if response file name is empty or invalid |
13 changes: 13 additions & 0 deletions
13
tests/fsharpqa/Source/CompilerOptions/fsc/responsefile/responsefile01.fs
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,13 @@ | ||
| // #NoMT #CompilerOptions | ||
| //<Expected status=success></Expects> | ||
|
|
||
| [<EntryPoint>] | ||
| let main args = | ||
| let expected = | ||
| #if FROM_RESPONSE_FILE_1 | ||
| "ok" | ||
| #else | ||
| "fail" | ||
| #endif | ||
|
|
||
| exit(if(expected = "ok") then 0 else 1) |
20 changes: 20 additions & 0 deletions
20
tests/fsharpqa/Source/CompilerOptions/fsc/responsefile/responsefile02.fs
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,20 @@ | ||
| // #NoMT #CompilerOptions | ||
| //<Expected status=success></Expects> | ||
|
|
||
| [<EntryPoint>] | ||
| let main args = | ||
| let expected1 = | ||
| #if FROM_RESPONSE_FILE_1 | ||
| "ok" | ||
| #else | ||
| "fail" | ||
| #endif | ||
|
|
||
| let expected2 = | ||
| #if FROM_RESPONSE_FILE_2 | ||
| "ok" | ||
| #else | ||
| "fail" | ||
| #endif | ||
|
|
||
| exit(if(expected1 = "ok" && expected2 = "ok") then 0 else 1) |
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 @@ | ||
| --define:FROM_RESPONSE_FILE_1 |
10 changes: 10 additions & 0 deletions
10
tests/fsharpqa/Source/CompilerOptions/fsc/responsefile/rs1_multiline_and_comments.rsp
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,10 @@ | ||
|
|
||
| # some comments | ||
|
|
||
| --define:FROM_RESPONSE_FILE_1 | ||
|
|
||
| #other comments | ||
|
|
||
| --define:FROM_RESPONSE_FILE_2 | ||
|
|
||
| # end of comments |
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 @@ | ||
| @rs1.rsp |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this add
build_onlyargument to appveyor, to build without tests ( compile only ).can be combined with others arguments, for example
net40,portable7,build_onlycompile onlynet40andportable7instead of compile+tests