Skip to content

Provide package cache to aldoc when building reference documentation#2301

Open
spetersenms wants to merge 7 commits into
microsoft:mainfrom
spetersenms:spetersen/aldoc-refdoc-packagecache
Open

Provide package cache to aldoc when building reference documentation#2301
spetersenms wants to merge 7 commits into
microsoft:mainfrom
spetersenms:spetersen/aldoc-refdoc-packagecache

Conversation

@spetersenms

@spetersenms spetersenms commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

aldoc build was invoked with only --source, so it fell back to its default package cache ({source}/.alpackages) which does not exist for artifact-based apps. As a result every reference to another module was reported as 'Referenced module not loaded' and the corresponding links in the generated documentation were left unresolved.

Populate a package cache with all apps and their dependencies (the latter were already downloaded and computed by CalculateProjectsAndApps but never used) and pass it to aldoc via --packagecache so cross-module references resolve.

Fixes #2302

✅ Checklist

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios)
  • Add telemetry

aldoc build was invoked with only --source, so it fell back to its default
package cache ({source}/.alpackages) which does not exist for artifact-based
apps. As a result every reference to another module was reported as
'Referenced module not loaded' and the corresponding links in the generated
documentation were left unresolved.

Populate a package cache with all apps and their dependencies (the latter were
already downloaded and computed by CalculateProjectsAndApps but never used) and
pass it to aldoc via --packagecache so cross-module references resolve.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 3, 2026 09:41
@spetersenms spetersenms requested a review from a team as a code owner July 3, 2026 09:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes cross-module reference resolution in AL-Go's generated reference documentation. Previously aldoc build was called with only --source, so it fell back to its default (non-existent for artifact-based apps) .alpackages cache and reported every cross-module reference as "Referenced module not loaded", leaving documentation links unresolved. The change populates a dedicated ALDoc package cache with the target apps and their dependencies (already computed by CalculateProjectsAndApps but previously unused) and passes it via --packagecache.

Changes:

  • Added an optional -allDependencies parameter to GenerateDocsSite and a temporary package-cache folder that is populated with target apps + dependency apps and cleaned up in finally.
  • Passed --packagecache to the aldoc build invocation so cross-module references resolve.
  • Wired the existing $allDependencies return value from CalculateProjectsAndApps into both GenerateDocsSite call sites (release loop and main/current branch).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Actions/BuildReferenceDocumentation/BuildReferenceDocumentation.ps1 Passes -allDependencies to GenerateDocsSite for both the release and main documentation paths.
Actions/BuildReferenceDocumentation/BuildReferenceDocumentation.HelperFunctions.ps1 Adds -allDependencies parameter, builds and cleans up a package cache from apps + dependencies, and supplies --packagecache to aldoc build.

Comment thread Actions/BuildReferenceDocumentation/BuildReferenceDocumentation.ps1
spetersenms and others added 6 commits July 3, 2026 11:48
Covers the new behavior: apps and their dependencies are copied into a
package cache and aldoc build is invoked with --packagecache.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@aholstrup1 aholstrup1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Releasenote needs to be updated but otherwise looks fine

Comment thread RELEASENOTES.md
- Issue 2235 - Workspace compilation: only the first `customCodeCops` entry resolved when multiple relative paths were configured. Relative `customCodeCops` paths are now resolved against the project folder before being passed to the compiler.
- Issue 2265 - Creating a Performance Test App fails on Linux due to case-sensitive path lookup for the Performance Toolkit sample app
- Issue 2284 - GitHub App authentication fails with `401 (Unauthorized)` on runners with minor clock drift. The JWT `iat` claim is now backdated by 60 seconds instead of 10, as recommended by GitHub, to tolerate runners whose clock runs slightly ahead of GitHub.
- Issue 2302 - AlDoc does not use --packagecache when building reference documentation

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to be updated now that we shipped 9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: AlDoc does not use --packagecache when building reference documentation

3 participants