Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
L ldpl
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Lartu
  • ldpl
  • Merge requests
  • !88

Merged
Created May 10, 2019 by Lartu@lartu🐕Maintainer

Make -i include order match what's passed

  • Overview 1
  • Commits 1
  • Changes 1

Created by: dvkt

Files passed to -i= on the command line are being compiled in the reverse order given, leading to (unexpected?) dependency issues.

For example:

$ cat a.ldpl 
DATA:
a is text

$ cat b.ldpl 
DATA:
b is text

PROCEDURE:
store "yay" in a

$ cat c.ldpl  
PROCEDURE:
display a crlf
display b crlf

$ ldpl -i=a.ldpl -i=b.ldpl c.ldpl 
LDPL Error: Malformed statement (b.ldpl:5)

This errors because b.ldpl is actually compiled first right now. With this patch, running the same code above preserves the compilation order:

$ ldpl -i=a.ldpl -i=b.ldpl c.ldpl 
LDPL: Compiling...
* File(s) compiled successfully.
* Saved as c-bin
$ ./c-bin
yay

I know we're going to rework -i in the future but I thought this might be worth changing now.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: github/fork/dvkt/reverse-include-order