Skip to content
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: separate fsc function with exit code, &c. #491

Merged
merged 1 commit into from
Jul 4, 2014
Merged

FscHelper: separate fsc function with exit code, &c. #491

merged 1 commit into from
Jul 4, 2014

Conversation

yawaramin
Copy link
Contributor

FscHelper: separate fsc function with exit code, &c.

This commit contains several small-ish changes. In order of appearance:

  • Use an FscParams.Default static member instead of a free variable,
    to express the tight coupling of the defaults with the type itself.
  • Print compile errors and warnings with the appropriate trace...
    functions.
  • Return an exit code from the fsc function as I intend to use it to
    help implement incremental build logic. The Fsc function
    (uppercase 'F') still doesn't return anything so it can continue to
    be used in the existing framework.

The Fsc call syntax looks very similar to what was originally proposed
in #235.

@yawaramin yawaramin changed the title Fsc: flip function parameters order, &c. FscHelper: separate fsc function with exit code, &c. Jul 4, 2014
/// ... })
let Fsc (fscParamSetter: FscParams -> FscParams) =
fsc fscParamSetter >> ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use partial application in public functions. It hides parameter names in VS and this makes it harder for users - especially when coming from C#. Please name all parameters.
Instead of piping to ignore we should throw a meaningful error.

This commit contains several small-ish changes. In order of appearance:

  - Use an `FscParams.Default` static member instead of a free variable,
    to express the tight coupling of the defaults with the type itself.

  - Print compile errors and warnings with the appropriate `trace...`
    functions.

  - Return an exit code from the `fsc` function as I intend to use it to
    help implement incremental build logic. The `Fsc` function
    (uppercase 'F') still doesn't return anything so it can continue to
    be used in the existing framework.

The `Fsc` call syntax looks very similar to what was originally proposed
in #235.
@yawaramin
Copy link
Contributor Author

Thanks! Appreciate the feedback. I've done as you suggested--have made all parameters explicit and raised an exception. I guess this means I'll also have to redo several functions that I've come up with for my incremental build DSL :-)

@forki
Copy link
Member

forki commented Jul 4, 2014

I learned that the hard way. If you look at old versions of FAKE you will find partial application and >> everywhere ;-)

forki added a commit that referenced this pull request Jul 4, 2014
FscHelper: separate `fsc` function with exit code, &c.
@forki forki merged commit b8724d3 into fsprojects:master Jul 4, 2014
@forki
Copy link
Member

forki commented Jul 4, 2014

thanks

@forki
Copy link
Member

forki commented Jul 4, 2014

edjxfem

released with 3.1.0

@yawaramin yawaramin deleted the issues/235 branch July 4, 2014 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants