Andrew,

If WORKSPACE_MULTIPLE exists (either from env var or DSC file), and a workspace 
relative filepath needs to be resolved, tools use the set of paths from left to 
right in WORKSPACE_MULTIPLE, and the first match is used.

I was thinking of only supporting (1).  If DSC has the define, then it 
completely replaces the environment variable.

Mike

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Andrew 
Fish
Sent: Wednesday, August 05, 2015 8:45 AM
To: Kinney, Michael D
Cc: Justen, Jordan L; edk2-devel@lists.01.org; Laszlo Ersek; Gao, Liming; Paolo 
Bonzini
Subject: Re: [edk2] BaseTools features: multiple workspaces


> On Aug 5, 2015, at 8:38 AM, Kinney, Michael D <michael.d.kin...@intel.com> 
> wrote:
> 
> Andrew,
> 
> I would recommend a DSC define setting have precedence over the 
> WORKSPACE_MULTIPLE environment variable.  This way, a single development 
> environment can support many platform DSC files.  Most of the DSC files can 
> choose to let the WORKSPACE_MULTIPLE environment variable select the dirs, 
> and only platform DSC files that need dirs different than WORKSPACE_MULTIPLE 
> environment variable should set the DSC file define.
> 
> I would also recommend that the priority of the paths be the same for both 
> the WORKSPACE_MULTIPLE environment variable and a DSC define.
> 

Mike,

Well in reality the priority is not the same as 1st match wins (well we need to 
define how that works too). So an “override” is possible if a module is in 
multiple paths. 

So the question is if the DSC entry exists:
1) It overrides WORKSPACE_MULTIPLE -> prevents side effects from env breaking 
build. 
2) It appends to  $WORKSPACE_MULTIPLE, so env overrides DSC
3) it pre-pends to $WORKSPACE_MULTIPLE, so DSC overrides env. 

Thanks,

Andrew Fish


