microsoft / microsoft/BCApps

[Bug]: Six Base Application reports still use backslash layout paths, so the app cannot compile on Linux

Open Beginner friendly
#11,199 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team: Integrations
Dominant language
AL
Stars
683
Forks
459
Avg merge
3d 26m
Merged PRs (30d)
633

Description

Describe the issue

Eighteen layout declarations across six Base Application report files still use Windows path
separators. The AL compiler rejects them on Linux with AL0363, and because metadata emit is atomic
per module, the entire compilation returns zero objects rather than only those six reports failing.

These are older files that were never updated when the rest of the codebase moved to forward
slashes. In the same Base Application, 457 layout declarations already use forward slashes and
only these 18 use backslashes:

file declarations
src/Inventory/Reports/InventoryCustomerSales.Report.al 3
src/Inventory/Reports/InventoryOrderDetails.Report.al 3
src/Inventory/Reports/InventorySalesBackOrders.Report.al 3
src/Manufacturing/Reports/InventoryValuationWIP.Report.al 3
src/Manufacturing/Reports/ProductionOrderStatistics.Report.al 3
src/Sales/Reports/CustomerOrderSummary.Report.al 3

Each declares three layouts. For example, in InventoryCustomerSales.Report.al:

LayoutFile = '.\Inventory\Reports\InventoryCustomerSales.xlsx';
LayoutFile = '.\Inventory\Reports\InventoryCustomerSales.docx';
LayoutFile = '.\Inventory\Reports\InventoryCustomerSales.rdlc';

A single sweep changing these to forward slashes matches what the other 457 declarations already do
and works on Windows and Linux alike.

Expected behavior

Base Application compiles on Linux. Forward slashes work on both platforms, so aligning these six
files with the rest of the codebase removes the only thing blocking it.

Everything else already compiles: with these eighteen values changed to forward slashes, I get
0 declaration errors, 7,850 objects emitted and 0 emit errors on the 28.1.49838 W1 source.

Steps to reproduce
  1. Take the src/ from the shipped Microsoft_Base Application app (measured on 28.1.49838, W1).
  2. Compile it on Linux with the AL compiler from the same artifact.
  3. 18 × AL0363 are reported for the six files above, and Compilation.Emit then throws
    AggregateException: Failure while emitting metadata for object: Report ... and returns 0 objects.

Two things worth noting, because they look like workarounds and are not:

  • The diagnostic cannot be suppressed. WithSpecificDiagnosticOptions("AL0363", Suppress) has no
    effect, because DiagnosticFilter.Filter returns it unchanged as IsNotConfigurable.
  • Excluding the six files does not help either. It cascades to 30 × AL0185 Report 'X' is missing
    and then 18 page metadata failures with Unable to cast BoundBadPropertyValue to BoundApplicationObjectReferencePropertyValue, and emit again returns 0 objects.
Additional context

I found this while compiling shipped apps from their own src/ to read the table metadata the
compiler produces. Nothing about the report layouts themselves is wrong — the files exist and the
declarations point at them correctly. It is only the separator that differs from the rest of the
codebase.

Happy to open the PR for the sweep.

Filed by an agent on behalf of the account holder.

  • I will provide a fix for a bug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the six named report files under src/Inventory/Reports, src/Manufacturing/Reports, and src/Sales/Reports, then inspect their three LayoutFile declarations each. Compare them with the other forward-slash declarations and compile the Base Application on Linux with the matching AL compiler. Done means the 18 AL0363 diagnostics are gone and compilation emits the expected objects without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.