From bda12f215eeef707323f1b0e0797acdd3f391af7 Mon Sep 17 00:00:00 2001 From: Aaron Costley Date: Wed, 13 Mar 2019 05:39:46 -0700 Subject: [PATCH] fix(aws-cdk): update F# template to latest CDK version (#2006) Changed the FSharp code to be compatable with the latest changes in the aws-cdk. Added code files to fsproj. --- .../app/fsharp/src/HelloCdk/HelloCdk.template.fsproj | 6 ++++++ .../init-templates/app/fsharp/src/HelloCdk/HelloStack.fs | 2 +- .../lib/init-templates/app/fsharp/src/HelloCdk/Program.fs | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloCdk.template.fsproj b/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloCdk.template.fsproj index 0e5b6d7b23e73..cbe7bc9559cc4 100644 --- a/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloCdk.template.fsproj +++ b/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloCdk.template.fsproj @@ -5,6 +5,12 @@ netcoreapp2.1 + + + + + + diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloStack.fs b/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloStack.fs index 7a2b374ab6d6c..b7e0c26116c50 100644 --- a/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloStack.fs +++ b/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/HelloStack.fs @@ -17,5 +17,5 @@ type MyStack(scope, name, props) as this = let user = User(this, "MyUser", UserProps()) do - topic.SubscribeQueue(queue) |> ignore + topic.SubscribeQueue(queue, Nullable false) |> ignore hello.GrantRead(user) diff --git a/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/Program.fs b/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/Program.fs index c1dd2660f020f..85a29037a0bfb 100644 --- a/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/Program.fs +++ b/packages/aws-cdk/lib/init-templates/app/fsharp/src/HelloCdk/Program.fs @@ -3,8 +3,8 @@ open HelloCdk [] let main _ = - let app = App() + let app = App(null) MyStack(app, "hello-cdk-1", StackProps()) |> ignore MyStack(app, "hello-cdk-2", StackProps()) |> ignore - app.Run() + app.Run() |> ignore 0