> One interesting issue is the selection of a path separator in the DSC file 
> define syntax.  
> 
> Best regards,
> 
> Mike
> 
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Andrew 
> Fish
> Sent: Wednesday, August 05, 2015 8:28 AM
> To: Gao, Liming
> Cc: Justen, Jordan L; edk2-devel@lists.01.org; Laszlo Ersek; Paolo Bonzini
> Subject: Re: [edk2] BaseTools features: multiple workspaces
> 
> 
>> On Aug 5, 2015, at 7:06 AM, Gao, Liming <liming....@intel.com> wrote:
>> 
>> Thanks for your all comments. 
>> 
>> Most people prefers to keep WOSKAPCE as single directory, and introduce new 
>> env $(WORKSPACE_MULTIPLE). I think Mike solution can make them more clear if 
>> WORKSPACE_MULTIPLE is set. 
>> 
>> On QA team impact, it should be small. QA team can still use the current 
>> working model to place all packages in root directory, and set WORKSPACE 
>> only. QA team just needs to know the package list. 
>> 
>> Tim gave another idea to define multiple source locations in Platform DSC 
>> file. It doesn't conflict with this proposal. We can implement 
>> $(WORKSPACE_MULTIPLE) feature first, and evaluate DSC update. On the fixed 
>> tree layout, these two solutions can work. Once the end user reorganizes its 
>> tree layout, he needs to set $(WORKSPACE_MULTIPLE) env or update Platform 
>> DSC file, and build platform DSC.
>> 
> 
> We should probably decided up front which has precedence the env variable or 
> the DSC entry. 
> 
> It might not hurt to think about the DSC case when implementing the env case, 
> as some arbitrary choices in the env path may make the DSC path harder. 
> 
> Thanks,
> 
> Andrew Fish
> 
>> Thanks
>> Liming
>> -----Original Message-----
>> From: Laszlo Ersek [mailto:ler...@redhat.com] 
>> Sent: Tuesday, August 04, 2015 7:20 PM
>> To: Justen, Jordan L
>> Cc: Gao, Liming; Paolo Bonzini; edk2-devel@lists.01.org
>> Subject: Re: [edk2] BaseTools features: multiple workspaces
>> 
>> On 08/03/15 19:35, Jordan Justen wrote:
>>> On 2015-08-03 02:08:14, Gao, Liming wrote:
>>>> Paolo:
>>>> I think that keep the exiting syntax for WORKSPACE to be a single
>>>> path can minimize the impacts to exiting tools that assume a
>>>> single workspace.
>>> 
>>> I know you originally suggested to use WORKSPACE, but got some 
>>> feedback that it might be better to create a new variable to not break 
>>> some unspecified tools.
>>> 
>>> Was anyone able to name an actual tool that would be impacted? Why not 
>>> work to update these tools at the same time? An easy 'fix' will be for 
>>> any such tool to give an error message if it sees ':' or ';' in the 
>>> WORKSPACE environment variable. Although this is really not a fix, it 
>>> will be just as much support as if they ignore the new 
>>> WORKSPACE_MULTIPLE environment variable.
>>> 
>>> I think that using the single separated WORKSPACE environment variable 
>>> is more intuitive/expected. From using env vars such as PATH, we all 
>>> know what it means.
>>> 
>>> For WORKSPACE+WORKSPACE_MULTIPLE, I don't know which has priority. I 
>>> assume WORKSPACE is checked first, and then WORKSPACE_MULTIPLE?
>> 
>> This was described in Liming's email, in point 4b.
>> 
>>> 
>>> Will this work for the integrated CryptoPkg + open-ssl? It seems like 
>>> we need a priority above EDK II for this. I guess WORKSPACE will not 
>>> be set to EDK II in this case?
>>> 
>>> Anyway, it just seems a little odd.
>> 
>> For me a colon-separated (well, separator-separated :)) single WORKSPACE 
>> variable would be more intuitive, but WORKSPACE_MULTIPLE can be defined well 
>> enough too. For example:
>> - WORKSPACE must not contain separators
>> - if WORKSPACE_MULTIPLE is set, then the effect is as if
>> ${WORKSPACE}:${WORKSPACE_MULTIPLE} were specified under the
>> well-known PATH semantics.
>> 
>> No clue about the CryptoPkg impact. Can you remind me please why CryptoPkg / 
>> OpensslLib are special wrt. WORKSPACE?
>> 
>> Thanks
>> Laszlo
>> 
>>> 
>>> -Jordan
>>> 
>>>> -----Original Message-----
>>>> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf 
>>>> Of Paolo Bonzini
>>>> Sent: Monday, August 03, 2015 4:31 PM
>>>> To: Gao, Liming; edk2-devel@lists.01.org
>>>> Subject: Re: [edk2] BaseTools features: multiple workspaces
>>>> 
>>>> 
>>>> On 03/08/2015 05:56, Gao, Liming wrote:
>>>>> Hi, all
>>>>> We will update BaseTools feature to allow more than one workspaces. The 
>>>>> detail design in the below. Please help review it. If you have any 
>>>>> comments, please let me know.
>>>>> 
>>>>> 1.       Keep $(WORKSPACE) environment as is
>>>>> 
>>>>> a.       $(WORKSPACE) determines location of Build and Conf directory.
>>>>> 
>>>>> 2.       New optional $(WORKSPACE_MULTIPLE) environment is added to 
>>>>> include more directories with the separator ';', like $(PATH)
>>>> 
>>>> Why is $(WORKSPACE_MULTIPLE) necessary?  On Linux it is okay to break 
>>>> preexisting paths that contain a ":"; on Windows semicolons are allowed in 
>>>> theory but in practice break in several ways.
>>>> 
>>>> Paolo
>>>> 
>>>>> a.       Produce the same behavior if $(WORKSPACE_MULTIPLE) is not set.
>>>>> 
>>>>> 3.       Update edksetup.bat/edksetup.sh to find BaseTools directory from 
>>>>> $(WORKSPACE) and $(WORKSPACE_MULTIPLE) directories.
>>>>> 
>>>>> 4.       Update BaseTools to support multiple workspaces
>>>>> 
>>>>> a.       For the relative file path (INF, DSC and FDF), BaseTools will 
>>>>> search them from $(WORKSPACE) and $(WORKSPACE_MULTIPLE) directories.
>>>>> 
>>>>> b.      Search priority from high to low: $(WORKSPACE), 
>>>>> $(WORKSPACE_MULTIPLE).
>>>>> 
>>>>>   This is a compatible feature. It has no impact on current EDKII project.
>>>> _______________________________________________
>>>> edk2-devel mailing list
>>>> edk2-devel@lists.01.org
>>>> https://lists.01.org/mailman/listinfo/edk2-devel
>>>> _______________________________________________
>>>> edk2-devel mailing list
>>>> edk2-devel@lists.01.org
>>>> https://lists.01.org/mailman/listinfo/edk2-devel
>>> _______________________________________________
>>> edk2-devel mailing list
>>> edk2-devel@lists.01.org
>>> https://lists.01.org/mailman/listinfo/edk2-devel
>>> 
>> 
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to