Am 11.03.21 um 16:13 schrieb Michael Davidsaver:
> On 3/11/21 1:39 AM, Ben Franksen via Core-talk wrote:
>> Context: https://github.com/epics-modules/lua/issues/22
>>
>>> The string replacement is weird because of how calls to the registered IOC shell functions are executed. I previously had added a function into base that allowed me to query the IOC's function registrar for the functions that had been registered. However, later on, one of the base developers decided that they didn't like the idea of having that access to outside code, so it was removed.
>>
>> A very bad decision IMO. Can we please reopen discussion on that?
>
> My objection to iocshFindCommand() as a public API still stands.
> I feel it exposes too many details of how iocsh currently works.
> Specifically, by exposing the function pointer it prevents this
> type from ever being changed.
If I were Keenan I might have suggested you mark this API function as
unstable and promised to deal with any improvements / internal
restructurings by adapting my code when and if they happened.
I think this is a viable compromise between "prevent it form ever being
changed" and "do not provide an API at all".
> eg. I'm thinking to add a second,
> alternative, form which can return an error, and pass in an extra
> void* as context.
>
> I'm open to adding an alternative to iocshCmd() provided it doesn't
> close off avenues for future work. Perhaps passing in an array of
> strings?
I am not sure this would address the issue, which is the handling of
environment variable expansion. Perhaps what needs to be done is to
duplicate that functionality in luash, then pass the expanded command
line to iocshCmd? Of course in luash the expansion would be limited to
(literal) strings.
BTW, the relevant discussion seems to have happened here:
https://code.launchpad.net/~epics-core/epics-base/+git/Com/+merge/366876
I find it a bit hard to make sense of.
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- Re: [epics-modules/lua] redirection in luash (#22) Ben Franksen via Core-talk
- Re: [epics-modules/lua] redirection in luash (#22) Michael Davidsaver via Core-talk
- Navigate by Date:
- Prev:
Re: IPv6 Ben Franksen via Core-talk
- Next:
Build failed: EPICS Base 7 base-7.0-236 AppVeyor via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: [epics-modules/lua] redirection in luash (#22) Michael Davidsaver via Core-talk
- Next:
[Bug 1918617] [NEW] osiSockTest fails Dirk Zimoch via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
|