val not : value:bool -> bool

Full name: Microsoft.FSharp.Core.Operators.not
type 'T list = List<'T>

Full name: Microsoft.FSharp.Collections.list<_>

FAKE it 'til you make it

FAKE logo
Chet Husk
@chethusk
GitHub

Agenda

  • Community Bulletin
  • Who am I?
  • What is FAKE?
  • Why FAKE?
  • Examples
  • Q&A

Community Bulletin

Recent Events in the F#/.Net Ecosystem

Useful Community links

Who am I?

  • F# Foundation Board Member
  • Web/Backend Developer at Binary Defense Systems
  • Microservices/k8s/devops background
  • Jack of all trades
  • Type Provider Dabbler
  • Run this meetup

What is FAKE?

What was FAKE?

V4

  • Build tool
  • Task orchestrator

What was FAKE?

Example usage: Paket

Fake V4 Problems

Monolithic

Required a Mono/.Net Framework tool

Inconsistent API

Required out-of-band dependency management

CLI was confusing and hard-to-parse

What is FAKE?

FAKE 5 Design Goals

Lightweight Runner

Integrated Dependency Management

Pay-for-what-you-use

Consistent API style

Consistent CLI

Compile and cache scripts

Introducing FAKE 5!

fake5 splash

Fake 5 Benefits

Cross-platform usage

System-level

  • .Net Core global tool
  • Chocolatey or .deb package


Project-level

  • .Net Core local tool
  • dotnet SDK Project-level tool
  • paket-managed project level tool

Integrated Dependency Management

Use a paket header to make your scripts self-contained

  • Reference an existing paket.dependencies group

paket group refs

  • Declare a set of dependencies inline

paket inline refs

Integrated Dependency Management

How does this work?

It's using a syntax similar to what's coming for FSI itself

The syntax is pluggable, allows for different resolvers (paket, nuget, API references, precompilation, etc)

Pay for what you use

Because you're including only the dependencies you care about, it's no longer a huge package download

Consistent API style

There are now API Design Guidelines for modules to make them more consistent.

  • Consistent Module names:
    • Fake.ILMergeHelper -> Fake.DotNet.ILMerge
  • Consistent casing:
    • ILMergeHelper.GetArguments -> Fake.DotNet.ILMerge.getArguments
  • Consistent usage patterns
    • Modules typically have some sort of Options type with modification functions, as well as a run equivalent.
    • You get a sense of consistency across modules, which helps the more you use FAKE

Consistent CLI

The FAKE 4 CLI made no distinction between arguments, environment variables, build targets, etc.

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
-------------------
 FAKE usage
-------------------

    fake.exe [<scriptPath>] [<targetName>] [options]

    scriptPath: Optional.  Path to your FAKE build script.  
                           If not specified, FAKE will use the first 
                           .fsx file in the working directory and fail 
                           if none exists.

    targetName: Optional.  Name of the target you wish to run.  
                           This will override the target you specifed to run 
                           in the build script.
                           When targetName is equal --listTargets 
                           or -lt FAKE will list the targets with their dependencies.

    Options:

Consistent CLI

The FAKE 5 CLI is more structured and has much more detail

Compile and cache scripts

FAKE 5 will compile your fsx scripts and only recompile when the source changes. This opens up new use cases for fsx scripts (especially with a global tool install).

  • System utilities
  • Administration helpers
  • Developer shortcuts

Getting Started

  • Check out the tutorials for detailed info.
  • Use the dotnet SDK template to bootstrap
    • it's not destructive so, run it on your existing projects

Q & A

Things to check out