Remove 43 unused DotNet alias declarations - #11013
Open
Darrick (darjoo) wants to merge 1 commit into
Open
Conversation
Delete 43 `type(...)` alias declarations from the DotNet Aliases app that have zero consumers anywhere in the repository. DotNet interop requires `target: OnPrem`, and partner/AppSource extensions target `Cloud`, so no external extension can declare a `DotNet` variable and therefore cannot consume an inherited alias. These declarations are first-party-internal surface with no external audience, so removal is a straight deletion rather than a deprecation. AL does not support obsoletion metadata on `dotnet` declarations. Verified before deleting: - Repo-wide scan of all 36,684 .al files for `:\s*DotNet\s+"?<alias>"?\s*[;)]` returned 0 usages for all 43 aliases. - Each alias is declared exactly once repo-wide, so matching by alias name is unambiguous. - A looser `DotNet\s+"?<alias>"?\b` scan across all other .al files also returned no references. Removed per assembly: - DocumentFormat.OpenXml 63 -> 53 (10 removed) - netstandard 198 -> 177 (21 removed) - System.Security.Cryptography.Xml 16 -> 9 ( 7 removed) - MimeKit 10 -> 8 ( 2 removed) - MailKit 7 -> 5 ( 2 removed) - System.Drawing.Common 15 -> 14 ( 1 removed) Total declarations 517 -> 474. All 49 assembly blocks are retained and none is emptied. Deliberately kept, as these are similar but in use: - `Cryptography.SymmetricAlgorithm` in Cryptography Management (10 usages); only the separate, unused `SymmetricAlgorithm` alias for the same CLR type was removed. - `EncoderParameter` and `EncoderParameters`; only the array form `EncoderParameter[]` / `EncoderParameterList` was removed. No consuming code, tests or app.json files were modified. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Darrick (darjoo)
temporarily deployed
to
triage
September 3, 2026 13:29 — with
GitHub Actions
Inactive
Darrick (darjoo)
marked this pull request as ready for review
September 3, 2026 14:07
Darrick (darjoo)
temporarily deployed
to
triage
September 3, 2026 14:07 — with
GitHub Actions
Inactive
Darrick (darjoo)
enabled auto-merge
September 4, 2026 07:24
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The
DotNet Aliasesapp exists purely to publish CLR type aliases that dependent apps inherit; it contains no code, justapp.json,README.mdanddotnet.al. Over time it accumulated alias declarations that nothing consumes. This PR deletes 43type(...)declarations that have zero consumers anywhere in the repository.This is a straight deletion rather than a deprecation. DotNet interop requires
target: OnPrem(and this app isOnPrem), while partner/AppSource extensions targetCloud, so no external extension can declare aDotNetvariable at all and therefore cannot consume an inherited alias either. That makes these declarations first-party-internal surface with no external audience. There is also nothing to obsolete: AL does not support obsoletion metadata ondotnetdeclarations.Deletion only. No consuming AL code, tests, or
app.jsonfiles were touched. The diff is 168 deletions and 0 insertions in a single file.Declarations removed per assembly:
Total
type()declarations go from 517 to 474. All 49assembly(...)blocks are retained and none is emptied.Linked work
Fixes AB#647963
How I validated this
What I tested and the outcome
I did not compile this change, and the two unchecked boxes above are accurate. Docker Desktop is not installed on my machine and no
alc.exeis present, so the container route inLOCAL_DEV_ENV.mdwas unavailable. Please treat compilation and runtime behavior as unverified and rely on CI plus a reviewer with a working container. Everything below is static verification only.Zero-usage scan, run both before and after the deletion:
.alfiles undersrcwith:\s*DotNet\s+"?<alias>"?\s*[;)]for each of the 43 aliases. Result: 0 usages for all 43, both before and after.DotNet\s+"?<alias>"?\bacross every other.alfile, also returned no references. This catches usages outside a plain variable declaration.src\Layers\W1\Tests\TestRunner-Internal\dotnet.aldeclares onlyProcessandEnvironmentyet usesWindowsIdentity,SecurityIdentifierandProcessStartInfoinherited fromTests-TestLibraries.Structural verification:
dotnet.alreports 0 errors and final brace depth 0 both before and after; brace counts balance at 524/524.assembly(...)block count is unchanged at 49, and the per-assembly counts in the table above were asserted programmatically.git diff --numstatreports0 168.{" occurrences and the 1 double-blank-line remain, and no new "blank line before}" was introduced.No tests were added because this removes declarations that have no consumers; there is no behavior to test, and any incorrect deletion would surface as a compile error rather than a runtime failure.
Risk & compatibility
Low risk, but worth a careful look at three near-miss cases that were deliberately kept:
SymmetricAlgorithmvsCryptography.SymmetricAlgorithm. The CLR typeSystem.Security.Cryptography.SymmetricAlgorithmwas declared twice under different aliases. The unused"SymmetricAlgorithm"alias inDotNet Aliasesis removed; the"Cryptography.SymmetricAlgorithm"alias inCryptography Management\src\dotnet.alis untouched and still has its 10 usages and 3 public interface pins. Note this was also the single declaration in the file where the CLR name was unquoted, so a regex expecting a quoted name would have missed it.EncoderParameter[]vs the scalar types. Only the array form, aliasedEncoderParameterList, is removed.EncoderParameterandEncoderParameterseach have a usage and remain.EnumValue`1andNullable`1contain a literal backtick and were matched literally. The other 7 backticked generic declarations in the file are untouched.Compatibility: because no first-party code references these aliases and no
Cloud-target extension can consume aDotNetalias at all, no breaking change is expected. There is no data, upgrade, permissions, or telemetry impact.Follow-up: a related cleanup covering 5 further dead aliases (4 in the W1/CZ test-library
dotnet.alfiles, plusSHA1ManagedinCryptography Management\src\dotnet.al) is out of scope here and not included in this PR.