Hey Eugene. 
While a fix that breaks things isn’t really a fix, let me offer some of my 
experience on a similar note regarding user variable fields and how they are 
passed into GRC. 

See this pull request: https://github.com/gnuradio/gnuradio/pull/5008

I had a chicken and egg problem with what the user input should be for clarity 
(raw no quotes) vs how that value gets assigned the correct type and passed 
into the Python generator (raw as well). 

By submitting a pull request I was able to get help from several developers and 
we came up with the correct approach together. I did this after exhausting my 
own YAML knowledge. We got to the bottom of it and the pull request is in 
review for merging into master and maint-3.9

Without having time to dig into it yet. What your suggesting here sounds like a 
feature request. I will do my best to look at this ASAP, but I’d suggest 
checking some of the feedback I got with my bug fix. Seems like it’s in the 
same wheelhouse as your issue. 



<end transmission>

> On Sep 2, 2021, at 13:45, Eugene Grayver <[email protected]> wrote:
> 
> 
> core/generator/flow_graph.py.mako:214
> 
> self.${blk.name}.set_block_alias(${blk.params['alias'].get_evaluated()})
> 
> Just remove quotes.  NOTE: this WILL BREAK any existing flowgraphs that set 
> the block alias, and they will have to add quotes around the current block 
> alias.  I can't think of any way to preserve backward compatibility.
> 
> While we are on the subject of aliases, can we also make a one-line change to 
> set the thread name based on the alias rather than the block name!
> 
> ________________________
> Eugene Grayver, Ph.D.
> Aerospace Corp., Principal Engineer
> Tel: 310.336.1274
> ________________________
> From: Paul Atreides <[email protected]>
> Sent: Wednesday, September 1, 2021 1:46 PM
> To: Eugene Grayver <[email protected]>
> Cc: [email protected] <[email protected]>
> Subject: Re: Block alias
>  
> 
> Which one line in GRC should be changed? 
> 
> I’d be happy to help you submit a pull request for the one line that needs to 
> be changed. 
> 
> You can message me directly if you’d like help with that. 
> 
> <end transmission>
> 
>>> On Sep 1, 2021, at 13:58, Eugene Grayver <[email protected]> wrote:
>>> 
>> 
>> I'd like to suggest a minor change to the way block alias is handled in GRC. 
>>  Currently it is treated as a string.  It should be treated as 'any'.  The 
>> current approach does not scale to large flowgraphs, especially with 
>> multiple hierarchical blocks.  We should be able to set the alias based on 
>> parameters/variables.  Should be a one-line change in GRC.
>> 
>> While on the topic, I don't recall if gr 3.9 has finally exposed the 
>> set_block_alias on python blocks.  My old version still does not.
>> 
>> 
>> ________________________
>> Eugene Grayver, Ph.D.
>> Aerospace Corp., Principal Engineer
>> Tel: 310.336.1274
>> ________________________

Reply via email to