Discussion:
[edk2] Question on DSC double includes
El-Haj-Mahmoud, Samer
2015-06-30 17:54:11 UTC
Permalink
The DSC Spec v1.24 explicitly says: "File specified by !include statements may not contain !include statements.".

Based on the version history, this was added in v1.22a in December, 2011.

Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).

Thanks,
--Samer
Andrew Fish
2015-06-30 18:03:11 UTC
Permalink
The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.
Based on the version history, this was added in v1.22a in December, 2011.
Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).
+1 on this one!

Also there are times that this will fail.
!include A.dsc
!include B.dsc

And doing ‘!include’ breaks line numbers in a lot of error messages.

Thanks,

Andrew Fish
Thanks,
--Samer
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
El-Haj-Mahmoud, Samer
2015-06-30 20:34:24 UTC
Permalink
Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.

I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?


From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:03 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 10:54 AM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.

Based on the version history, this was added in v1.22a in December, 2011.

Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).


+1 on this one!

Also there are times that this will fail.
!include A.dsc
!include B.dsc

And doing ‘!include’ breaks line numbers in a lot of error messages.

Thanks,

Andrew Fish


Thanks,
--Samer


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Andrew Fish
2015-06-30 20:55:56 UTC
Permalink
Post by El-Haj-Mahmoud, Samer
Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.
Thanks!
Post by El-Haj-Mahmoud, Samer
I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?
My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.
Post by El-Haj-Mahmoud, Samer
Sent: Tuesday, June 30, 2015 1:03 PM
Subject: Re: [edk2] Question on DSC double includes
The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.
From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..

May in this context is optional, so an implementation that included more nesting would be OK per the spec.

From a specification point of view the correct forms are MUST NOT, or SHALL NOT.

While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.

https://www.ietf.org/rfc/rfc2119.txt <https://www.ietf.org/rfc/rfc2119.txt>
1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the
definition is an absolute requirement of the specification.

2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
definition is an absolute prohibition of the specification.

3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.

4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full
implications should be understood and the case carefully weighed
before implementing any behavior described with this label.
5. MAY This word, or the adjective "OPTIONAL", mean that an item is
truly optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels that
it enhances the product while another vendor may omit the same item.
An implementation which does not include a particular option MUST be
prepared to interoperate with another implementation which does
include the option, though perhaps with reduced functionality. In the
same vein an implementation which does include a particular option
MUST be prepared to interoperate with another implementation which
does not include the option (except, of course, for the feature the
option provides.)

6. Guidance in the use of these Imperatives

Imperatives of the type defined in this memo must be used with care
and sparingly. In particular, they MUST only be used where it is
actually required for interoperation or to limit behavior which has
potential for causing harm (e.g., limiting retransmisssions) For
example, they must not be used to try to impose a particular method
on implementors where the method is not required for
interoperability.

7. Security Considerations

These terms are frequently used to specify behavior with security
implications. The effects on security of not implementing a MUST or
SHOULD, or doing something the specification says MUST NOT or SHOULD
NOT be done may be very subtle. Document authors should take the time
to elaborate the security implications of not following
recommendations or requirements as most implementors will not have
had the benefit of the experience and discussion that produced the
specification.


Thanks,

Andrew Fish
Post by El-Haj-Mahmoud, Samer
Based on the version history, this was added in v1.22a in December, 2011.
Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).
+1 on this one!
Also there are times that this will fail.
!include A.dsc
!include B.dsc
And doing ‘!include’ breaks line numbers in a lot of error messages.
Thanks,
Andrew Fish
Thanks,
--Samer
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Hauch, Larry
2015-06-30 21:54:10 UTC
Permalink
Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.

I will update statements in the specs from “may not” to “should not”.

For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.

We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.

Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842


From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:56 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 1:34 PM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.

Thanks!




I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?



My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.




From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:03 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 10:54 AM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.

From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..

May in this context is optional, so an implementation that included more nesting would be OK per the spec.

From a specification point of view the correct forms are MUST NOT, or SHALL NOT.

While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.

https://www.ietf.org/rfc/rfc2119.txt

1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the

definition is an absolute requirement of the specification.



2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the

definition is an absolute prohibition of the specification.



3. SHOULD This word, or the adjective "RECOMMENDED", mean that there

may exist valid reasons in particular circumstances to ignore a

particular item, but the full implications must be understood and

carefully weighed before choosing a different course.



4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that

there may exist valid reasons in particular circumstances when the

particular behavior is acceptable or even useful, but the full

implications should be understood and the case carefully weighed

before implementing any behavior described with this label.

5. MAY This word, or the adjective "OPTIONAL", mean that an item is

truly optional. One vendor may choose to include the item because a

particular marketplace requires it or because the vendor feels that

it enhances the product while another vendor may omit the same item.

An implementation which does not include a particular option MUST be

prepared to interoperate with another implementation which does

include the option, though perhaps with reduced functionality. In the

same vein an implementation which does include a particular option

MUST be prepared to interoperate with another implementation which

does not include the option (except, of course, for the feature the

option provides.)



6. Guidance in the use of these Imperatives



Imperatives of the type defined in this memo must be used with care

and sparingly. In particular, they MUST only be used where it is

actually required for interoperation or to limit behavior which has

potential for causing harm (e.g., limiting retransmisssions) For

example, they must not be used to try to impose a particular method

on implementors where the method is not required for

interoperability.



7. Security Considerations



These terms are frequently used to specify behavior with security

implications. The effects on security of not implementing a MUST or

SHOULD, or doing something the specification says MUST NOT or SHOULD

NOT be done may be very subtle. Document authors should take the time

to elaborate the security implications of not following

recommendations or requirements as most implementors will not have

had the benefit of the experience and discussion that produced the

specification.


Thanks,

Andrew Fish



Based on the version history, this was added in v1.22a in December, 2011.

Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).


+1 on this one!

Also there are times that this will fail.
!include A.dsc
!include B.dsc

And doing ‘!include’ breaks line numbers in a lot of error messages.

Thanks,

Andrew Fish



Thanks,
--Samer


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
El-Haj-Mahmoud, Samer
2015-06-30 23:13:20 UTC
Permalink
Thanks Larry! This is a good plan.

I will submit the patches for the back to back !include fix, as well as the nested !includes

Thanks,
--Samer

From: Hauch, Larry [mailto:***@intel.com]
Sent: Tuesday, June 30, 2015 4:54 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Question on DSC double includes

Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.

I will update statements in the specs from “may not” to “should not”.

For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.

We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.

Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842


From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:56 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 1:34 PM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.

Thanks!



I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?



My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.



From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:03 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 10:54 AM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.

From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..

May in this context is optional, so an implementation that included more nesting would be OK per the spec.

From a specification point of view the correct forms are MUST NOT, or SHALL NOT.

While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.

https://www.ietf.org/rfc/rfc2119.txt

1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the

definition is an absolute requirement of the specification.



2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the

definition is an absolute prohibition of the specification.



3. SHOULD This word, or the adjective "RECOMMENDED", mean that there

may exist valid reasons in particular circumstances to ignore a

particular item, but the full implications must be understood and

carefully weighed before choosing a different course.



4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that

there may exist valid reasons in particular circumstances when the

particular behavior is acceptable or even useful, but the full

implications should be understood and the case carefully weighed

before implementing any behavior described with this label.

5. MAY This word, or the adjective "OPTIONAL", mean that an item is

truly optional. One vendor may choose to include the item because a

particular marketplace requires it or because the vendor feels that

it enhances the product while another vendor may omit the same item.

An implementation which does not include a particular option MUST be

prepared to interoperate with another implementation which does

include the option, though perhaps with reduced functionality. In the

same vein an implementation which does include a particular option

MUST be prepared to interoperate with another implementation which

does not include the option (except, of course, for the feature the

option provides.)



6. Guidance in the use of these Imperatives



Imperatives of the type defined in this memo must be used with care

and sparingly. In particular, they MUST only be used where it is

actually required for interoperation or to limit behavior which has

potential for causing harm (e.g., limiting retransmisssions) For

example, they must not be used to try to impose a particular method

on implementors where the method is not required for

interoperability.



7. Security Considerations



These terms are frequently used to specify behavior with security

implications. The effects on security of not implementing a MUST or

SHOULD, or doing something the specification says MUST NOT or SHOULD

NOT be done may be very subtle. Document authors should take the time

to elaborate the security implications of not following

recommendations or requirements as most implementors will not have

had the benefit of the experience and discussion that produced the

specification.


Thanks,

Andrew Fish


Based on the version history, this was added in v1.22a in December, 2011.

Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).


+1 on this one!

Also there are times that this will fail.
!include A.dsc
!include B.dsc

And doing ‘!include’ breaks line numbers in a lot of error messages.

Thanks,

Andrew Fish


Thanks,
--Samer


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Gao, Liming
2015-07-01 02:12:29 UTC
Permalink
Samer:
What means back to back !include? What issue is it? Could you give one sample for it?

Thanks
Liming
From: El-Haj-Mahmoud, Samer [mailto:samer.el-haj-***@hp.com]
Sent: Wednesday, July 01, 2015 7:13 AM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Question on DSC double includes

Thanks Larry! This is a good plan.

I will submit the patches for the back to back !include fix, as well as the nested !includes

Thanks,
--Samer

From: Hauch, Larry [mailto:***@intel.com]
Sent: Tuesday, June 30, 2015 4:54 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes

Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.

I will update statements in the specs from “may not” to “should not”.

For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.

We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.

Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842


From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:56 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 1:34 PM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.

Thanks!



I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?



My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.



From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:03 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 10:54 AM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.

From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..

May in this context is optional, so an implementation that included more nesting would be OK per the spec.

From a specification point of view the correct forms are MUST NOT, or SHALL NOT.

While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.

https://www.ietf.org/rfc/rfc2119.txt

1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the

definition is an absolute requirement of the specification.



2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the

definition is an absolute prohibition of the specification.



3. SHOULD This word, or the adjective "RECOMMENDED", mean that there

may exist valid reasons in particular circumstances to ignore a

particular item, but the full implications must be understood and

carefully weighed before choosing a different course.



4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that

there may exist valid reasons in particular circumstances when the

particular behavior is acceptable or even useful, but the full

implications should be understood and the case carefully weighed

before implementing any behavior described with this label.

5. MAY This word, or the adjective "OPTIONAL", mean that an item is

truly optional. One vendor may choose to include the item because a

particular marketplace requires it or because the vendor feels that

it enhances the product while another vendor may omit the same item.

An implementation which does not include a particular option MUST be

prepared to interoperate with another implementation which does

include the option, though perhaps with reduced functionality. In the

same vein an implementation which does include a particular option

MUST be prepared to interoperate with another implementation which

does not include the option (except, of course, for the feature the

option provides.)



6. Guidance in the use of these Imperatives



Imperatives of the type defined in this memo must be used with care

and sparingly. In particular, they MUST only be used where it is

actually required for interoperation or to limit behavior which has

potential for causing harm (e.g., limiting retransmisssions) For

example, they must not be used to try to impose a particular method

on implementors where the method is not required for

interoperability.



7. Security Considerations



These terms are frequently used to specify behavior with security

implications. The effects on security of not implementing a MUST or

SHOULD, or doing something the specification says MUST NOT or SHOULD

NOT be done may be very subtle. Document authors should take the time

to elaborate the security implications of not following

recommendations or requirements as most implementors will not have

had the benefit of the experience and discussion that produced the

specification.


Thanks,

Andrew Fish


Based on the version history, this was added in v1.22a in December, 2011.

Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).


+1 on this one!

Also there are times that this will fail.
!include A.dsc
!include B.dsc

And doing ‘!include’ breaks line numbers in a lot of error messages.

Thanks,

Andrew Fish

Thanks,
--Samer


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Andrew Fish
2015-07-01 02:24:30 UTC
Permalink
Post by Gao, Liming
What means back to back !include? What issue is it? Could you give one sample for it?
I posted an example on the mailing list of the failure a while back.

Thanks,

Andrew Fish
Post by Gao, Liming
Thanks
Liming
Sent: Wednesday, July 01, 2015 7:13 AM
Subject: Re: [edk2] Question on DSC double includes
Thanks Larry! This is a good plan.
I will submit the patches for the back to back !include fix, as well as the nested !includes
Thanks,
--Samer
Sent: Tuesday, June 30, 2015 4:54 PM
Subject: Re: [edk2] Question on DSC double includes
Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.
I will update statements in the specs from “may not” to “should not”.
For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.
We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.
Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842
Sent: Tuesday, June 30, 2015 1:56 PM
Subject: Re: [edk2] Question on DSC double includes
Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.
Thanks!
I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?
My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.
Sent: Tuesday, June 30, 2015 1:03 PM
Subject: Re: [edk2] Question on DSC double includes
The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.
From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..
May in this context is optional, so an implementation that included more nesting would be OK per the spec.
From a specification point of view the correct forms are MUST NOT, or SHALL NOT.
While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.
https://www.ietf.org/rfc/rfc2119.txt <https://www.ietf.org/rfc/rfc2119.txt>
1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the
definition is an absolute requirement of the specification.
2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
definition is an absolute prohibition of the specification.
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.
4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full
implications should be understood and the case carefully weighed
before implementing any behavior described with this label.
5. MAY This word, or the adjective "OPTIONAL", mean that an item is
truly optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels that
it enhances the product while another vendor may omit the same item.
An implementation which does not include a particular option MUST be
prepared to interoperate with another implementation which does
include the option, though perhaps with reduced functionality. In the
same vein an implementation which does include a particular option
MUST be prepared to interoperate with another implementation which
does not include the option (except, of course, for the feature the
option provides.)
6. Guidance in the use of these Imperatives
Imperatives of the type defined in this memo must be used with care
and sparingly. In particular, they MUST only be used where it is
actually required for interoperation or to limit behavior which has
potential for causing harm (e.g., limiting retransmisssions) For
example, they must not be used to try to impose a particular method
on implementors where the method is not required for
interoperability.
7. Security Considerations
These terms are frequently used to specify behavior with security
implications. The effects on security of not implementing a MUST or
SHOULD, or doing something the specification says MUST NOT or SHOULD
NOT be done may be very subtle. Document authors should take the time
to elaborate the security implications of not following
recommendations or requirements as most implementors will not have
had the benefit of the experience and discussion that produced the
specification.
Thanks,
Andrew Fish
Based on the version history, this was added in v1.22a in December, 2011.
Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).
+1 on this one!
Also there are times that this will fail.
!include A.dsc
!include B.dsc
And doing ‘!include’ breaks line numbers in a lot of error messages.
Thanks,
Andrew Fish
Thanks,
--Samer
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Gao, Liming
2015-07-01 02:34:09 UTC
Permalink
This case? I think it is supported. We have similar cases that can work.

!include A.dsc
!include B.dsc


From: Andrew Fish [mailto:***@apple.com]
Sent: Wednesday, July 01, 2015 10:25 AM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 7:12 PM, Gao, Liming <***@intel.com<mailto:***@intel.com>> wrote:

Samer:
What means back to back !include? What issue is it? Could you give one sample for it?


I posted an example on the mailing list of the failure a while back.

Thanks,

Andrew Fish


Thanks
Liming
From: El-Haj-Mahmoud, Samer [mailto:samer.el-haj-***@hp.com]
Sent: Wednesday, July 01, 2015 7:13 AM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes

Thanks Larry! This is a good plan.

I will submit the patches for the back to back !include fix, as well as the nested !includes

Thanks,
--Samer

From: Hauch, Larry [mailto:***@intel.com]
Sent: Tuesday, June 30, 2015 4:54 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes

Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.

I will update statements in the specs from “may not” to “should not”.

For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.

We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.

Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842


From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:56 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 1:34 PM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.

Thanks!



I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?



My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.



From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:03 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 10:54 AM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.

From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..

May in this context is optional, so an implementation that included more nesting would be OK per the spec.

From a specification point of view the correct forms are MUST NOT, or SHALL NOT.

While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.

https://www.ietf.org/rfc/rfc2119.txt

1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the

definition is an absolute requirement of the specification.



2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the

definition is an absolute prohibition of the specification.



3. SHOULD This word, or the adjective "RECOMMENDED", mean that there

may exist valid reasons in particular circumstances to ignore a

particular item, but the full implications must be understood and

carefully weighed before choosing a different course.



4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that

there may exist valid reasons in particular circumstances when the

particular behavior is acceptable or even useful, but the full

implications should be understood and the case carefully weighed

before implementing any behavior described with this label.

5. MAY This word, or the adjective "OPTIONAL", mean that an item is

truly optional. One vendor may choose to include the item because a

particular marketplace requires it or because the vendor feels that

it enhances the product while another vendor may omit the same item.

An implementation which does not include a particular option MUST be

prepared to interoperate with another implementation which does

include the option, though perhaps with reduced functionality. In the

same vein an implementation which does include a particular option

MUST be prepared to interoperate with another implementation which

does not include the option (except, of course, for the feature the

option provides.)



6. Guidance in the use of these Imperatives



Imperatives of the type defined in this memo must be used with care

and sparingly. In particular, they MUST only be used where it is

actually required for interoperation or to limit behavior which has

potential for causing harm (e.g., limiting retransmisssions) For

example, they must not be used to try to impose a particular method

on implementors where the method is not required for

interoperability.



7. Security Considerations



These terms are frequently used to specify behavior with security

implications. The effects on security of not implementing a MUST or

SHOULD, or doing something the specification says MUST NOT or SHOULD

NOT be done may be very subtle. Document authors should take the time

to elaborate the security implications of not following

recommendations or requirements as most implementors will not have

had the benefit of the experience and discussion that produced the

specification.


Thanks,

Andrew Fish


Based on the version history, this was added in v1.22a in December, 2011.

Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).


+1 on this one!

Also there are times that this will fail.
!include A.dsc
!include B.dsc

And doing ‘!include’ breaks line numbers in a lot of error messages.

Thanks,

Andrew Fish

Thanks,
--Samer


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Ni, Ruiyu
2015-07-01 07:05:57 UTC
Permalink
I think they are saying A.dsc includes B.dsc, which nestly includes C.dsc.
I vote Andrew’s solution to provide the correct line number. It’s not a complex problem for tool to resolve.

From: Gao, Liming [mailto:***@intel.com]
Sent: Wednesday, July 1, 2015 10:34 AM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Question on DSC double includes

This case? I think it is supported. We have similar cases that can work.

!include A.dsc
!include B.dsc


From: Andrew Fish [mailto:***@apple.com]
Sent: Wednesday, July 01, 2015 10:25 AM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 7:12 PM, Gao, Liming <***@intel.com<mailto:***@intel.com>> wrote:

Samer:
What means back to back !include? What issue is it? Could you give one sample for it?


I posted an example on the mailing list of the failure a while back.

Thanks,

Andrew Fish

Thanks
Liming
From: El-Haj-Mahmoud, Samer [mailto:samer.el-haj-***@hp.com]
Sent: Wednesday, July 01, 2015 7:13 AM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes

Thanks Larry! This is a good plan.

I will submit the patches for the back to back !include fix, as well as the nested !includes

Thanks,
--Samer

From: Hauch, Larry [mailto:***@intel.com]
Sent: Tuesday, June 30, 2015 4:54 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes

Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.

I will update statements in the specs from “may not” to “should not”.

For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.

We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.

Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842


From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:56 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 1:34 PM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.

Thanks!



I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?



My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.



From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:03 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 10:54 AM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.

From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..

May in this context is optional, so an implementation that included more nesting would be OK per the spec.

From a specification point of view the correct forms are MUST NOT, or SHALL NOT.

While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.

https://www.ietf.org/rfc/rfc2119.txt

1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the

definition is an absolute requirement of the specification.



2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the

definition is an absolute prohibition of the specification.



3. SHOULD This word, or the adjective "RECOMMENDED", mean that there

may exist valid reasons in particular circumstances to ignore a

particular item, but the full implications must be understood and

carefully weighed before choosing a different course.



4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that

there may exist valid reasons in particular circumstances when the

particular behavior is acceptable or even useful, but the full

implications should be understood and the case carefully weighed

before implementing any behavior described with this label.

5. MAY This word, or the adjective "OPTIONAL", mean that an item is

truly optional. One vendor may choose to include the item because a

particular marketplace requires it or because the vendor feels that

it enhances the product while another vendor may omit the same item.

An implementation which does not include a particular option MUST be

prepared to interoperate with another implementation which does

include the option, though perhaps with reduced functionality. In the

same vein an implementation which does include a particular option

MUST be prepared to interoperate with another implementation which

does not include the option (except, of course, for the feature the

option provides.)



6. Guidance in the use of these Imperatives



Imperatives of the type defined in this memo must be used with care

and sparingly. In particular, they MUST only be used where it is

actually required for interoperation or to limit behavior which has

potential for causing harm (e.g., limiting retransmisssions) For

example, they must not be used to try to impose a particular method

on implementors where the method is not required for

interoperability.



7. Security Considerations



These terms are frequently used to specify behavior with security

implications. The effects on security of not implementing a MUST or

SHOULD, or doing something the specification says MUST NOT or SHOULD

NOT be done may be very subtle. Document authors should take the time

to elaborate the security implications of not following

recommendations or requirements as most implementors will not have

had the benefit of the experience and discussion that produced the

specification.


Thanks,

Andrew Fish


Based on the version history, this was added in v1.22a in December, 2011.

Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).


+1 on this one!

Also there are times that this will fail.
!include A.dsc
!include B.dsc

And doing ‘!include’ breaks line numbers in a lot of error messages.

Thanks,

Andrew Fish

Thanks,
--Samer


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel
Andrew Fish
2015-07-01 17:55:23 UTC
Permalink
Post by Gao, Liming
This case? I think it is supported. We have similar cases that can work.
!include A.dsc
!include B.dsc
I hit a case where this failed. But only if no parseable data was between the !include statements. Maybe it has been fixed?

Thanks,

Andrew Fish
Post by Gao, Liming
Sent: Wednesday, July 01, 2015 10:25 AM
Subject: Re: [edk2] Question on DSC double includes
What means back to back !include? What issue is it? Could you give one sample for it?
I posted an example on the mailing list of the failure a while back.
Thanks,
Andrew Fish
Thanks
Liming
Sent: Wednesday, July 01, 2015 7:13 AM
Subject: Re: [edk2] Question on DSC double includes
Thanks Larry! This is a good plan.
I will submit the patches for the back to back !include fix, as well as the nested !includes
Thanks,
--Samer
Sent: Tuesday, June 30, 2015 4:54 PM
Subject: Re: [edk2] Question on DSC double includes
Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.
I will update statements in the specs from “may not” to “should not”.
For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.
We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.
Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842
Sent: Tuesday, June 30, 2015 1:56 PM
Subject: Re: [edk2] Question on DSC double includes
Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.
Thanks!
I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?
My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.
Sent: Tuesday, June 30, 2015 1:03 PM
Subject: Re: [edk2] Question on DSC double includes
The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.
From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..
May in this context is optional, so an implementation that included more nesting would be OK per the spec.
From a specification point of view the correct forms are MUST NOT, or SHALL NOT.
While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.
https://www.ietf.org/rfc/rfc2119.txt <https://www.ietf.org/rfc/rfc2119.txt>
1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the
definition is an absolute requirement of the specification.
2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
definition is an absolute prohibition of the specification.
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.
4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full
implications should be understood and the case carefully weighed
before implementing any behavior described with this label.
5. MAY This word, or the adjective "OPTIONAL", mean that an item is
truly optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels that
it enhances the product while another vendor may omit the same item.
An implementation which does not include a particular option MUST be
prepared to interoperate with another implementation which does
include the option, though perhaps with reduced functionality. In the
same vein an implementation which does include a particular option
MUST be prepared to interoperate with another implementation which
does not include the option (except, of course, for the feature the
option provides.)
6. Guidance in the use of these Imperatives
Imperatives of the type defined in this memo must be used with care
and sparingly. In particular, they MUST only be used where it is
actually required for interoperation or to limit behavior which has
potential for causing harm (e.g., limiting retransmisssions) For
example, they must not be used to try to impose a particular method
on implementors where the method is not required for
interoperability.
7. Security Considerations
These terms are frequently used to specify behavior with security
implications. The effects on security of not implementing a MUST or
SHOULD, or doing something the specification says MUST NOT or SHOULD
NOT be done may be very subtle. Document authors should take the time
to elaborate the security implications of not following
recommendations or requirements as most implementors will not have
had the benefit of the experience and discussion that produced the
specification.
Thanks,
Andrew Fish
Based on the version history, this was added in v1.22a in December, 2011.
Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).
+1 on this one!
Also there are times that this will fail.
!include A.dsc
!include B.dsc
And doing ‘!include’ breaks line numbers in a lot of error messages.
Thanks,
Andrew Fish
Thanks,
--Samer
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel
El-Haj-Mahmoud, Samer
2015-07-01 18:00:34 UTC
Permalink
I still see this case as well Andrew. I have a fix in my local repo. I will try to submit a patch.

From: Andrew Fish [mailto:***@apple.com]
Sent: Wednesday, July 01, 2015 12:55 PM
To: edk2-***@lists.sourceforge.net
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 7:34 PM, Gao, Liming <***@intel.com<mailto:***@intel.com>> wrote:

This case? I think it is supported. We have similar cases that can work.

