Re: sysinfo task

Ryan Boggs <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nant.devel
Message-ID <[email protected]>
Hi,

On Mar 25, 2010, at 8:10 AM, "Gert Driesen" <[email protected]>  
wrote:

> Ryan,
>
> We cannot allow parenthesis in property names, as that would screw  
> up our expression tokenizer.
> I'm more enclined to a machanism that allows explicit control over  
> the property names that a given environment variable is mapped to.
> Something similar to the file mappers in Ant would be great.
>
If I understand you correctly, are you referring to something like:

<sysinfo>
   <mapper type="glob" from="*(* to="*_*" />
</sysinfo>

Am I understanding you right?

Thanks,
Ryan

> Gert
>
> --------------------------------------------------
> From: "Ryan Boggs" <[email protected]>
> Sent: Thursday, March 25, 2010 3:59 PM
> To: "Dominik Guder" <[email protected]>
> Cc: <[email protected]>
> Subject: Re: [nant-dev] sysinfo task
>
>> Hi,
>>
>> On Mar 25, 2010, at 3:34 AM, Dominik Guder <[email protected]> wrote:
>>
>>>
>>>> On 64bit systems there are some environment variables which  
>>>> contains
>>>> parentheses like *ProgramFiles(x86)* or *CommonProgramFiles(x86)*.
>>>> This are invalid property names which cause the sysinfo tasks to
>>>> fail.
>>>>
>>>> b) replace any parentheses in env.name with underscores and put  
>>>> this
>>>> into docu.
>>>
>>>> So I would like to go with b) since the properties could be used.
>>>> In addition docu states that function *environment::get-variable()*
>>>> should be used to retrieve env variables. So I think this won't
>>>> affect a
>>>> lot of users.
>>>>
>>>
>>> Ok, I did some checks and will add some patches for discussion.
>>> (text in [[[ ]]] might be used for commit message as seen at svn
>>> mailing list)
>>>
>>> [[[
>>> fix incorrect definition of "failonerror" in <sysinfo> docu.
>>> ]]]
>>> sysinfo-task-docu-error.patch
>>>
>>>
>>> sysinfo-replace-propname.patch:
>>> this is a first implementation to replace "sys.env.ProgramFiles
>>> (x86)" with "sys.env.ProgramFiles_x86_"
>>> There is still the docu change missing. But I will provide this when
>>> we are going this way.
>>>
>> Are we sure that we want to alter env var names like this?  Wouldn't
>> it be better to allow parenthesis in the var names? I can just see
>> this causing confusion when a user is looking for an altered var  
>> name.
>>
>>> Result:
>>> --- snip ---
>>> [sysinfo] sys.env.ProgramFiles = C:\Programme
>>> [sysinfo] sys.env.ProgramFiles_x86_ = C:\Programme
>>> --- snap ---
>>>
>>>
>>> [[[
>>> sort sysinfo properties when using verbose="true"
>>> ]]]
>>> sysinfo-verbose-sorted.patch:
>>>
>>> This patch will output properties on sorted order in verbose. I
>>> found that I need to search more than I like to find my replaced
>>> property without this sorting
>>>
>> This makes sense to me.
>>
>>> So far Dominik
>>>
>>> -- 
>>> The answer to the great question of life,
>>> the universe and everything is 42 (Douglas Adams)
>>> <sysinfo-task-docu-error.patch>
>>> <sysinfo-replace-propname.patch>
>>> <sysinfo-verbose-sorted.patch>
>>> --- --- ---  
>>> --- 
>>> ------------------------------------------------------------------
>>> Download Intel&#174; Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>> _______________________________________________
>>> nant-developers mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/nant-developers
>>
>> Thanks,
>> Ryan
>>
>> --- 
>> --- 
>> --- 
>> ---------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> nant-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/nant-developers
>>
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.