Skip to content

Ruleset hardening: remove deprecated APIs and define app resources - #11668

Open
Jesper Schulz-Wedde (JesperSchulz) wants to merge 4 commits into
mainfrom
jesperschulz-ruleset-deprecated-resources
Open

Jesper Schulz-Wedde (JesperSchulz) wants to merge 4 commits into
mainfrom
jesperschulz-ruleset-deprecated-resources

Conversation

@JesperSchulz

@JesperSchulz Jesper Schulz-Wedde (JesperSchulz) commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

What & why

Promotes exactly AL0667 and AL1025 from Warning to Error by fixing their live root causes. No analyzer pragmas or site-scoped suppressions were added.

AL0667 reconciliation

The old compiler census contained 228 records. Reconciliation against current origin/main found 106 live deprecated constructs; duplicate localization/view projections and deleted source explain the difference.

Category Old records Live fixes Replacement
FindSet(..., UpdateKey) 107 41 Removed the unused second parameter while preserving ForUpdate.
[InDataSet] 44 44 Removed the unused attribute.
no-op part Editable 27 0 No live sites remain.
Report.DefaultLayout 21 5 Resolve the default through Report Metadata and Report Layout List.
CurrReport.PageNo 11 1 Removed the unsupported page-number reset; the RDLC layout already maintains per-customer page numbers from Globals!PageNumber. Getter sites already use PageNo().
NavApp.DeleteArchiveData 8 8 Removed runtime-30-inapplicable V1-to-V2 archive cleanup while retaining the upgrade codeunit identity.
Report.RdlcLayout 5 5 Query Report Layout List for an RDLC layout before rendering, preserving layout type and selected/external layout behavior.
OptionString 2 0 No live sites remain.
CurrReport.CreateTotals 1 1 Removed it; the RDLC layout already uses scoped Sum(...).
[Scope('Internal')] 1 1 Replaced with supported OnPrem scope.
NewPage 1 0 No live sites remain.

AL1025 reconciliation

The old census contained 36 records across 20 projects: 32 live data-exchange XML assets are now intentionally packaged through precise AppResources resourceFolders entries in 16 apps; the obsolete APIV1 test-planning text file was deleted; three old UTREPPurchasePayables.Codeunit.al.txt backup paths were already absent on live main. Each XML definition was reconciled to its AL data-exchange code and project, and no runtime resource path was moved.

The ruleset is now 63 total / 54 Warning / 8 None / 1 Hidden. AL0424 remains Warning unchanged.

Linked work

AB#640773

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome

  • Reconciled all 228 AL0667 and 36 AL1025 old-census records to project-attributed live paths; maps are retained in the agent session artifacts.
  • Re-scanned current source after the fixes: zero two-parameter FindSet, [InDataSet], deprecated report layout API, page-number setter, CreateTotals, DeleteArchiveData, or Scope('Internal') sites remain.
  • Parsed every affected app.json; verified all 32 XML files are covered and all four debris paths are absent after the change.
  • Invoke-MiSnapApp with RepoBranchName=main: no missing propagation files.
  • git diff --check: clean; AL CRLF/BOM audit found no line-ending conversions.
  • Focused BCQuality review: no behavior, upgrade, layout-selection, or packaging findings.
  • AL MCP compile was attempted, but the public symbol source returned 0/3 packages and no package cache is available. Clean + Default CI are therefore the hard current-compiler gate.

No new tests are needed for the mechanical overload/attribute removals. Existing report-layout tests now assert the default Word layout through the supported metadata/list model; existing RDLC Sum and page-number expressions preserve report behavior.

Risk & compatibility

The report changes preserve format/default selection and allow selected/external layouts to continue flowing through Report.SaveAs. The QuickBooks upgrade object remains present; only the unsupported V1 archive cleanup calls are removed. Resource folders include only the existing intended assets (plus the existing AMC logo in its already dedicated folder).

Jesper Schulz-Wedde and others added 4 commits September 21, 2026 15:46
Replace deprecated compiler APIs with supported overloads and report layout metadata, remove unused attributes, and retire obsolete V1 archive cleanup.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Declare AppResources folders for data exchange XML assets and remove an obsolete APIV1 test planning file.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove the warning overrides after fixing all live compiler sites.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Validate the default Word layout through the supported Report Metadata and Report Layout List records.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Sep 21, 2026
@github-actions github-actions Bot added Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration labels Sep 21, 2026
@github-actions github-actions Bot modified the milestone: Version 30.0 Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant