Re: Duplicate task_spawn()

2021-07-01 Thread Xiang Xiao
Thanks for reporting this issue.
There a method to simplify the implementation and keep the compatibility,
please try these patch:
https://github.com/apache/incubator-nuttx/pull/4027
https://github.com/apache/incubator-nuttx-apps/pull/791

On Thu, Jul 1, 2021 at 8:40 PM Sebastien Lorquet 
wrote:

> I see that around the time of this discussion the userland API of
> task_spawn has been changed in incompatible ways.
>
> by this commit:
>
>
> https://github.com/apache/incubator-nuttx-apps/commit/58293abb8e896bb04f3a76bf8b48206debe68f26?branch=58293abb8e896bb04f3a76bf8b48206debe68f26=unified
>
> My apps, cloned from a nuttx repo that did not have this change, are
> suddenly broken in places I do not even care about.
>
> An example:
>
> In file included from exec_builtin.c:49:0:
> /home/slo/nuttx/include/spawn.h:150:5: note: expected 'char * const*'
> but argument is of type 'posix_spawnattr_t * {aka struct
> posix_spawnattr_s * '
>   int task_spawn(FAR const char *name, main_t entry,
>   ^~
> exec_builtin.c:195:13: error: too many arguments to function 'task_spawn'
> ret = task_spawn(, builtin->name, builtin->main, _actions,
>
>
> This is rather annoying. On the long term, this project becomes unstable
> in multiple ways.
>
> I suggest that user API breaks are documented in the same place as was
> used for other breaking changes.
>
> This is how I feel right now: https://www.youtube.com/watch?v=_LueFhQk5hg
>
>
> Sebastien
>
>
> Le 01/06/2020 à 16:43, Gregory Nutt a écrit :
> > On 5/30/2020 1:27 AM, Yang Chung Fan wrote:
> >> Hi,
> >>
> >> Did anyone also noticed that when building with CONFIG_LIB_SYSCALL=y,
> >> the linker is unhappy about the duplicated task_spawn() symbols?
> >>
> >> One of them is in sched/ and other one is in libs/libc.
> >>
> > PR 1168 should take care of this.
> >
>


Re: Duplicate task_spawn()

2021-07-01 Thread Sebastien Lorquet
I see that around the time of this discussion the userland API of 
task_spawn has been changed in incompatible ways.


by this commit:

https://github.com/apache/incubator-nuttx-apps/commit/58293abb8e896bb04f3a76bf8b48206debe68f26?branch=58293abb8e896bb04f3a76bf8b48206debe68f26=unified

My apps, cloned from a nuttx repo that did not have this change, are 
suddenly broken in places I do not even care about.


An example:

In file included from exec_builtin.c:49:0:
/home/slo/nuttx/include/spawn.h:150:5: note: expected 'char * const*' 
but argument is of type 'posix_spawnattr_t * {aka struct 
posix_spawnattr_s * '

 int task_spawn(FAR const char *name, main_t entry,
 ^~
exec_builtin.c:195:13: error: too many arguments to function 'task_spawn'
   ret = task_spawn(, builtin->name, builtin->main, _actions,


This is rather annoying. On the long term, this project becomes unstable 
in multiple ways.


I suggest that user API breaks are documented in the same place as was 
used for other breaking changes.


This is how I feel right now: https://www.youtube.com/watch?v=_LueFhQk5hg


Sebastien


Le 01/06/2020 à 16:43, Gregory Nutt a écrit :

On 5/30/2020 1:27 AM, Yang Chung Fan wrote:

Hi,

Did anyone also noticed that when building with CONFIG_LIB_SYSCALL=y,
the linker is unhappy about the duplicated task_spawn() symbols?

One of them is in sched/ and other one is in libs/libc.


PR 1168 should take care of this.