!include A.dsc
!include B.dsc



I hit a case where this failed. But only if no parseable data was between the !include statements. Maybe it has been fixed?

Thanks,

Andrew Fish



From: Andrew Fish [mailto:***@apple.com]
Sent: Wednesday, July 01, 2015 10:25 AM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 7:12 PM, Gao, Liming <***@intel.com<mailto:***@intel.com>> wrote:

Samer:
What means back to back !include? What issue is it? Could you give one sample for it?


I posted an example on the mailing list of the failure a while back.

Thanks,

Andrew Fish



Thanks
Liming
From: El-Haj-Mahmoud, Samer [mailto:samer.el-haj-***@hp.com]
Sent: Wednesday, July 01, 2015 7:13 AM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes

Thanks Larry! This is a good plan.

I will submit the patches for the back to back !include fix, as well as the nested !includes

Thanks,
--Samer

From: Hauch, Larry [mailto:***@intel.com]
Sent: Tuesday, June 30, 2015 4:54 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes

Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.

I will update statements in the specs from “may not” to “should not”.

For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.

We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.

Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842


From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:56 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 1:34 PM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.

Thanks!



I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?



My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.



From: Andrew Fish [mailto:***@apple.com]
Sent: Tuesday, June 30, 2015 1:03 PM
To: edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
Subject: Re: [edk2] Question on DSC double includes


On Jun 30, 2015, at 10:54 AM, El-Haj-Mahmoud, Samer <samer.el-haj-***@hp.com<mailto:samer.el-haj-***@hp.com>> wrote:

The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.

From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..

May in this context is optional, so an implementation that included more nesting would be OK per the spec.

From a specification point of view the correct forms are MUST NOT, or SHALL NOT.

While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.

https://www.ietf.org/rfc/rfc2119.txt

1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the

definition is an absolute requirement of the specification.



2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the

definition is an absolute prohibition of the specification.



3. SHOULD This word, or the adjective "RECOMMENDED", mean that there

may exist valid reasons in particular circumstances to ignore a

particular item, but the full implications must be understood and

carefully weighed before choosing a different course.



4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that

there may exist valid reasons in particular circumstances when the

particular behavior is acceptable or even useful, but the full

implications should be understood and the case carefully weighed

before implementing any behavior described with this label.

5. MAY This word, or the adjective "OPTIONAL", mean that an item is

truly optional. One vendor may choose to include the item because a

particular marketplace requires it or because the vendor feels that

it enhances the product while another vendor may omit the same item.

An implementation which does not include a particular option MUST be

prepared to interoperate with another implementation which does

include the option, though perhaps with reduced functionality. In the

same vein an implementation which does include a particular option

MUST be prepared to interoperate with another implementation which

does not include the option (except, of course, for the feature the

option provides.)



6. Guidance in the use of these Imperatives



Imperatives of the type defined in this memo must be used with care

and sparingly. In particular, they MUST only be used where it is

actually required for interoperation or to limit behavior which has

potential for causing harm (e.g., limiting retransmisssions) For

example, they must not be used to try to impose a particular method

on implementors where the method is not required for

interoperability.



7. Security Considerations



These terms are frequently used to specify behavior with security

implications. The effects on security of not implementing a MUST or

SHOULD, or doing something the specification says MUST NOT or SHOULD

NOT be done may be very subtle. Document authors should take the time

to elaborate the security implications of not following

recommendations or requirements as most implementors will not have

had the benefit of the experience and discussion that produced the

specification.


Thanks,

Andrew Fish


Based on the version history, this was added in v1.22a in December, 2011.

Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).


+1 on this one!

Also there are times that this will fail.
!include A.dsc
!include B.dsc

And doing ‘!include’ breaks line numbers in a lot of error messages.

Thanks,

Andrew Fish

Thanks,
--Samer


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
edk2-devel mailing list
edk2-***@lists.sourceforge.net<mailto:edk2-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Andrew Fish
2015-06-30 23:27:53 UTC
Permalink
Post by Hauch, Larry
Hi Folks,
Unfortunately, we are just getting ready to put updates to the DSC and FDF specs out on the web. The next revision of the specs probably won’t come out until the end of the year.
Until that time, we can use this e-mail.
I will update statements in the specs from “may not” to “should not”.
For the tools to support nested !include statements, please submit your patch.
This is a reasonable request.
As Andrew pointed out, this will lead to confusing error message line numbers, so I will also add in the spec that if nested !include files are used, the error message line numbers are not necessarily correct due to the use of !include files.
We may be able to enhance the build system in the future to provide better error messages with more accurate line number information, and suggestions are welcome.
Larry,

