-
Notifications
You must be signed in to change notification settings - Fork 587
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
FscHelper: add fsc function #485
Conversation
This is really cool. I'd like to see this in FAKE. I think it would be better to encapsulate the compiler switches in a record. This would match the other FAKE tasks. Is it possible to compile more than one file? I think the default should be to send a fileset to the task. |
I thought about using a record type for the switches, it would probably look something like this in usage:
This is definitely more type-safe, but arguably clunkier for the user to write, compared to the simple listing of command-line switches that they're probably already used to. Using the
So, ultimately your choice: the record style or the string list style? |
How about a FSC task (in record style) which uses the existing lower case fsc task. So we give users the chance to fall back to the args list |
The 'fsc' and 'Fsc' functions take as input a function inside which you can set up compile parameters. Defaults are provided and can be overridden. 'fsc' returns the exit code of the compile, while 'Fsc' discards it. The latter can be used inside Target task functions. Both internally use the 'fscList' function which takes parameters as a simple list of strings. This function also writes error output, if any. Fixes #478.
I've implemented the |
I'd like to let the Fsc task take a file set as all the other tasks do. |
The file set works fine, thanks. I've made some more changes which I think are warranted, will do a PR soon. |
The 'fsc' helper function is a simple wrapper for the 'fsc.exe' F#
compiler command-line tool. It takes a source file and an F# list of
options, and compiles the source file.
Fixes #478.