Skip to content

Why does directory.app.props.json hate "ponies". #8250

@rdebath

Description

@rdebath

Please include the following with each issue:

1. Describe the bug
If I name a variable in directory.app.props.json "horse" the substitutions occur correctly. If I call it "ponies" the substitution does not occur.

2. To Reproduce
Steps to reproduce the behavior:
Remove the "publisher" from app.json -- Also occurs if the publisher is set to "$(nobody)".
No *.al files required.

Put this in directory.app.props.json, the publisher generated on compile with alc.exe is "$(ponies)".

{
    "variables": {
        "ponies": "magic",
        "nobody": "$(ponies)"
    },
    "properties": {
        "publisher": "$(nobody)"
    }
}

However, if I change the variable name the publisher becomes "magic".

{
    "variables": {
        "horse": "magic",
        "nobody": "$(horse)"
    },
    "properties": {
        "publisher": "$(nobody)"
    }
}

3. Expected behavior
Refactoring the variable name should not change the processing, unless you hit a blacklist. No blacklist is documented.
Documented behaviour is to do the substitutions all the way down.

4. Actual behavior
Acts like "ponies" is not defined or is blacklisted.

5. Versions:

  • AL Language: Microsoft (R) AL Compiler version 17.0.34.45391
  • Visual Studio Code: 1.118.1 (system setup) -- Occurs when compiled from here too.
  • Business Central:
  • List of Visual Studio Code extensions that you have installed: VSCode not used.
  • Operating System:
    • Windows
    • [?] Linux
    • [?] MacOS

Final Checklist

Please remember to do the following:

  • Search the issue repository to ensure you are reporting a new issue

  • Reproduce the issue after disabling all extensions except the AL Language extension -- Happens when VSCode is not used.

  • Simplify your code around the issue to better isolate the problem

Internal work item: AB#634029

Metadata

Metadata

Assignees

Labels

acceptedal-toolsMicrosoft.Dynamics.BusinessCentral.Development.Tools or related packagesbugProduct bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions