Provide package cache to aldoc when building reference documentation#2301
Provide package cache to aldoc when building reference documentation#2301spetersenms wants to merge 7 commits into
Conversation
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>
There was a problem hiding this comment.
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
-allDependenciesparameter toGenerateDocsSiteand a temporary package-cache folder that is populated with target apps + dependency apps and cleaned up infinally. - Passed
--packagecacheto thealdoc buildinvocation so cross-module references resolve. - Wired the existing
$allDependenciesreturn value fromCalculateProjectsAndAppsinto bothGenerateDocsSitecall 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. |
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>
This reverts commit 4820ec0.
aholstrup1
left a comment
There was a problem hiding this comment.
Releasenote needs to be updated but otherwise looks fine
| - 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 |
There was a problem hiding this comment.
Need to be updated now that we shipped 9.1
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