Resolve relative customCodeCops paths in workspace compilation#2239
Merged
aholstrup1 merged 3 commits intomainfrom May 6, 2026
Merged
Conversation
…ation altool's workspace compile only resolves the first comma-separated --customanalyzers entry to an absolute path when dispatching alc.exe; the remaining entries stay relative and alc.exe resolves them against the per-app project folder where '.alcops' does not exist, yielding AL1006 errors. Resolve relative entries against the project folder up front in Get-CustomAnalyzers so altool always receives rooted paths.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes workspace compilation so multiple relative customCodeCops entries are resolved consistently before being passed to altool. It fits into AL-Go’s workspace compilation path by correcting how custom analyzer DLL paths are prepared for the compiler.
Changes:
- Updated
Get-CustomAnalyzersto convert relative analyzer paths to absolute paths based on the project folder. - Added unit tests covering rooted paths, relative paths, missing files, and default project-folder behavior.
- Added a release note for issue #2235.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Actions/.Modules/CompileFromWorkspace.psm1 |
Implements project-folder resolution for relative customCodeCops entries and updates function help text. |
Tests/CompileFromWorkspace.Test.ps1 |
Adds coverage for rooted, relative, and deferred analyzer-path resolution scenarios. |
RELEASENOTES.md |
Documents the workspace compilation fix for multi-analyzer relative paths. |
mazhelez
approved these changes
May 6, 2026
…-ps1-is-not-execu-08c550
spetersenms
approved these changes
May 6, 2026
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 & How
Get-CustomAnalyzersnow resolves relativecustomCodeCopsentries to absolute paths against the project folder before they are passed toaltool workspace compile.altoolonly resolves the first comma-separated--customanalyzersentry to absolute when dispatchingalc.exe; the rest stayed relative andalc.exeresolved them against the per-app project folder, where.alcopsdid not exist — yieldingAL1006errors for every analyzer except the first. URL entries and already-rooted paths are unchanged. The non-workspaceRun-AlPipelinepath is untouched.Note: the issue title was about
PipelineInitialize.ps1not firing under workspace compilation. That part is by design —PipelineInitializeis aRun-AlPipelinelifecycle hook. The right hook for compile-time setup with workspace compilation isPreCompileApp.ps1. Once users switch toPreCompileApp.ps1, this fix unblocks the multi-analyzer scenario.Related to issue: #2235
✅ Checklist