-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove UserDefinedTypes feature flag (#11461)
Resolves #4158 This PR also updates the TemplateWriter to target a non-experimental ARM languageVersion that allows type definitions (2.0). Templates using experimental ARM features (e.g., extensibility and asserts) now target the 2.1-experimental language version. The languageVersion change entailed a large number of baseline changes. These are included in this PR in a separate commit, and I'll go through and flag any unexpected baseline change. ###### Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/Azure/bicep/pull/11461&drop=dogfoodAlpha
- Loading branch information
Showing
315 changed files
with
1,851 additions
and
2,037 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/Bicep.Cli/Helpers/ExperimentalFeatureWarningProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Immutable; | ||
using System.Linq; | ||
using Bicep.Core.Features; | ||
using Bicep.Core.Workspaces; | ||
|
||
namespace Bicep.Cli.Helpers; | ||
|
||
public static class ExperimentalFeatureWarningProvider | ||
{ | ||
public static string? TryGetEnabledExperimentalFeatureWarningMessage(SourceFileGrouping sourceFileGrouping, IFeatureProviderFactory featureProviderFactory) | ||
{ | ||
var experimentalFeaturesEnabled = sourceFileGrouping.SourceFiles | ||
.Select(file => featureProviderFactory.GetFeatureProvider(file.FileUri)) | ||
.SelectMany(static features => features.EnabledFeatureMetadata.Where(f => f.impactsCompilation).Select(f => f.name)) | ||
.Distinct() | ||
.ToImmutableArray(); | ||
|
||
return experimentalFeaturesEnabled.Any() | ||
? string.Format(CliResources.ExperimentalFeaturesDisclaimerMessage, string.Join(", ", experimentalFeaturesEnabled)) | ||
: null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.