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

Log telemetry for uses of deprecated features #1387

Merged
merged 9 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
15 changes: 15 additions & 0 deletions Actions/AL-Go-Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,21 @@ function OutputWarning {
}
}

function OutputDeprecationWarning {
Param(
[string] $message
aholstrup1 marked this conversation as resolved.
Show resolved Hide resolved
)
# Show deprecation warning in GitHub
OutputWarning -message $message

# Log deprecation warning to telemetry
$telemetryModule = Join-Path $PSScriptRoot 'TelemetryHelper.psm1'
aholstrup1 marked this conversation as resolved.
Show resolved Hide resolved
if (Test-Path $telemetryModule) {
Import-Module $telemetryModule
Trace-Information -Message "Deprecation warning: $message"
aholstrup1 marked this conversation as resolved.
Show resolved Hide resolved
}
}

function OutputNotice {
Param(
[string] $message
Expand Down
2 changes: 1 addition & 1 deletion Actions/RunPipeline/RunPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ try {
if ($buildMode -eq 'Clean' -and $settings.ContainsKey('cleanModePreprocessorSymbols')) {
Write-Host "Adding Preprocessor symbols : $($settings.cleanModePreprocessorSymbols -join ',')"
$runAlPipelineParams["preprocessorsymbols"] += $settings.cleanModePreprocessorSymbols
Write-Warning -message "cleanModePreprocessorSymbols is deprecated. See https://aka.ms/ALGoDeprecations#cleanModePreprocessorSymbols for more information."
OutputDeprecationWarning -message "cleanModePreprocessorSymbols is deprecated. See https://aka.ms/ALGoDeprecations#cleanModePreprocessorSymbols for more information."
}
# <--- REMOVE AFTER April 1st 2025

Expand Down
Loading