hey folks, is there a development guide for workin...
# help
g
hey folks, is there a development guide for working on sst itself? I'd like to help add .NET 6 lambda's supported (currently AFAIK only .NET 3.1 is supported right now) - I've pulled down the source, poked around a bit and would like to test my changes, but I don't have a clue how to test my code.
f
Hey @Giorgio Galante, if you look inside
/packages/cli/test/playground
, it’s an SST app that’s hooked up to local
resources
and
core
. It’s got a bunch of stacks in there, most of them commented out.
g
Hey Frank, thanks for getting back to me... so I did start poking at it a bit, and it seems that right now it only supports a single runtime...as opposed to say Python that has several...I don't know enough about how SST works to make it support multiple .NET frameworks...as opposed to just wholesale moving from 3.1 -> 6.0...but I'm not sure how you guys would feel about that...for whatever it's worth .NET Core 3.1 will be sunset from Microsoft support this coming December, so I'm not sure it's worth the effort to support multiple frameworks right now.
f
You can follow these steps (skip the ones you’ve done already): 1. clone the repo 2. cd into the repo root 3.
yarn
4.
yarn build
5.
yarn watch
(changes to
packages/core
and
pakcages/resources
will get picked up by
packages/cli
playground) 6. cd into
packages/cli/test/playground
7. open up
lib/index.ts
, I think u just need 1 stack to test it out, so just leave the
ApiStack
in there and comment out the rest. 8. create a hello world .NET 6 project in
src/dotnet6
9. open up
lib/api-stack.ts
, feel free to remove all the constructs and just have this
Copy code
const api = new sst.Api(stack, "Api", {
  routes: {
    "GET /": {
      function: {
        runtime: "dotnet6"
        srcPath: "src/dotnet6"
        handler: "MyApp::Example.Hello::MyHandler"
      }
    }
  }
};

stack.addOutputs({
  Endpoint: api.url || "no-url",
});
9.
yarn build
10.
yarn start
11. invoke the api’s url and see if it works 12.
yarn deploy
13. invoke the api’s url and see if it works
@Giorgio Galante sorry i was in the middle of typing this up lol
g
no worries...
f
SST does support multiple runtimes, ie.
Copy code
const api = new sst.Api(stack, "Api", {
  routes: {
    "GET /a": {
      function: { runtime: "dotnet6", ... }
    },
    "GET /b": {
      function: { runtime: "dotnetcore3.1", ... }
    },
    "GET /c": {
      function: { runtime: "python3.9", ... }
    },
  }
};
Btw, r u blocked by this?
g
we are
internally we have a framework for building .NET apps and it's based on 6.0 - supporting 3.1 and 6.0 at the same time would be difficult. More than likely the path of least resistance for this particular scenario (lambdas) would be to use Terraform or CloudFormation
f
I can add support for the new runtime fairly quick, but I’m not familiar with .NET 6. If I can get some of your help on the .NET side of things, that’d really speed things up.
If you are down for that, we can do a zoom call next week? Or over the weekend if urgent.
g
sure we can do it next week - no it's not so urgent that it requires weekend support, but I really appreciate it!
f
Awesome! Feel free to pick a time here http://calendly.com/frank-w/30min
g
Done 12pm EST Monday. Thank you so much Frank - have a great weekend!
f
Hey @Giorgio Galante, it’s out in
v1.2.0
, lemme know if it works for u.
g
Will do - thanks again @Frank!