Skip to content

Commit 7f543b5

Browse files
authored
Merge #1491 runtimes: dotnet 5.0
2 parents a8a2fd8 + f2c85c7 commit 7f543b5

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Support for SAM CLI 1.16: SAM create/run dotnet5.0"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Improved validation when searching for SAM CLI #1465"
4+
}

src/lambda/models/samLambdaRuntime.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ export const samLambdaCreatableRuntimes: ImmutableSet<Runtime> = isCloud9()
6565
const dotnet50 = 'dotnet5.0'
6666
export const samImageLambdaRuntimes = ImmutableSet<Runtime>([
6767
...samLambdaCreatableRuntimes,
68-
// TODO enable to allow dotnet 5 support
69-
// dotnet50,
68+
dotnet50,
7069
// SAM also supports ruby, go, java, but toolkit does not support
7170
])
7271

src/shared/sam/debugger/awsSamDebugConfigurationValidator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import * as vscode from 'vscode'
77
import * as fs from 'fs'
8-
import { samZipLambdaRuntimes } from '../../../lambda/models/samLambdaRuntime'
8+
import { samImageLambdaRuntimes, samZipLambdaRuntimes } from '../../../lambda/models/samLambdaRuntime'
99
import { CloudFormation } from '../../cloudformation/cloudformation'
1010
import { localize } from '../../utilities/vsCodeUtils'
1111
import {
@@ -171,13 +171,13 @@ export class DefaultAwsSamDebugConfigurationValidator implements AwsSamDebugConf
171171
}
172172
}
173173
// can't infer the runtime for image-based lambdas
174-
if (!config.lambda?.runtime || !samZipLambdaRuntimes.has(config.lambda.runtime)) {
174+
if (!config.lambda?.runtime || !samImageLambdaRuntimes.has(config.lambda.runtime)) {
175175
return {
176176
isValid: false,
177177
message: localize(
178178
'AWS.sam.debugger.missingRuntimeForImage',
179179
'Run configurations for Image-based Lambdas require a valid Lambda runtime value, expected one of [{0}]',
180-
Array.from(samZipLambdaRuntimes).join(', ')
180+
Array.from(samImageLambdaRuntimes).join(', ')
181181
),
182182
}
183183
}

0 commit comments

Comments
 (0)