Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!include Statement Processing section may require clarification (Bugzilla Bug 3002) #12

Open
tianocore-issues opened this issue Oct 9, 2020 · 4 comments

Comments

@tianocore-issues
Copy link

This issue was created automatically with bugzilla2github

Bugzilla Bug 3002

Date: 2020-10-09T16:21:03+00:00
From: Felix <>
To: unassigned <>
CC: @lgao4

Last updated: 2020-10-16T16:38:17+00:00

@tianocore-issues
Copy link
Author

Comment 13929

Date: 2020-10-09 16:21:03 +0000
From: Felix <>

  • Industry Specification: ---
  • Target OS: ---
  • Bugzilla Assignee(s): unassigned <>

Please review the following questions regarding the '!include Statement Processing' section of the DSC specification. If my understanding is correct, updates to the specification are required.

  1. "The file is relative to the directory that contains this DSC file, and if not found the tool must attempt to find the file relative to the paths listed in the system environment variable $(WORKSPACE)."

I believe paths from the PACKAGES_PATH are also supported by the implementation.

  1. "Macros, defined in this file, are permitted in the path or file name of the !include statement, as these files are included prior to processing the file for macros."

Problem 1: Sounds confusing. If "files are included prior to processing of the file for macros", how can macros be used during include processing?

Problem 2 "Macros, defined in this file" is an inaccurate statement in case of nested includes:
If A.dsc includes B.dsc, which includes C.dsc, macros from A.dsc are visible in B.dsc and C.dsc.

Suggested edit:
"Macros are permitted in the path or file name of the !include statement. Refer to section 2.2.6 for details regarding scopes of the macros."

  1. "The system environment variable $(WORKSPACE), may also be used; only these system environment variables are permitted to start the path of the included file."

Editorial issues: unneeded comma, singular/plural agreement.

Suggested edit:
"The system environment variable $(WORKSPACE) may also be used; only this system environment variable is permitted to start the path of the included file."

@tianocore-issues
Copy link
Author

Comment 13954

Date: 2020-10-13 21:37:08 +0000
From: @lgao4

Felix: can you contribute the patch and send it to edk2 mail list for review?

@tianocore-issues
Copy link
Author

Comment 14013

Date: 2020-10-16 16:37:35 +0000
From: Felix <>

Created attachment 581
Fix for issues #2 and #3

Attachment: BZ-581-IncludeFx.patch

@tianocore-issues
Copy link
Author

Comment 14014

Date: 2020-10-16 16:38:17 +0000
From: Felix <>

Liming,

#1 is not an issue. I found the following clarification in another part of the specification:
"For the remainder of this document, unless otherwise specified (using "system
environment variable, WORKSPACE"), references to the WORKSPACE and
$(WORKSPACE) refer to the ordered list of directories specified by the
combination of WORKSPACE + PACKAGES_PATH."

I'm attaching a patch for #2 and #3. I cannot submit it to list at the moment due to restrictions of the AMI network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant