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

Extendable Param Files feature #13900

Merged
merged 57 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
fd173d0
initial implementation of modular parameters feature
polatengin Apr 11, 2024
1da8d58
fixing extends statement processing in bicepparam files
polatengin Apr 18, 2024
6eb093a
adding sample files for extends keyword usage
polatengin Apr 18, 2024
7898351
fixing some of the failing tests
polatengin Apr 18, 2024
56f6c48
fixing most of the failing tests
polatengin Apr 19, 2024
3fac5f9
adding new tests
polatengin Apr 19, 2024
8169186
adding diagnostic to check if more than one extends specified
polatengin Apr 25, 2024
dc0e1df
fixing diagnostic error codes
polatengin Apr 25, 2024
5093c89
Merge branch 'main' into enpolat/12019-design-proposal-modular-parame…
polatengin Apr 25, 2024
2442105
fixing failing tests
polatengin Apr 30, 2024
29130f6
Merge branch 'main' into enpolat/12019-design-proposal-modular-parame…
polatengin May 2, 2024
2b30da2
Merge branch 'main' into enpolat/12019-design-proposal-modular-parame…
polatengin May 8, 2024
e3c64bf
changing null syntax to none syntax
polatengin Jun 9, 2024
0d0f264
changing null syntax to none syntax
polatengin Jun 9, 2024
42aa9b5
fixing failing tests
polatengin Jun 9, 2024
95204a5
fixing failing tests
polatengin Jun 10, 2024
a4f1af6
Merge branch 'main' into enpolat/12019-design-proposal-modular-parame…
polatengin Jun 10, 2024
87a1d2c
adding feature flag check
polatengin Jun 12, 2024
8dc355a
adding missing property
polatengin Jun 13, 2024
50f1649
fixing failing tests
polatengin Jun 13, 2024
b5365fa
fixing failing tests
polatengin Jun 13, 2024
2b73c0a
fixing failing tests
polatengin Jun 13, 2024
ddd49ea
fixing failing tests
polatengin Jun 13, 2024
57518e2
addressing PR comments
polatengin Jun 14, 2024
2b3def4
fixing failing pipeline
polatengin Jun 14, 2024
4b89c49
removing none literal expression
polatengin Jun 14, 2024
6661274
removing none type literal syntax
polatengin Jun 14, 2024
cdf7a7b
removing unneeded syntax check
polatengin Jun 14, 2024
273de4b
removing unneeded literal value case
polatengin Jun 14, 2024
3998f5a
Use an identifier instead of a keyword for 'none' (#14358)
anthony-c-martin Jun 17, 2024
019d9d7
simplifying if statement
polatengin Jun 20, 2024
8985fd2
renaming to empty semantic model
polatengin Jun 20, 2024
9841a66
addressing a comment on the PR
polatengin Jun 20, 2024
fb0e722
removing unneeded code
polatengin Jun 24, 2024
4c209b9
removing unneeded code
polatengin Jun 24, 2024
cddfb54
adressing pr comments
polatengin Jun 25, 2024
282df3a
adressing pr comments
polatengin Jun 25, 2024
45ce89c
updating bicep.min.js
polatengin Jun 25, 2024
7e474e8
updating highlight file
polatengin Jun 26, 2024
a2cf93c
fixing failing tests
polatengin Jun 27, 2024
756c155
fixing failing tests
polatengin Jun 27, 2024
551c822
renaming the feature
polatengin Jun 27, 2024
74dcdf5
updating test cases
polatengin Jun 30, 2024
b95c7e7
renaming feature flag configs
polatengin Jun 30, 2024
9295095
renaming feature flag configs
polatengin Jun 30, 2024
d9eda1d
sorting experimental features document
polatengin Jun 30, 2024
ee4b6d9
renaming experimental feature link
polatengin Jun 30, 2024
f7d9c26
updating feature flag description
polatengin Jul 2, 2024
e2524c3
fixing failing test
polatengin Jul 3, 2024
404efc2
adding a few new tests
polatengin Jul 4, 2024
0e1fe6f
adding new tests
polatengin Jul 4, 2024
b29e4c4
adding a new test
polatengin Jul 4, 2024
3684109
triggering pr pipelines
polatengin Jul 4, 2024
f93a058
removing unneeded using
polatengin Jul 4, 2024
449799d
Merge remote-tracking branch 'origin/main' into enpolat/12019-design-…
anthony-c-martin Jul 5, 2024
629b5b2
fixing the failing test
polatengin Jul 6, 2024
0038c1f
rebasing failing tests
polatengin Jul 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/experimental-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Should be enabled in tandem with `testFramework` experimental feature flag for e
Requires `extensibility` to be enabled. If enabled, users are able to fetch the azure resource type definitions from an OCI Registry as a runtime dependency. To fetch the type definitions the following syntax can be used. For example `provider 'br:mcr.microsoft.com/bicep/providers/az@1.0.0' as az`.
The provider definitions also support aliasing via `bicepconfig.json` similar to [`moduleAliases`](https://learn.microsoft.com/azure/azure-resource-manager/bicep/bicep-config-modules#aliases-for-modules). For example `provider 'br/public:az@1.0.0' as az`.

### `extendableParamFiles`
Enables the ability to extend bicepparam files from other bicepparam files.

### `extensibility`
Allows Bicep to use a provider model to deploy non-ARM resources. Currently, we support Kubernetes provider ([Bicep extensibility Kubernetes provider](https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-extensibility-kubernetes-provider)) and Microsoft Graph provider ([Bicep templates for Microsoft Graph](https://aka.ms/graphbicep)).

Expand Down
21 changes: 0 additions & 21 deletions src/Bicep.Cli.IntegrationTests/BuildParamsCommandTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,27 +351,6 @@ public async Task Build_Invalid_Single_Params_File_ShouldFail_WithExpectedErrorM
}
}

[TestMethod]
[EmbeddedFilesTestData(@"Files/BuildParamsCommandTests/.*/main\.bicepparam")]
[TestCategory(BaselineHelper.BaselineTestCategory)]
public async Task Build_params_to_stdout_with_non_bicep_references_should_succeed(EmbeddedFile paramFile)
polatengin marked this conversation as resolved.
Show resolved Hide resolved
{
var baselineFolder = BaselineFolder.BuildOutputFolder(TestContext, paramFile);
var outputFile = baselineFolder.GetFileOrEnsureCheckedIn("output.json");

var clients = await MockRegistry.Build();
var settings = new InvocationSettings(new(TestContext, RegistryEnabled: true), clients.ContainerRegistry, clients.TemplateSpec);

var result = await Bicep(settings, "build-params", baselineFolder.EntryFile.OutputFilePath, "--stdout");
result.Should().Succeed().And.NotHaveStderr();

var parametersStdout = result.Stdout.FromJson<BuildParamsStdout>();
// Force consistency for escaped newlines.
parametersStdout = parametersStdout with { templateJson = parametersStdout?.templateJson?.ReplaceLineEndings("\n") };
outputFile.WriteJsonToOutputFolder(parametersStdout);
outputFile.ShouldHaveExpectedJsonValue();
}

[TestMethod]
[EmbeddedFilesTestData(@"Files/BuildParamsCommandTests/.*/main\.bicepparam")]
[TestCategory(BaselineHelper.BaselineTestCategory)]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"experimentalFeaturesEnabled": {
"extendableParamFiles": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using 'br:mockregistry.io/parameters/basic:v1'

extends 'shared.bicepparam'

param intParam = 123

param boolParam = false

param arrayParam = []

param objectParam = {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"parametersJson": "{\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"intParam\": {\n \"value\": 123\n },\n \"boolParam\": {\n \"value\": false\n },\n \"arrayParam\": {\n \"value\": []\n },\n \"objectParam\": {\n \"value\": {}\n },\n \"stringParam\": {\n \"value\": \"foo\"\n }\n }\n}",
"templateJson": "{\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"metadata\": {\n \"_generator\": {\n \"name\": \"bicep\",\n \"version\": \"dev\",\n \"templateHash\": \"185348812090145868\"\n }\n },\n \"parameters\": {\n \"stringParam\": {\n \"type\": \"string\"\n },\n \"intParam\": {\n \"type\": \"int\"\n },\n \"boolParam\": {\n \"type\": \"bool\"\n },\n \"objectParam\": {\n \"type\": \"object\"\n },\n \"arrayParam\": {\n \"type\": \"array\"\n }\n },\n \"resources\": []\n}",
"templateSpecId": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using none

param stringParam = 'foo'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"parametersJson": "{\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"stringParam\": {\n \"value\": \"foo\"\n }\n }\n}",
"templateJson": null,
"templateSpecId": null
polatengin marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"experimentalFeaturesEnabled": {
"extendableParamFiles": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using none

param stringParam = 'foo'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"parametersJson": "{\n \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\",\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {\n \"stringParam\": {\n \"value\": \"foo\"\n }\n }\n}",
"templateJson": null,
"templateSpecId": null
}
1 change: 1 addition & 0 deletions src/Bicep.Core.Samples/BaselineData_Bicepparam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ private static IEnumerable<BaselineData_Bicepparam> GetAllExampleData()
embeddedFiles.Select(x => x.StreamPath).Should().BeEquivalentTo(
"Files/baselines_bicepparam/Expressions/parameters.bicepparam",
"Files/baselines_bicepparam/Imports/parameters.bicepparam",
"Files/baselines_bicepparam/Extends/parameters.bicepparam",
"Files/baselines_bicepparam/Invalid_Expressions/parameters.bicepparam",
"Files/baselines_bicepparam/Invalid_Imports/parameters.bicepparam",
"Files/baselines_bicepparam/Invalid_Parameters/parameters.bicepparam",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var json = loadJsonContent('foo.json')
func testFunction(b bool) bool => b
@export()
var directExport = json.bar.baz
@export()
var functionExport = testFunction(json.bar.baz)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"experimentalFeaturesEnabled": {
"extendableParamFiles": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"bar": {
"baz": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
param one string = ''
param two string = ''
param three string = ''
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using 'main.bicep'

extends 'shared.bicepparam'

param one = 'param one'
param two = 'param two'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using 'main.bicep'

extends 'shared.bicepparam'

param one = 'param one'
param two = 'param two'

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using 'main.bicep'

extends 'shared.bicepparam'

param one = 'param one'
param two = 'param two'
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"one": {
"value": "param one"
},
"two": {
"value": "param two"
},
"three": {
"value": "param three"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using 'main.bicep'
//@[18:23) ParameterAssignment three. Type: 'param three'. Declaration start char: 12, length: 27

extends 'shared.bicepparam'

param one = 'param one'
//@[06:09) ParameterAssignment one. Type: 'param one'. Declaration start char: 0, length: 23
param two = 'param two'
//@[06:09) ParameterAssignment two. Type: 'param two'. Declaration start char: 0, length: 23

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using 'main.bicep'
//@[00:97) ProgramSyntax
//@[00:18) ├─UsingDeclarationSyntax
//@[00:05) | ├─Token(Identifier) |using|
//@[06:18) | └─StringSyntax
//@[06:18) | └─Token(StringComplete) |'main.bicep'|
//@[18:20) ├─Token(NewLine) |\n\n|

extends 'shared.bicepparam'
//@[00:27) ├─ExtendsDeclarationSyntax
//@[00:07) | ├─Token(Identifier) |extends|
//@[08:27) | └─StringSyntax
//@[08:27) | └─Token(StringComplete) |'shared.bicepparam'|
//@[27:29) ├─Token(NewLine) |\n\n|

param one = 'param one'
//@[00:23) ├─ParameterAssignmentSyntax
//@[00:05) | ├─Token(Identifier) |param|
//@[06:09) | ├─IdentifierSyntax
//@[06:09) | | └─Token(Identifier) |one|
//@[10:11) | ├─Token(Assignment) |=|
//@[12:23) | └─StringSyntax
//@[12:23) | └─Token(StringComplete) |'param one'|
//@[23:24) ├─Token(NewLine) |\n|
param two = 'param two'
//@[00:23) ├─ParameterAssignmentSyntax
//@[00:05) | ├─Token(Identifier) |param|
//@[06:09) | ├─IdentifierSyntax
//@[06:09) | | └─Token(Identifier) |two|
//@[10:11) | ├─Token(Assignment) |=|
//@[12:23) | └─StringSyntax
//@[12:23) | └─Token(StringComplete) |'param two'|
//@[23:24) ├─Token(NewLine) |\n|

//@[00:00) └─Token(EndOfFile) ||
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using 'main.bicep'
//@[00:05) Identifier |using|
//@[06:18) StringComplete |'main.bicep'|
//@[18:20) NewLine |\n\n|

extends 'shared.bicepparam'
//@[00:07) Identifier |extends|
//@[08:27) StringComplete |'shared.bicepparam'|
//@[27:29) NewLine |\n\n|

param one = 'param one'
//@[00:05) Identifier |param|
//@[06:09) Identifier |one|
//@[10:11) Assignment |=|
//@[12:23) StringComplete |'param one'|
//@[23:24) NewLine |\n|
param two = 'param two'
//@[00:05) Identifier |param|
//@[06:09) Identifier |two|
//@[10:11) Assignment |=|
//@[12:23) StringComplete |'param two'|
//@[23:24) NewLine |\n|

//@[00:00) EndOfFile ||
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using none

param three = 'param three'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"three": {
"value": "three"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ param para1 = 'value
//@[14:20) [BCP004 (Error)] The string at this location is not terminated due to an unexpected new line character. (CodeDescription: none) |'value|

para
//@[00:04) [BCP337 (Error)] This declaration type is not valid for a Bicep Parameters file. Specify a "using", "param" or "var" declaration. (CodeDescription: none) |para|
//@[00:04) [BCP337 (Error)] This declaration type is not valid for a Bicep Parameters file. Specify a "using", "extends", "param" or "var" declaration. (CodeDescription: none) |para|

para2
//@[00:05) [BCP337 (Error)] This declaration type is not valid for a Bicep Parameters file. Specify a "using", "param" or "var" declaration. (CodeDescription: none) |para2|
//@[00:05) [BCP337 (Error)] This declaration type is not valid for a Bicep Parameters file. Specify a "using", "extends", "param" or "var" declaration. (CodeDescription: none) |para2|

param expr = 1 + 2
//@[00:18) [BCP259 (Error)] The parameter "expr" is assigned in the params file without being declared in the Bicep file. (CodeDescription: none) |param expr = 1 + 2|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public void GetBuiltInConfiguration_NoParameter_ReturnsBuiltInConfigurationWithA
}
},
"experimentalFeaturesEnabled": {
"extendableParamFiles": false,
polatengin marked this conversation as resolved.
Show resolved Hide resolved
"symbolicNameCodegen": false,
"extensibility": false,
"resourceTypedParamsAndOutputs": false,
Expand Down Expand Up @@ -195,6 +196,7 @@ public void GetBuiltInConfiguration_DisableAllAnalyzers_ReturnsBuiltInConfigurat
],
"analyzers": {},
"experimentalFeaturesEnabled": {
"extendableParamFiles": false,
"symbolicNameCodegen": false,
"extensibility": false,
"resourceTypedParamsAndOutputs": false,
Expand Down Expand Up @@ -309,6 +311,7 @@ public void GetBuiltInConfiguration_DisableAnalyzers_ReturnsBuiltInConfiguration
}
},
"experimentalFeaturesEnabled": {
"extendableParamFiles": false,
"symbolicNameCodegen": false,
"extensibility": false,
"resourceTypedParamsAndOutputs": false,
Expand Down Expand Up @@ -751,6 +754,7 @@ public void GetConfiguration_ValidCustomConfiguration_OverridesBuiltInConfigurat
},
"cacheRootDirectory": "/home/username/.bicep/cache",
"experimentalFeaturesEnabled": {
"extendableParamFiles": false,
"symbolicNameCodegen": false,
"extensibility": true,
"resourceTypedParamsAndOutputs": false,
Expand Down
3 changes: 3 additions & 0 deletions src/Bicep.Core.UnitTests/Features/FeatureProviderOverrides.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public record FeatureProviderOverrides(
bool? OptionalModuleNamesEnabled = default,
bool? LocalDeployEnabled = default,
bool? ResourceDerivedTypesEnabled = default,
bool? ExtendableParamFilesEnabled = default,
string? AssemblyVersion = BicepTestConstants.DevAssemblyFileVersion)
{
public FeatureProviderOverrides(
Expand All @@ -40,6 +41,7 @@ public FeatureProviderOverrides(
bool? OptionalModuleNamesEnabled = default,
bool? LocalDeployEnabled = default,
bool? ResourceDerivedTypesEnabled = default,
bool? ExtendableParamFilesEnabled = default,
string? AssemblyVersion = BicepTestConstants.DevAssemblyFileVersion
) : this(
FileHelper.GetCacheRootPath(testContext),
Expand All @@ -57,6 +59,7 @@ public FeatureProviderOverrides(
OptionalModuleNamesEnabled,
LocalDeployEnabled,
ResourceDerivedTypesEnabled,
ExtendableParamFilesEnabled,
AssemblyVersion)
{ }
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ public OverriddenFeatureProvider(IFeatureProvider features, FeatureProviderOverr
public bool LocalDeployEnabled => overrides.LocalDeployEnabled ?? features.LocalDeployEnabled;

public bool ResourceDerivedTypesEnabled => overrides.ResourceDerivedTypesEnabled ?? features.ResourceDerivedTypesEnabled;

public bool ExtendableParamFilesEnabled => overrides.ExtendableParamFilesEnabled ?? features.ExtendableParamFilesEnabled;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Bicep.Core.Configuration;
public record ExperimentalFeaturesEnabled(
bool SymbolicNameCodegen,
bool Extensibility,
bool ExtendableParamFiles,
bool ResourceTypedParamsAndOutputs,
bool SourceMapping,
bool LegacyFormatter,
Expand Down
17 changes: 16 additions & 1 deletion src/Bicep.Core/Diagnostics/DiagnosticBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,7 @@ public ErrorDiagnostic IndexOutOfBounds(string typeName, long tupleLength, long
public ErrorDiagnostic UnrecognizedParamsFileDeclaration() => new(
TextSpan,
"BCP337",
$@"This declaration type is not valid for a Bicep Parameters file. Specify a ""{LanguageConstants.UsingKeyword}"", ""{LanguageConstants.ParameterKeyword}"" or ""{LanguageConstants.VariableKeyword}"" declaration.");
$@"This declaration type is not valid for a Bicep Parameters file. Specify a ""{LanguageConstants.UsingKeyword}"", ""{LanguageConstants.ExtendsKeyword}"", ""{LanguageConstants.ParameterKeyword}"" or ""{LanguageConstants.VariableKeyword}"" declaration.");

public ErrorDiagnostic FailedToEvaluateParameter(string parameterName, string message) => new(
TextSpan,
Expand Down Expand Up @@ -2196,6 +2196,21 @@ public FixableDiagnostic ProviderDeclarationViaImportKeywordIsDeprecated(Provide
warnInsteadOfError ? DiagnosticLevel.Warning : DiagnosticLevel.Error,
"BCP403",
$"The enclosing array expects elements of type \"{expectedType}\", but the array being spread contains elements of incompatible type \"{actualType}\".");

public ErrorDiagnostic ExtendsPathHasNotBeenSpecified() => new(
TextSpan,
"BCP404",
polatengin marked this conversation as resolved.
Show resolved Hide resolved
$"The \"{LanguageConstants.ExtendsKeyword}\" declaration is missing a bicepparam file path reference.");

public ErrorDiagnostic MoreThanOneExtendsDeclarationSpecified() => new(
TextSpan,
"BCP405",
$"More than one \"{LanguageConstants.ExtendsKeyword}\" declaration are present");

public ErrorDiagnostic ExtendsNotSupported() => new(
TextSpan,
"BCP406",
$"The \"{LanguageConstants.ExtendsKeyword}\" keyword is not supported");
}

public static DiagnosticBuilderInternal ForPosition(TextSpan span)
Expand Down
6 changes: 5 additions & 1 deletion src/Bicep.Core/Emit/CompilationEmitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public CompilationEmitter(Compilation compilation)
public ParametersResult Parameters()
{
var model = compilation.GetEntrypointSemanticModel();
if (model.SourceFileKind != Workspaces.BicepSourceFileKind.ParamsFile)
if (model.SourceFileKind != BicepSourceFileKind.ParamsFile)
{
throw new InvalidOperationException($"Entry-point {model.Root.FileUri} is not a parameters file");
}
Expand Down Expand Up @@ -78,6 +78,10 @@ public ParametersResult Parameters()
{
return new ParametersResult(true, diagnostics, parametersData, templateSpecModel.SourceFile.TemplateSpecId, null);
}
case EmptySemanticModel _:
{
return new ParametersResult(true, diagnostics, parametersData, null, null);
}
}

throw new InvalidOperationException($"Invalid semantic model of type {usingModel.GetType()}");
Expand Down
Loading
Loading