I’m not 100% sure how the scheme works.

If the file is pre-processed 1st then you can do something like the C pre-processor and leave behind line number directives that are parsed when the file is parsed by the C compiler to print out line number info.
# 1 "/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseMemoryLibSse2/Ia32/ZeroMem.S" 2

If it is getting built on the fly then you need to keep a list of ranges that can map back to the correct file/offset. So everything up to the 1st include maps directly, line numbers with the !include get mapped, after returning from the !include the line numbers in the main file are now offset, etc.

Thanks,

Andrew Fish
Post by Hauch, Larry
Cheers,
Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
705 5th Ave S. Suite 500
Seattle, WA 98104
Work: (206) 701-8842
Sent: Tuesday, June 30, 2015 1:56 PM
Subject: Re: [edk2] Question on DSC double includes
Thanks Andrew. I have a fix for the back to back !includes. I will send a patch with the fix
.
Thanks!
I also have a patch to allow for nested !includes. But I cannot submit it until the DSC spec issue statement below is cleared up. Anyone can comment on the DSC spec?
My reading of the specification is it does not restrict you from doing this, as it makes nesting an optional feature.
Sent: Tuesday, June 30, 2015 1:03 PM
Subject: Re: [edk2] Question on DSC double includes
The DSC Spec v1.24 explicitly says: “File specified by !include statements may not contain !include statements.”.
From working on industry specifications for last 15+ years, and channelling my inner Mark Doran
..
May in this context is optional, so an implementation that included more nesting would be OK per the spec.
From a specification point of view the correct forms are MUST NOT, or SHALL NOT.
While "may not” restricts permission in its common usage in English, I don’t think it is well defined in the context of a spec.
https://www.ietf.org/rfc/rfc2119.txt <https://www.ietf.org/rfc/rfc2119.txt>
1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the
definition is an absolute requirement of the specification.
2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the
definition is an absolute prohibition of the specification.
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.
4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that
there may exist valid reasons in particular circumstances when the
particular behavior is acceptable or even useful, but the full
implications should be understood and the case carefully weighed
before implementing any behavior described with this label.
5. MAY This word, or the adjective "OPTIONAL", mean that an item is
truly optional. One vendor may choose to include the item because a
particular marketplace requires it or because the vendor feels that
it enhances the product while another vendor may omit the same item.
An implementation which does not include a particular option MUST be
prepared to interoperate with another implementation which does
include the option, though perhaps with reduced functionality. In the
same vein an implementation which does include a particular option
MUST be prepared to interoperate with another implementation which
does not include the option (except, of course, for the feature the
option provides.)
6. Guidance in the use of these Imperatives
Imperatives of the type defined in this memo must be used with care
and sparingly. In particular, they MUST only be used where it is
actually required for interoperation or to limit behavior which has
potential for causing harm (e.g., limiting retransmisssions) For
example, they must not be used to try to impose a particular method
on implementors where the method is not required for
interoperability.
7. Security Considerations
These terms are frequently used to specify behavior with security
implications. The effects on security of not implementing a MUST or
SHOULD, or doing something the specification says MUST NOT or SHOULD
NOT be done may be very subtle. Document authors should take the time
to elaborate the security implications of not following
recommendations or requirements as most implementors will not have
had the benefit of the experience and discussion that produced the
specification.
Thanks,
Andrew Fish
Based on the version history, this was added in v1.22a in December, 2011.
Any reason why this limitation exists? We have scenarios where we need common features to have their own DSCs file to be included from other (less common) DSC files (for at least 2 or 3 levels of includes).
+1 on this one!
Also there are times that this will fail.
!include A.dsc
!include B.dsc
And doing ‘!include’ breaks line numbers in a lot of error messages.
Thanks,
Andrew Fish
Thanks,
--Samer
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________ <https://www.gigenetcloud.com/_______________________________________________>
edk2-devel mailing list
https://lists.sourceforge.net/lists/listinfo/edk2-devel <https://lists.sourceforge.net/lists/listinfo/edk2-devel>
Loading...