> No, just be super careful designing API to "userspace" and once commited it stays. Forever. Bad APIs will remain. Posix does not remove bad APIs as well. That's why we still have "creat" instead of "create". Or we have 3 poll APIs in Linux (select/poll/epoll). You really want to change API, you build another one, and mark old one as deprecated, but you don't delete it. That would be ok if Nuttx was <1.0.0, version, but it's >=1.0.0 so it should care about API/ABI. Especially that it does not have to come up with API and just use what Posix been using for decades now.
I can't agree with this. Stockpiling legacy code degrades code quality, the code is harder to maintain and is harder to use by users. I think there are cases where it's justified to break compatibility. Especially if the breaking changes for the users are easy to fix and detect, and the interface that is being modified has obvious flaws. And of course, everything should be well documented. If I remember correctly NuttX has always followed this path, if the code is bad - it's out, no mercy and excuses for bad solutions. Another thing - who will maintain the legacy code? We have problems with reviewing new changes. Adding to that maintaining legacy code for such a small community sounds like a nightmare. To be clear: I'm talking only about interfaces that aren't covered by any standard, such as sensors, PWM, ADC, etc. > So you carefully define it, keep it as EXPERIMENTAL for some time, which allows for breaking changes, but once API is marked as stable - it is set in stone. Period. Yes, it makes sense. But some interfaces have been in NuttX for a long time, were not marked EXPERIMENTAL, have obvious limitations and now they are causing problems. Most likely because it was sufficient at the time of implementation and the author didn't take into consideration any other applications or use cases. Which isn't surprising, it's hard to imagine all the potential applications and design a good portable API. pt., 31 sty 2025 o 17:55 <michal.lyszc...@bofc.pl> napisaĆ(a): > On 2025-01-31 17:34:48, raiden00pl wrote: > > How do you want to maintain compatibility between nuttx-apps and > > nuttx while both are active development projects, and what's more > > one of them is optional? It's not possible. > Same way as app/kernel compatibility is maintained in othes Unices like > Linux or > BSD. > > > It would be possible if we assumed that the API in NuttX is perfect > > and will not require changes, which is not true. There are many custom > > solutions in NuttX that require improvements and these improvements > > will break compatibility. There are many custom interfaces that need > > improvement, such as PWM or sensors, and these changes will > > definitely break apps. > No, just be super careful designing API to "userspace" and once commited it > stays. Forever. Bad APIs will remain. Posix does not remove bad APIs as > well. > That's why we still have "creat" instead of "create". Or we have 3 poll > APIs in > Linux (select/poll/epoll). You really want to change API, you build > another one, > and mark old one as deprecated, but you don't delete it. That would be ok > if > Nuttx was <1.0.0, version, but it's >=1.0.0 so it should care about > API/ABI. > Especially that it does not have to come up with API and just use what > Posix > been using for decades now. > > > On the other hand, any standardized interface like POSIX must be stable, > > which is obvious. But POSIX doesn't define everything, especially when > > it comes to embedded systems. > So you carefully define it, keep it as EXPERIMENTAL for some time, which > allows for breaking changes, but once API is marked as stable - it is set > in > stone. Period. > > -- > > .-----------------.-------------------.----------------------.-----------------. > | Michal Lyszczek | Embedded C, Linux | Company Address | .-. > opensource | > | +48 727 564 419 | Software Engineer | Akacjowa 10a; 55-330 | oo| > supporter | > | https://bofc.pl `----.--------------: Brzezinka Sredzka PL | /`'\ > & | > | GPG FF1EBFE7E3A974B1 | Bits of Code | NIP: 813 349 58 78 |(\_;/) > programer | > > `----------------------^--------------^----------------------^-----------------' >